Unpredictable Crash on Turn End

You just saved me many hours of work hunting down a bug I probably wouldn't have been able to find.
General advice: if my modmod is mentioned in relation to a bug report, it might be best for you to ignore the bug report till I state that it had nothing to do with my modmod.
I will make sure to comment on any bug reports where I, or anyone else, suspect my modmod could be the culprit.
THIS is why your modmod needs to be canon.
The bugs it contain is also the reason why it shouldn't be canon, it is not polished enough for inclusion.
 
Last edited:
The bugs it contain is also the reason why it shouldn't be canon, it is not polished enough for inclusion.
It makes it easier when attached to the debugger to spot the nature of the problem though. Had I spend the time under the debugger on this one I'd have only found it to be impossible to get to replicate.

Besides... let's face it. The mod is better with your modmod than without.
 
I fixed an oversight in the onTechAquired python code in my modmod based on your save. I'll upload the new version any moment now.

When revolutions happen a new civ is created, it gets a certain amount of techs awarded one after the other before it gets units or cities.
When python tries to give a free gatherer to the new civ due to it inventing the Gathering tech the code does not find a valid plot to place the gatherer in (no starting plot, capital, or pre-existing units is defined or exist for that civ, all things the python code checks when deciding what plot to place the new gatherer in), so it ended up asking the dll to create the gatherer in coordinates [-1, -1].
The dll never answers this request, so python thinks "WTH" and throws an error about an unspecified C++ error. The onTechAquired function will terminate prematurely but later python code will be completely unaffected by this incident.
This in itself did not trigger the crash, but later on, when the new civ declares war on the civ it revolted from, the game will crash due to what the dll did when it was asked to create a gatherer outside the map.

You're the best, man. Thanks!
 
Back
Top Bottom