SWY1985 / CivOne

An open source implementation of Sid Meier's Civilization.
http://www.civone.org/
Creative Commons Zero v1.0 Universal
244 stars 49 forks source link

Saving crashes game #372

Closed axx0 closed 7 years ago

axx0 commented 7 years ago

Autosave or manual save crashes Civone.

SWY1985 commented 7 years ago

I cannot reproduce this. Do you get some kind of error message? Do you get it all the time, or have you discovered something, changed tax/luxury/science rate, attacked some city or had one of your cities taken, anything special?

axx0 commented 7 years ago

Nope, just regularly played the game. I had to turn off autosave because it always crashed at 3000 BC. Regular saves also. I did about 4 playthroughs and it always crashed. I get a message which you usually get when a program stops responding. I'll write what exactly happens when I get back home.

SWY1985 commented 7 years ago

Thank you.

axx0 commented 7 years ago

So, here's a screenshot. Immediately after I press enter I get this:

clipboard02

SWY1985 commented 7 years ago

Unfortunately, the actual error message is further to the top in the console window. This gives me an idea what could go wrong, but I still don't know what's happening.

axx0 commented 7 years ago

OK, I'll try to paste whole message here.

SWY1985 commented 7 years ago

Could you send me all your save files, I think one of the may be corrupt and that's causing this message.

SWY1985 commented 7 years ago

You can mail me at: stefan@civone.com

SWY1985 commented 7 years ago

I have made adjustments to the code to detect corrupt save files and show an appropriate message. It deviates from the original game, which will attempt to load a game no matter what. But I feel this is an improvement to the original game and I hope it fixes the game crash upon saving.

I will build a new preview later today so you can test it.

SWY1985 commented 7 years ago

Possibly related to #343

SWY1985 commented 7 years ago

Can you test the new build?

axx0 commented 7 years ago

It works now, you can close it !

SWY1985 commented 7 years ago

Thank you, I'm glad it worked :-)

axx0 commented 7 years ago

OK, so the game crashed again when I tried to save. Played another game and when I tried saving I saw this: clipboard02

The message of incorrect size appears on the first place, where I tried saving previous game.

SWY1985 commented 7 years ago

Yes, I've implemented two messages:

Once I get save games fully working, it shouldn't happen anymore, but for now it's a good identifier to what's wrong. Please, can you email any corrupt/incorrect save files to me? My email address is: stefan@civone.com Thank you.

axx0 commented 7 years ago

I'll try if it happens again. I overwrote the last corrupted save with a new one.

axx0 commented 7 years ago

I emailed you one file that caused a crash when saving.

EDIT: I got a failure notice when I sent the files: Sorry, we were unable to deliver your message to the following address.

stefan@civone.com: No MX or A records for civone.com

SWY1985 commented 7 years ago

This issue appears to have been solved. The rest of the save game issues will be fixed in #248.