Modded Bug in TaleWorlds.CampaignSystem.dll Unhandled Exception Code 0xC0000005

Users who are viewing this thread

Version number
1.1.2
Branch
Main
Modded/unmodded
Yes, I used mods.

Apollonir

Recruit
Summary: Bug in TaleWorlds.CampaignSystem.dll Unhandled Exception Code 0xC0000005
How to Reproduce: n/a
Have you used cheats and if so which: gave companions more skills to make them good governors or party leaders
Scene Name (if related): n/a
Media (Screenshots & Video): n/a
Computer Specs:
OS: Windows 10
GPU: Nvidia GTX 1650
GPU Driver Version: 31.0.15.3161
CPU: Intel i7 9750H
RAM: 16GB
Motherboard: n/a
Storage Device (HDD/SSD): SSD


Bug in TaleWorlds.CampaignSystem.dll Unhandled Exception Code 0xC0000005

Hi TaleWorlds! Long time fan here, since M&B v0.808 and earlier, when they were still sold on CDs. Finally got my hand on Bannerlord but I came across a game crashing bug around day 550+ in the campaign.

Unfortunately, I can't exactly provide a reproduction scenario for the described problem. Did some debugging by looking into the crash dump and crash logs written by the game. Windows Event Viewer doesn't say anything beyond that the app had an error. It seems to only happen during a war, when armies are created (again, terribly hard to say if it is the kingdom player is part of or others too), and might be exactly when they must make a decision on what to do.

Crash also happens with no mods running and all my investigation leads to a base game problem. Most likely a combination of data causing a scenario that is not handled and crashes the game. Had a look with DnSpy at the code, but it is a bit too much for me without sinking hours into studying it. It could be any party on the map, as I see in the code it iterates through the array of AI mobiles.

The way I was able to work around it when it appeared was by loading up older save games, turn up Better Time to something like 30x speed, and see if it crashed around the same time. It did not. I included the save file to reproduce it by just letting the game run 1-2-3 days on max speed and it should crash.

I see there was a similar bug report, but I am getting a different message at the trace than Elidor did (https://forums.taleworlds.com/index.php?threads/exception-code-0xc0000005.456766/).

Looking forward to your feedback! If any mod might break this then I would appreciate if you can point towards a certain behaviour/type of change that might help me narrow down the mod causing this.


Upload of save and crash files

Unfortunately, the crash uploader keeps telling me that it failed to upload the crash files and to try again. I know it worked once when I had a crash and since then it never worked again. Tried to make it work again by messing with folder permissions, checking files integrity after removing it.. does not work.

Next best thing is to upload the crash logs, dump and save file here: REDACTED. Just got an error I am not allowed to post external links... joy... I can forward the Google Drive link to a support/servicedesk email inbox if one is available.

Feel free to quarantine & scan it if you are concerned about potential malware. It's a ZIP file.


What I tried to fix the issue
  • Repaired/installed latest .NET Framework
  • Checked my RAM with Windows Memory Diagnostic - no issues found
  • Ran sfc scan - no issues found but crash still happening
  • Installed potentially missing dependencies mentioned on the Steam crash checklist
  • Checked integrity of game files via steam
  • Deleted program data folder
  • Deleted bin folder and checked integrity of game files via Steam

This is from the program data logs.
Unhandled Exception Code 0xC0000005 at adress 0x7FFB4259E43B
<#######################################################>

#kernelbase.pdb@{2C446BDD83FED14F819F479BF3DC0B22} (1): 0:183145
#clr.pdb@{B4CFF1ABAC5548739518C3DC8FC0C513} (3): 0:1630921
#clr.pdb@{B4CFF1ABAC5548739518C3DC8FC0C513} (3): 0:1630971
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
@unknown_module@unknown_source (unknown_line): unknown_function
#clr.pdb@{B4CFF1ABAC5548739518C3DC8FC0C513} (3): 0:1636430
#TaleWorlds.Native.pdb@{B6261F99140A4A43A76E73A95C10C627} (1): 0:2133281
#TaleWorlds.Native.pdb@{B6261F99140A4A43A76E73A95C10C627} (1): 0:2133080
#TaleWorlds.Native.pdb@{B6261F99140A4A43A76E73A95C10C627} (1): 0:2136871
#ucrtbase.pdb@{152B3C4F5E1CE0FE6BC36E9F0F2B10E6} (1): 0:138162
#kernel32.pdb@{2398AFDFA1973111E0F9C583A87474F0} (1): 0:95748
#ntdll.pdb@{76C7BBFD419865CA30108FE0023CF040} (1): 0:337569
-----------------------------------------------
#TaleWorlds.DotNet.AutoGenerated.pdb@{EA198E31D02241F487CD5B1B700D5128} (1): 100663315:0
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100672957:0
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100672955:816
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100672941:143
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100672940:45
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100663860:27
#TaleWorlds.CampaignSystem.pdb@{14A335EDF6294D3E93071130E9322A69} (1): 100663855:34


This is from the crash dump generated by the game. I opened it with Visual Studio.
[External Code]
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Party.MobilePartyAi.GetFollowBehavior(ref TaleWorlds.CampaignSystem.Party.AiBehavior shortTermBehavior, ref TaleWorlds.CampaignSystem.Settlements.Settlement shortTermTargetSettlement, ref TaleWorlds.CampaignSystem.Party.MobileParty shortTermTargetParty, TaleWorlds.CampaignSystem.Party.MobileParty followedParty)
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Party.MobilePartyAi.GetBehaviors(out TaleWorlds.CampaignSystem.Party.AiBehavior bestAiBehavior, out TaleWorlds.CampaignSystem.Party.PartyBase behaviorParty, out TaleWorlds.Library.Vec2 bestTargetPoint)
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Party.MobilePartyAi.TickInternal()
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Party.MobilePartyAi.Tick(float dt)
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Campaign.PartiesThink(float dt)
TaleWorlds.CampaignSystem.dll!TaleWorlds.CampaignSystem.Campaign.LateAITickAux()
 
If this is a mod issue, then can you please let me know what to look out for in the mod files to try to narrow down the potential search list? Many thanks! Hints like "mod calling method X in base game files" would be ideal, but more abstract hints would also be welcome over nothing.

Heck, I could even manually edit my save file to get rid of the data combination that makes this possible if I know what to look for.
 
Last edited:
Hey, we do not offer support for the mods or modded games. Can you try to reproduce the issue on a new campaign after manually removing all the mod files and verifying the integrity of the game files. If the issue is persistent on a new, unmodded campaign please let me know.
 
Hey, we do not offer support for the mods or modded games. Can you try to reproduce the issue on a new campaign after manually removing all the mod files and verifying the integrity of the game files. If the issue is persistent on a new, unmodded campaign please let me know.

Hello! Thanks for coming back! Can i reproduce it with a mod called "Better Time"? It allows the player to set a custom time compression. I would need to let the game run for hundreds of days to stand a chance at reproducing this and being able to compress the time more would save me some sanity.

Can you please confirm if this is a valid reproduction scenario or would it be discarded because I used the time compression mod? Cheers!
 
Back
Top Bottom