Resolved Crash on Campaign Map Day ~380 NullReferenceException

Users who are viewing this thread

Version number
e1.5.6
Branch
Beta
Modded/unmodded
Yes, but I removed mods.
Dump identifier (optional)
2021-01-15_05.08.05_aa7d04d37b9793a70d1e04ea83d034e8
Hi there,

I've run into a crash that's happening as I travel along on the campaign map. Have reloaded numerous times but keeps happening within about a day of in-game time passing. I have also disabled all the mods I have been using and reloaded to the same effect.

I tried loading an older save (about 20 in game days back) and waiting, and sure enough roughly the same amount of in-game days later the crash occurred.

I installed better exception window and it gave me the following error report:

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.
This error can be caused by a faulty module XMLs, manifest (submodule.xml), or DLL (bad one or permission error).

If you have Community Patch installed, please click Attempt to Continue in order to capture logs that will be generated by it.
Or If you're debugging, you can disable the error window individually in config.json in BetterExceptionWindow submodule folder.

- Reasons

Source: TaleWorlds.CampaignSystem

Object reference not set to an instance of an object.

- Inner exception

Source: No module

No inner exception was thrown

- Callstacks

Protip: Use a debugger like dnSpy or Visual studio to trace the source of error, by stepping the program line by line.

Inner exception callstack:

No inner exception was thrown



Outer exception callstack:

at TaleWorlds.CampaignSystem.Kingdom.CreateArmy(Hero armyLeader, IMapPoint target, ArmyTypes selectedArmyType)

at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.AiBehaviors.AiPartyThinkBehavior.PartyHourlyAiTick(MobileParty mobileParty)

at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.AiBehaviors.AiPartyThinkBehavior.TickPartialHourlyAi()

at TaleWorlds.CampaignSystem.MbEvent.InvokeList(EventHandlerRec list)

at TaleWorlds.CampaignSystem.CampaignEvents.TickPartialHourlyAi()

at TaleWorlds.CampaignSystem.CampaignEventDispatcher.TickPartialHourlyAi()

at TaleWorlds.CampaignSystem.Campaign.Tick(Single dt)

at TaleWorlds.CampaignSystem.Campaign.RealTick(Single realDt)

at TaleWorlds.CampaignSystem.MapState.OnMapModeTick(Single dt)

at TaleWorlds.Core.GameStateManager.OnTick(Single dt)

at TaleWorlds.Core.Game.OnTick(Single dt)

at TaleWorlds.Core.GameManagerBase.OnTick(Single dt)

at DMD?66975310::OnApplicationTick_Patch1>(Module this, Single dt)


I have uploaded the crash dump and included the reference. I gather that will include my save file, but if it didn't go through I can upload it separately.

Thank you if you're able to investigate this crash.
 
Unfortunately, there was a problem with our crash uploader system. Because of it, we were not able to log some of the crash dumps we received from the last two days. And we can't access to your dump files. Would you mind reproducing it and uploading it again?
 
Sorry to interupt!
I got almost the exact same issue. while using a save from 1.5.6beta, in 1.5.6stable gets a CTD while moving around the map around 800 (in-game) days. Is modded but have inactivated them for testing purpose.
My exception/error is almost the same:

at TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultDiplomacyModel.GetHeroesForEffectiveRelation(Hero hero1, Hero hero2, Hero& effectiveHero1, Hero& effectiveHero2)at TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultDiplomacyModel.GetEffectiveRelation(Hero hero1, Hero hero2, StatExplainer explainer)
at TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultArmyManagementCalculationModel.CalculatePartyInfluenceCost(MobileParty armyLeaderParty, MobileParty party)
at TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultArmyManagementCalculationModel.CalculateTotalInfluenceCost(Army army, Single percentage)
at TaleWorlds.CampaignSystem.Army.ThinkAboutCohesionBoost()
at TaleWorlds.CampaignSystem.Army.HourlyTick(MBCampaignEvent campaignevent, Object[] delegateparams)
at TaleWorlds.CampaignSystem.MBCampaignEvent.RunHandlers(Object[] delegateParams)
at TaleWorlds.CampaignSystem.MBCampaignEvent.CheckUpdate()
at TaleWorlds.CampaignSystem.CampaignEvents.SignalPeriodicEvents()
at TaleWorlds.CampaignSystem.Campaign.Tick(Single dt)
at TaleWorlds.CampaignSystem.Campaign.RealTick(Single realDt)
at TaleWorlds.CampaignSystem.MapState.OnMapModeTick(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_Patch2(Module this, Single dt)

Will we get any updates on what might be the cause of this?
I can upload my crash dump later tonight.
 
Do you have a save file of session that you experienced this issue? With your save file, we can reproduce the issue much easier and faster. You can find your save file here:

C:\Users\username\Documents\Mount and Blade II Bannerlord\Game Saves

You can send your save files to us via upload.taleworlds.com site. Please write your username and this threads URL into the description box so that we can find it easier.
Thanks for reporting and sorry for any inconvenience!
 
I'll see what i can do.

Do we have any idea what might be the cause of it?
I'd like to hear the findings on loreks case aswell
 
Might be related to the mods.
IF the mod user can remove the mods successfully and manages to reproduce the same issue again on a NEW Campaign we can be sure that that crash is from our end and not related to the mods. This way is a much faster and efficient way in the long run. Even if the save files had mods in them for a while but deleted afterwards, that game is still open to any crashes that can result from mods.
 
Okay, im gonna try a test run on a new campaign without mods. but its gonna take a hell of a time, gonna let it run for awhile as it seems for both me and lorek this happens in the mid to late game.

Here is my modlist that i used:

Asked modders for help here (for instance) but it seems like the issue is very hard to catch, especially as this exception seems rather odd to end up in a crash. Thats why im asking if you guys know anything about what it can actually point to.
I'm getting quite desperate where to get help on this. I've tried all the typical guidelines from the support pages here and on the different mods i use. I guess this is what one get when flew too close to the sun... :sad:
 
Hi avVE and MArdA,

I'll try and run a new vanilla campaign aswell. I'll use the console and cheat mode for money and levelling to make the process quicker to get to 400 days and having my own kingdom.

The thing is, even if the bug is just related to the native code, as this isn't a widespread crash that lots of people are having, it could be difficult to recreate the conditions under which it occurs.


avVE, looks like the mods we have in common are:
-Harmony
-RTS Camera
-Realistic Battle AI Module
-Party AI Overhaul and Commands Continued

Maybe the party AI overhaul mod could be the cause? It does influence party/army behavior.. but that's a layman's guess on my part; I'm out of my depth when it comes to troubleshooting this stuff.

Some info on my campaign in case it helps for you to cross-reference:
  • I started the campaign on game version 1.5.5 and moved to 1.5.6 when it came out. At time of crash was still on 1.5.6 on beta branch, hadn't moved to 1.5.7 but also hadn't moved to 1.5.6 main branch.
  • Had started my own kingdom after declaring war on Varcheg Rebels and taking settlement. At time of crash, kingdom was ~30 days old.
  • Begun the conspiracy quest through Arzagos, the most recent development in it was receiving the notification that Istiana knows about your kingdom and is plotting, etc.
Can't think what else might be relevant.
 
About the common mods, i noticed that aswell. Posted the question to the new mod author of PAOaC here further down in the comment section, to see he's take on it.
Great that you doing a test on your end.
 
We've found the resolution for the problem. It appears to be a bug with multiparties or some sort of issue with loading saves between patches.
resolution over here https://www.nexusmods.com/mountandblade2bannerlord/mods/2594?tab=posts&BH=2

from the guy who found it:

I think I fixed it. For anyone having similar problems try this mod:

As stated in this mods description (dumb me for not reading) that mod can help you in the scenario as stated:
Requirements (soft)
Save Missing Module Fix - Fixed - Without this fix your savegames will not load if you ever deactivate this mod. This is Maegfaers own update of the fix to work with e1.4.x games.

What this means is that this extra mod can help you if you fit that scenario - which is exactly what happened to me.

After downloading and loading that module, I got a message saying that the game found a duplicate party for Fianrad (one of the characters in the game) and the duplicate was removed.
After that the game works again.


Please try this out lorek.

Thank mArda for trying to help out! sorry to keep you guys busy with mod related stuff. however most of these load issues seems to get mitigated with Save Missing Module Fix - Fixed
 
@avVE Its great to see that you did find the fix. Its odd to fix the mod related issues with another mod. Which could create problems in the future but that's how modding life is. Enjoy the game!

@lorek Were you able to reproduce it on vanilla without mods? If so, can you send me your save file so that we can check if its happening on our end as well?
 
Hi guys

@avVE Thanks for keeping me up to date with your progress, glad to hear you've got thing working! Unfortunately using Save Missing Module Fix - Fixed didn't work for me. I tried with mods, without mods, with only PAIOCC -- no dice :sad:

@MArdA TaleWorlds I have not yet encountered the bug on my vanilla test campaign, but I did not get that far into it. I wanted to try and keep things close to the previous campaign - marrying the same people into my clan, taking the same settlement for my kingdom, etc. Anyway, it takes time.

Some interesting testing results however..
As it was frustratingly slow progress going through a new vanilla campaign (and the possibility that it would be inconclusive), I decided to try something else as well. I mentioned in my initial post that I tried loading an older save (about 20 in game days back) and still encountered the crash a predictable number of days forward.. Well, I decided to try playing from a save 30 days back, and guess what, game did not crash come day 380, or even a year after that.

I triple checked this for both saves, and the 20-days-back save consistently crashed 20-25 days later, while the 30-days-back-save was happy to go on and on.

Here's the strange part: these two saves were both running exactly the same version of the game, with exactly the same mods, all at exactly the same version. So I can only conclude that one of two things happened:
  • That some unlikely glitch occurred between those saves, stemming from either a mod, a combination of mods, or the vanilla code - though likely a mod, given that Worldsprayer from PAIOCC was confident the "OnApplicationTick_Patch#" exception should be mod related.
  • Or that between those saves I disable and re-enabled a mod, causing corrupted/faulty/glitched data in the save. I'm pretty confident I didn't do this, but perhaps I just completely don't remember.

Anyway, that's where I'm at. I'll keep testing the vanilla playthough, but honestly given the experience outlined above, I'm not expecting to be able to reproduce the crash.

Whatever was the source of my crash, looks like it'll be hard to pin point it at this stage. I don't want to use up any more of your time on what might be a bit of a wild goose chase.

Appreciate both of your help on this.
 
@lorek

Please try as i did in this text:

My scenario is the same. e.i. where i had the original PAIOHC at start of campaign and then switched it to this (PAIOHCC). But i could load in to the save and walk around for abit before i get the crash.
HOWEVER this is super ODD! now when i downloaded Save Missing Module Fix - Fixed and tested it with continued mod (PAIOHCC) i didnt get any messages like you mentioned, still got the CTD. I Then tested reverted back to the old PAIOHC and see what happens, then i got the message "this mod might cause some issue etcetc" and after that i got "found duplicate party: Baroness Shusanna Party ..." twice actually(??) which in turn solved the instant CTD! WOW!! :grin:
After that i reverted back yet again to PAIOHCC (latest version of this mod) and it actually appeared with baroness. I get no CTD now either.

e.i. after installing save missing module fix , you have to remove PAIOHC in your mod folder and rollback to old version of PAIOHC this one and load up your save that crashes. Then you probably will get a message about a dublicate character or something. Then see if the crash is mitigated. Then move to the new PAIOHC, only down side on this is you'll get a message every save that you inactiviated the mod on the save etc etc.

It didnt work for me neither to just install the Save Missing module fix at first. I had to go back to an older version of PAIOHC to get it working.
Hope this helps! I understand how frustrating this can be...
 
@avVE

Well how interesting!

I booted up with all my usual mods plus Save Missing Mod Fix and switched for older PAIOHC. On loading to main menu I got an error regarding Harmony: "Couldn't apply Harmony due to : Patching exception in the method System.Void... [+15 or so lines]". However it let me continue so I figured I'd just keep going.

I loaded my latest save right before the crash and indeed I got the message "found duplicate party: Galyk Party. Duplicate will be deleted". I waited a little bit, but unfortunately the crash came just as before with the same exception.

Then... I booted up will all mods disabled except for PAIOHC(old), Harmony and Save Missing Mod Fix. I got the same error on main menu load for harmony, which again I ignored. I loaded the save, got the 'duplicate party will delete' msg, but this time when I passed time the crash never came!

And another thing: I made a new save, quit, reloaded, and didn't get the 'you have deactiviated this mod in the past' message. Strange, but I won't complain. I passed time, got a year on, still no crash. Looks good!

As a point of interest, had you ever installed the old version of PAIOHC before you started troubleshooting? Because I hadn't, I had only ever used the 'continued' version by Worldsprayer.

So anyway thank you very much for making sure I tried with the old version of the mod! And well done tracking down a solution - good instincts on thinking to try the older version of the mod by Maegfaer!


@MArdA TaleWorlds
I've kept going with the vanilla playthrough, getting 2 years past where I was last time, and haven't encountered the crash which, given what avVE's been able to discover, isn't so surprising. Seems it is indeed mod related.
Thanks for your attending to this crash thread, and while we don't know exactly how the bug causing this crash comes about, we do have a solution for getting past it. So I think we can mark the thread resolved.


Cheers :smile:
 
Back
Top Bottom