Mount & Blade II: Bannerlord

Mount & Blade II: Bannerlord

Diplomacy
Derwulfmann 12 Feb, 2023 @ 4:37pm
An unhandled exception occured!
Just got back into bannerlord this week and this mod is a must, the exception window gave me this as a reason. I don't know what to think of it nor what to possibly fix. This is a new save file, made sure everything is compatible, i'm using nexus and steam, cuz reasons.

Here is the whole damn thing broken up


Bannerlord has encountered a problem and needs to close. We are sorry for the inconvenience.
If you were in the middle of something, the progress you were working on might be lost.

If you click attempt to continue, the program will ignore this error and continue running, however there is a risk your game will be in corrupted state.

This error can be caused by a faulty XMLs, manifest (submodule.xml), corrupted save game, module, or programming errors.
If this keeps happening, consider saving the error report and send it to the module authors or run a troubleshoot to solve the issues.

You can control Better Exception Window behaviour by editing config.json in BetterExceptionWindow submodule folder.

Click here to show Butterlib exception.


- Reasons
Source: 0Harmony
Ambiguous match in Harmony patch for Diplomacy.WarExhaustion.WarExhaustionManager:AddCasualtyWarExhaustion

- Callstacks
Protip: Use a debugger like dnSpy or Visual studio to trace the source of error, by stepping the program line by line. You can restart with dnSpy attached.

Inner exception callstack:
at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetMethod(String name, BindingFlags bindingAttr)
at HarmonyLib.AccessTools.FindIncludingBaseTypes[T](Type type, Func`2 func)
at HarmonyLib.AccessTools.Method(Type type, String name, Type[] parameters, Type[] generics)Outer exception callstack:
at HarmonyLib.AccessTools.Method(Type type, String name, Type[] parameters, Type[] generics)
at SurrenderTweaks.SurrenderHelper.AddPrisonersAsCasualties(MobileParty defender, MobileParty attacker) in C:\Users\Valarauko\source\repos\SurrenderTweaks\SurrenderTweaks\SurrenderHelper.cs:line 158
at SurrenderTweaks.Behaviors.BribeAndSurrenderBehavior.OnMapEventStarted(MapEvent mapEvent, PartyBase attackerParty, PartyBase defenderParty) in C:\Users\Valarauko\source\repos\SurrenderTweaks\SurrenderTweaks\Behaviors\BribeAndSurrenderBehavior.cs:line 59
at TaleWorlds.CampaignSystem.MbEvent`3.InvokeList(EventHandlerRec`3 list, T1 t1, T2 t2, T3 t3)
at TaleWorlds.CampaignSystem.CampaignEvents.OnMapEventStarted(MapEvent mapEvent, PartyBase attackerParty, PartyBase defenderParty)
at TaleWorlds.CampaignSystem.CampaignEventDispatcher.OnMapEventStarted(MapEvent mapEvent, PartyBase attackerParty, PartyBase defenderParty)
at TaleWorlds.CampaignSystem.MapEvents.MapEvent.Initialize(PartyBase attackerParty, PartyBase defenderParty, BattleTypes mapEventType)
at TaleWorlds.CampaignSystem.MapEvents.MapEventManager.StartBattleMapEvent(PartyBase attackerParty, PartyBase defenderParty)
at TaleWorlds.CampaignSystem.Actions.StartBattleAction.ApplyInternal(PartyBase attackerParty, PartyBase defenderParty, Object subject, StartBattleActionDetails detail)
at TaleWorlds.CampaignSystem.EncounterManager.StartPartyEncounter(PartyBase attackerParty, PartyBase defenderParty)
at TaleWorlds.CampaignSystem.Party.MobileParty.TaleWorlds.CampaignSystem.Map.IMapEntity.OnPartyInteraction(MobileParty engagingParty)
at TaleWorlds.CampaignSystem.EncounterManager.HandleEncounterForMobileParty(MobileParty mobileParty, Single dt)
at TaleWorlds.CampaignSystem.EncounterManager.HandleEncounters(Single dt)
at TaleWorlds.CampaignSystem.Campaign.Tick()
at TaleWorlds.CampaignSystem.GameState.MapState.OnMapModeTick(Single dt)
at TaleWorlds.CampaignSystem.GameState.MapState.OnTick(Single dt)
at TaleWorlds.Core.GameStateManager.OnTick(Single dt)
at TaleWorlds.Core.Game.OnTick(Single dt)
at TaleWorlds.Core.GameManagerBase.OnTick(Single dt)
at TaleWorlds.MountAndBlade.Module.OnApplicationTick_Patch1(Module this, Single dt)
< >
Showing 1-2 of 2 comments
MrAutism 14 Feb, 2023 @ 12:29am 
Got the same thing in the middle of my campaign
artifixer  [developer] 14 Feb, 2023 @ 3:58am 
The crash has to be fixed on Surrender Tweaks side. In short, Surrender Tweaks calls to some of Diplomacy's methods to add war exhaustion for surrendered troops. Since those methods were changed in v1.2.X compared to v1.1.X, previous code that calls them causes a crash. It should be fixed on the side that calls those methods. Similar to how mods have to be updated when there's a new game version.
< >
Showing 1-2 of 2 comments
Per page: 1530 50