I have the same issue and are clueless to what happens. I managed to get it to crash with the debugger attached, but that didn't help me much as the crash happens in the exe. My guess is that it is trying to free memory, which has already been freed. I think the only way to figure out what actually goes on is to read the assembler code in the lines around the crashing line in the exe. My guess is that we will just have to accept this crash. It's not critical though as it only happens while the game shuts down, not during gameplay. No savegames or other data is lost in the crash.
I test my uploaded RECONSTRUCTION version and there is no crash, all works perfect, but in this new version which i am making i get this crash.
I think that problem is in SDK. In one test merging, i was merged Reconstruction source code + capture city art style SDK mod component and i was get same problem like here.
Maybe is Visual Studio wrong installed. Maybe to reinstall them, i really don't know, i have qt add-on for C++ in VS.
Complete list what i do in this new version, and what of that can cause bug:
- I add new CIVIC_OPTION and add 3 new CIVICs
- I write some my code in CvGameUtilsReconstruction.py (total same as CvGameUtils.py but i add my code here, and i haven't file CvGameUtils.py in my mod because i have BUG mod component, there is some steps which you must do if you want to use CvGameUtils.py or SomeYourCvGameUtils.py if you have BUG mod component, for more info see
HERE).
- I set in PythonCallbackDefines.xml
Code:
<Define>
<DefineName>USE_CANNOT_DO_CIVIC_CALLBACK</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
- i add several new units in mod and edit lots of texture and effects and make lots of new buttons for units you can see this
HERE and all my textures are DXT3 for units and buttons and DXT5 for effects and all are .dds
- i changed position of technologies in my tech-tree, because all was scattered.
- i add new SDK, i merged Fear from FFH2 source code and add one new promotion which use FEAR.
- i add several new promotions, some of them are classic like +15 strength or +30attack on features or defence, and several medic promotions, and i add several python promotions.
- My mod is based on Legends of Revolution source code, i am nothing remove from source, i just add new mod components.
- I use LoR sdk ability to make some units obsolete and i set that on lots of units.
- i think that is all.
- What i will do? I will compile again RECONSTRUCTION source code from uploaded version, and remove this fear promotion and test all without this new SDK add on.
Next test will be, remove Fear promotion and just copy RELEASE .dll from uploaded RECONSTRUCTION, and i will see, if i get crash again problem in Visual Studio or in some non-SDK component.
I will post result here, my think that this crash is some our mistake in SDK.