LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
285 stars 158 forks source link

4.8.1 Consistent crashes upon loading a savegame #10987

Closed randomnublet closed 3 months ago

randomnublet commented 3 months ago

Latest VP beta, with 34uc mod.

I can play the game just fine, but if I try to reload a turn, or exit/restart the game and load any recent save I istantly crash to desktop. I took a break at turn 80, I can load back the turn 0 autosave and a turn 33 save but anything after that is instant crash. Never happened in any previous VP version (so...10 years? but I only recently started play with 34uc) hence no clue what's going on.

Dido_0080 BC-0875.zip Logs.zip

artemigkh commented 3 months ago

Same problem here, can't load any save after turn 30 or so. Stack trace points to CvSerialize.h.

Here's a save that reproduces the problem Hiawatha_0124 AD-0225.zip

Mod list:

Alternatively, link to full mod folder to load save (too large to upload as github attach): https://drive.google.com/file/d/17OpbPHZp0jL5bWABtIrPHyG9vDd9Cz2s/view?usp=sharing

azum4roll commented 3 months ago

What's the full stack trace? There must be some variable that's not serialized but is being loaded.

artemigkh commented 3 months ago

I don't know, the gamecore is right below it on the stacktrace

tomekpa commented 3 months ago

Hi guys, same issue here, played normally, took unecesarry joint war, wanted to load few turns later, to un-do, but couldnt. I tried to go back like 10-20ish turns, but result the same.. ctd.. CvMiniDump.dmp save log folder

MODS: '(1) Community Patch'/ '(2) Vox Populi'/ '(3a) VP - EUI Compatibility Files'/ '(4a) Squads for VP'/ '(Z) Change VP Options (v 3)'/ 'Convert Caravans and Cargo Ships (v 4)'/ 'Global - Pro-rata Buildings Purchase (v 2)'/ 'UI - Enhanced Demographics (v 6)'/

VP options, only initial game settings and civilisation exclusions

EDIT: This game, the game broke around settling 3-4th city about turn 65. Last game i was able to load game at turn 99, just before settling 5-6th city. EDIT: This game, i played standard size, but increased the number of AI-s by 2

CivLoadSaveCrush1.zip

dinwkey commented 3 months ago

image attach debugger with compiled dll using latest master commit (up to fix Carthage UA not counting exported luxuries (#10988))

dinwkey commented 3 months ago

setting breakpoint indicate it fail in CvMap::Read during Serialize(*this, serialVisitor); https://github.com/LoneGazebo/Community-Patch-DLL/blob/master/CvGameCoreDLL_Expansion2/CvMap.cpp#L1675 image

dinwkey commented 3 months ago

narrowing down to https://github.com/LoneGazebo/Community-Patch-DLL/blob/master/CvGameCoreDLL_Expansion2/CvMap.cpp#L1636-L1650 but that can be tedious to figure which plot has issue since i played on earth map

dinwkey commented 3 months ago

it failed on a FLAT plot after visitor(plot.m_vInvisibleVisibilityUnitCount) in CvPlot https://github.com/LoneGazebo/Community-Patch-DLL/blob/master/CvGameCoreDLL_Expansion2/CvPlot.cpp#L13427

azum4roll commented 3 months ago

Weird. That vector should be empty most of the time, no?

It's likely @KungCheops's river stuff though.

dinwkey commented 3 months ago

i suspect it has to do with Carthage UA change but still looking into. it seems to failed to load save game after i discover Carthage in game

artemigkh commented 3 months ago

I doubt it's Carthage specific, she wasn't in my game and it's still reproduced reliably

I also had the same bug while playtesting a version over 2 weeks ago so seems likely the problem was introduced before 05/31

axatin commented 3 months ago

I also had the same bug while playtesting a version over 2 weeks ago so seems likely the problem was introduced before 05/31

I played a full game after I had implemented all my changes (after commit https://github.com/LoneGazebo/Community-Patch-DLL/commit/c2f3c4d4a66294eb7fcf75fc3298a14925949056, 05/12) and didn't have the bug back then