Closed LoneGazebo closed 8 years ago
Seems a key variable is not being refreshed properly on restart. Fixing this might also fix multiplayer issues with desyncs on save/load (as the logic seems to be the same).
G
wow, a picture story!
i got one of my own too:
stack overflow!
seriously, i'll try to reproduce ...
Yay, those are fun. Is that due to something you've done recently, or is it a problem already in the DLL?
G
didn't touch it. i think i have a fix, but it's hard to verify, was a strange configuration with multiple masters and vassals.
reproduced your issue and it seems gGlobals.m_map is not initialized. the hunt is on
Ah, I didn't look at that element when trying to debug. Admittedly my glance was cursory (I've been a wee bit busy as of late). Sorry for tossing it on you!
i do enjoy a good puzzle now and then :)
unfortunately, it seems there's little to be done about it (on dll side at least). CvGame::InitMap() is just never called in the bad case. The correct entry point would be CvDllGame::Init2()
Hmm...so the initialization isn't being called in our DLL? If that's the case, then why does our DLL (but not other custom DLLs) crash on restart? Any way we can force initmap into our initialization? G
I'm going to spelunk a bit as well.
after sleeping over it, i may have been looking in the wrong place.
initPlayers() leads to the crash and it's called before initMap().
need to investigate some more
ok, i think i got it. flavor manager was re-initialized before the old cities have been cleared
Odd! Was that a CP change, or standard?
Ilterioi,
I've pinpointed the crash on restart/settle or settle/restart to here (see gallery for callstack below), but I can't quite get it to not crash. I've fiddled some, but not much. In any case, you can reproduce by starting a game, using restart button, settling, and then using restart button again (any combination should probably cause it.