long-war-2 / lwotc

Port of Long War 2 to XCOM 2's War of the Chosen expansion
342 stars 89 forks source link

Save games start crashing after 36 kills #600

Closed pledbrook closed 9 months ago

pledbrook commented 5 years ago

Apparently, going past 36 kills seems to break the save files so that they crash on load. Here's a save file on 36 kills:

save_36 kills.zip

Load it up, kill some more aliens, save, and try to load that new save.

pledbrook commented 4 years ago

This appears to be the same bug as #103. It only seems to affect HQ assaults, so I'm wondering if there's an issue with the HQ Assault plots or parcels.

The crash is happening in X2VisibilityObserver.OnVisualizationIdle(), with a call to Ruleset.VisibilityMgr.GetAllViewersOfTarget(TargetState.ObjectID, Viewers, class'XComGameState_BaseObject', -1, class'X2TacticalVisibilityHelpers'.default.LivingGameplayVisibleFilter). A WOTC update says it fixed crashes with GetAllViewersOfTarget(). Since the HQ Assaults are based on LW2 (original XCOM), perhaps it's the maps themselves that need fixing.

Slivicon commented 4 years ago

I don't know if it helps, but I did a defend haven mission with 56 kills and didn't experience any crashes in beta 1, you can see at this timestamp: https://youtu.be/mWDUxIGo9Iw?t=2145

Edit: Just to add to your theory of it only being an issue on HQ assaults.

pledbrook commented 4 years ago

I'm pretty sure at this point that it only happens on the HQ Assault mission, unless someone has a save on a different mission type that exhibits the same crash.

nightmaRok commented 4 years ago

save_Assault_HQ_50_enemies.zip

pledbrook commented 4 years ago

OK, we have a data point! A crash on this map:

Plot_ALB_AlienBase_03_LW
lg_ChipTransmitter_01_LW
lg_CloneStorage_01_LW
md_AdventSecurity_01
md_AdventSecurity_02
md_AdventLandingPad_02
md_AdventLandingPad_03
md_AdventLandingPad_04
Q-Chaos commented 4 years ago

Similar issue. Not 36 kills per se, i think 26 kills. None of the save files are loading.

save_AUTOSAVE- Campaign 41, Mission 113, Turn 112.zip

pledbrook commented 4 years ago

Because I keep forgetting where the issue lies, it's in X2TacticalVisibilityHelpers.GetAllViewersOfTarget(). A WOTC update from Firaxis apparently fixed a bunch of crashes related to this function.

pledbrook commented 4 years ago

Well, apparently I did note where the crash happens and wrote it in an earlier comment. My eyes apparently just skimmed over it. Oh well.

One other thing: the "36 kills" mission is actually Psi Gate, not HQ Assault. So it seems this is not limited to the latter.

pledbrook commented 4 years ago

Another data point (hope I'm not barking up the wrong tree here):

Plot_ALB_AlienBase_01_LW
lg_CloneStorage_01_LW
md_CloneStorage_01
md_AdventSecurity_01
md_AdventSecurity_02
md_AdventLandingPad_01
md_AdventLandingPad_02
md_AdventLandingPad_03
md_AdventLandingPad_04

If I were one to jump to conclusions, I would immediately identify lg_CloneStorage_01_LW as a problem.

pledbrook commented 4 years ago

I've been barking up the wrong tree. I don't think plots or parcels are the issue. In fact, all the "related" crashes I've seen seem to have different causes. The original save file linked in the description does crash in X2GameRulesetVisibilityManager.GetAllViewersOfTarget() for an M3 Shieldbearer, but I have no idea why.

Other crashes appear to be connected with the visualisation system, but different parts of it. If I can identify specific issues, I will try to fix them. But at the moment, most of them are nigh on impossible to diagnose fully and hence fix. And since they seem to have different causes, that's a huge amount of effort for probably not so much gain.

sittingJacks commented 4 years ago

Not sure if my issue is related to this one, but I I thought I would share in case it helps.

I have been consistenly having issues on HQ assaults where after some time on the mission if

  1. I save and exit or
  2. game crashes for whatever reason

I am then unable to load either my custom save, or any of the 3 save files auto created.

The only clues I have are

  1. Large save files (usually on the order of 5-7 mb)
  2. SigSegv memory fault on the crashed thread.

My only recovery option is to go back to the geoscape save and replay the hq assault from start.

I am on beta3, but have had this issue on other beta builds. Runninng macos catalina 10.15.

Happy to share my save file / crash report if it helps with diagnosing the issue.

Crowd292 commented 3 years ago

Same bug on HQ assault

Dump from game with save on drive https://drive.google.com/file/d/1UX5Q8PLLkqoxiKTS9ps9J9FiNrnIF50B/view?usp=sharing

regan32 commented 1 year ago

I have same issue in LWOTC but seems it's caused by graphic settings or visual effers Workaround: is alt + tab while loading save game or make your grathic settings lower

copyrite commented 9 months ago

HQ assault / Defilade bug has been fixed, closing.