Resolved General 1.6.5 Endless freeze on campaign map

Users who are viewing this thread

Version number
1.6.5
Branch
Main
Modded/unmodded
Modded

irish09

Recruit
Ever since updating from 1.6.2 to 1.6.5, our modded main map has started having a freezing issue. After playing for a seemingly random amount of time in sandbox or campaign mode (anywhere from 3 seconds to over 10 minutes), the game will permanently freeze. We're not 100% sure if it's permanent, but we have tried letting the game run for an hour after the freeze to see if it will unfreeze. This has not proven successful. These freezes seem limited to the campaign map, I have not had any issues in other scenes. I cannot submit a crash report or use dnSpy to identify an error, as there is no actual crash. In fact, closing out of the game when it's frozen in this state does not actually stop the Bannerlord process and I have to use the Task Manager to fully end it.

Until recently, I believed this was related to some asset or code errors on our team's modded main map. However, other modding teams have discussed the exact same issue with me and we cannot figure out why it happens nor how to fix it. Apparently this issue persists in 1.7.0, although I have not tested it myself.

The only partial fix I've found to it is deleting the modded main map's shader cache folder and launching a new campaign. This seems to stop any freezes. However, the issue will persist after a new shader cache is generated. After this point, the game will continue to permanently freeze on the campaign map.
 
On behalf of the Old Realms mod, we can confirm everything that has been reported by irish.
Symptoms: random freezes on the campaign map with seemingly no way to reliably reproduce it. It doesn't matter if the mainparty is walking around, or resting in a settlement. Doesn't matter if the player interacts with the game (zoom in-out, scroll screen for example) or not even touching the mouse and keyboard, it happens consistently - with a varying timeframe. Sometimes 1 minute in a game session, sometimes 10 minutes or more. The freeze is not just a long shader cache compilation as we have waited for over 2 hours to see if it would unfreeze, but it did not.
The freeze is an application level hangup, the operating system does not freeze, and the mouse cursor works in the game (it moves across the screen), but other than that the game is completely unresponsive. You can't click on anything, and no entities move on the world map, particle systems are frozen etc.
We have never experienced the freeze occuring while in a mission. Custom Battle is also unaffected.
At first I also believed it was perhaps due to only me, possibly a hardware failure. Then more members on the mod team started to have it as they upgraded to 1.6.5 as well.
The issue persists on 1.7.0 - I have personally tested it.
We tried running memory profiling but found no outstanding issues there.

At this point, we are at a complete loss as to how to approach a possible fix for this - or even if it is our fault (our code, assets etc.) or vanilla.

I have contacted muret on Discord about this issue, and sent him a complete application dump in the frozen state as per his request.
 
Last edited:
We have resolved the issue however this definitely still needs attention from Talesworld.

In 1.6.5, a great deal of changes were made to tournaments. Let's take a look at some of these changes.
Tournaments are now auto-simulated after 15 days without player interaction.
Non-hero troop distribution has been changed to around 40% Tier 3 troops, 40% Tier 4 troops and 20% Tier 5 troops in both tournaments and practice fights.
If there aren’t enough troops to hold this condition in the garrison, the remaining slots are filled with random Tier 3-5 troops.
Prior to 1.6.5, it was not a problem to have a culture with troops that only go up to tier one or two. However since 1.6.5, it is necessary for all cultures that own a settlement to go up to tier three (maybe five?) or else this will create a deadloop in the code, the same as the one detailed below by our head programmer.

When a tournament is going to start, the game will try to gather 16 participants. It searches from garrisons and heroes in the town first. If these aren't enough, the game will try to place some upgraded troops of the basic troop of the culture of the town. When my game froze, it was trapped in a dead-loop for gathering participants in Underground Geyser Center, where the culture is Youkai. The basic troop of Youkai is youkai_recruit, who has no upgraded troops.
At the very least this requires a hazard warning, because this potentially affects every culture's custom troop trees and it's very difficult to locate this error. Our modding team, which has around 6 active programmers, and the Old Realm's, which must have a decent number of programmers as well, were unable to locate this bug for months. I can easily see other development teams encountering this issue as they come further along in the development of their mod. Thank you for listening :smile:
 
We have resolved the issue however this definitely still needs attention from Talesworld.

In 1.6.5, a great deal of changes were made to tournaments. Let's take a look at some of these changes.

Prior to 1.6.5, it was not a problem to have a culture with troops that only go up to tier one or two. However since 1.6.5, it is necessary for all cultures that own a settlement to go up to tier three (maybe five?) or else this will create a deadloop in the code, the same as the one detailed below by our head programmer.


At the very least this requires a hazard warning, because this potentially affects every culture's custom troop trees and it's very difficult to locate this error. Our modding team, which has around 6 active programmers, and the Old Realm's, which must have a decent number of programmers as well, were unable to locate this bug for months. I can easily see other development teams encountering this issue as they come further along in the development of their mod. Thank you for listening :smile:
Thank you for your further feedback and for researching this issue. We'll look into it.
 
Back
Top Bottom