• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

"Failed to Compress Game Data"

Graceheart the Leopard

Resident Amur leopard
Joined
Sep 24, 2007
Messages
3,476
I keep getting this error with my new Evolution-based mod (again :rolleyes:), and I constantly get the error "failed to compress game data" when the game begins, and every so often during the game, and I have a feeling that this is the reason I get a CTD whenever I try and load a game for this mod. I have another suspicion that the game data compression error has to do with the following error I found in Python Err when the game loads:

Code:
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "RevolutionInit", line 96, in onGameStart
  File "RevolutionInit", line 146, in onGameLoad
  File "BarbarianCiv", line 102, in __init__
  File "SdToolKitCustom", line 292, in sdObjectExists
AttributeError: 'list' object has no attribute 'has_key'
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "AIAutoPlay", line 154, in onGameStart
  File "AIAutoPlay", line 159, in onGameLoad
  File "SdToolKitCustom", line 292, in sdObjectExists
AttributeError: 'list' object has no attribute 'has_key'

Is there any way to fix this? I'll see if I can upload my mod's Python folder.
 
The SdToolKitCustom is used to store values in saves via python (more precisely in the scriptData attributes of objects).
_handleDefaultEvent means python was handling an event probably coming from the SDK.
Therefore, I'm just guessing, maybe the save function in the SDK calls python via an event, python fails or screws up the save via SDTK (the second is not probably), and the whole save function fails.
It would be helpful to know what event was handled. Also, have you any idea what of your changes could have caused that issue? Did you edit the DLL?
 
I didn't edit the DLL, but I'm fairly certain that merging a bunch of CvEventManager files together caused it. I've attached it below. Mind if you look at it?
 

Attachments

The code below
Code:
###################### Popups ####################

is most probably causing the issue (well, at least the python error, not about the corrupted save).

That modcomp (whatever it does) uses the scriptdata attribute of CyGame, which is also used by SdToolkitCustom. It can't be merged with Evolution as it is now. But if you know python you could try to replace the scriptdata storing with SDTK (for examples see BarbarianCiv.py and Revolution.py).

Besides, be careful merging CvEventManager mods with BUG, mods using one of the functions onGameUpdate(), onKbdEvent() or onEndTurnReady() will probably not work correctly.
 
Okay, it looks like that wasn't the issue. Also, the save games still crash. Do you mind if I just send the entire mod for you to look at?
 
Did you search for other occurrences of "setScriptData" in you files?

Another method would be to remove the components you merged one by one, that would lead at least to the source of the problem, and one may be able to help you just reading that code.

If you still can't find the issue, I'm willing to look at it, if it's based on Evolution you could just upload your changes and point me to the version of Evolution you used as a base.
 
Back
Top Bottom