MantisBT - VCMI
View Issue Details
0000774VCMIMechanics - Otherpublic2011-07-23 19:352012-02-21 15:49
lssjbrolli 
Tow 
normalmajorrandom
closedfixed 
linuxarchlinux
 
0.88 
0000774: crash on autosave
sometimes it crashes at end day when it autosaves with:

System message: Game has been saved as Autosave_5
sh: line 1: 11156 Segmentation fault /usr/bin/vcmiserver 3030 > server_log.txt
Server finished
Lost connection to server, ending listening thread!
End of file
Something wrong, lost connection while game is still ongoing...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what(): End of file
Aborted

if you try to load that save you get a:

Loading procedure started!
                                                                                                              
Reading save signature: 0
Reading handlers: 60
Warning: very big length: 166255944
CLoadFile
        Opened /home/sega/.vcmi/Games/Autosave_5.vlgm1
        Position: 475244
Segmentation fault
play until crashes
No tags attached.
duplicate of 0000848closed Tow Chance to crash on new month (probably on double-growth month) 
png snapshot1.png (975,332) 2011-07-23 20:19
https://bugs.vcmi.eu/file_download.php?file_id=752&type=bug
png

txt VCMI_Server_log.txt (456,376) 2011-07-25 12:44
https://bugs.vcmi.eu/file_download.php?file_id=754&type=bug
txt VCMI_Client_log.txt (714,816) 2011-07-25 12:44
https://bugs.vcmi.eu/file_download.php?file_id=755&type=bug
? Autosave_1.vlgm1 (577,395) 2011-07-25 12:46
https://bugs.vcmi.eu/file_download.php?file_id=756&type=bug
png snapshot3.png (635,700) 2011-07-25 15:13
https://bugs.vcmi.eu/file_download.php?file_id=757&type=bug
png

txt server_log.txt (15,557) 2011-08-04 19:57
https://bugs.vcmi.eu/file_download.php?file_id=763&type=bug
txt VCMI_Client_log2.txt (597,923) 2011-08-04 19:58
https://bugs.vcmi.eu/file_download.php?file_id=764&type=bug
txt VCMI_Server_log2.txt (128,879) 2011-08-04 19:58
https://bugs.vcmi.eu/file_download.php?file_id=765&type=bug
Issue History
2011-07-23 19:35lssjbrolliNew Issue
2011-07-23 19:58IvanNote Added: 0001867
2011-07-23 20:17lssjbrolliNote Added: 0001868
2011-07-23 20:19lssjbrolliFile Added: snapshot1.png
2011-07-23 20:32lssjbrolliNote Added: 0001869
2011-07-23 20:37lssjbrolliNote Added: 0001870
2011-07-23 20:44lssjbrolliNote Added: 0001871
2011-07-23 21:30IvanNote Added: 0001872
2011-07-23 23:45lssjbrolliNote Added: 0001873
2011-07-24 14:42IvanNote Added: 0001875
2011-07-24 18:44lssjbrolliNote Added: 0001876
2011-07-24 19:19TowNote Added: 0001877
2011-07-25 12:44lssjbrolliNote Added: 0001878
2011-07-25 12:44lssjbrolliFile Added: VCMI_Server_log.txt
2011-07-25 12:44lssjbrolliFile Added: VCMI_Client_log.txt
2011-07-25 12:46lssjbrolliFile Added: Autosave_1.vlgm1
2011-07-25 12:52lssjbrolliNote Added: 0001879
2011-07-25 15:13lssjbrolliNote Added: 0001880
2011-07-25 15:13lssjbrolliFile Added: snapshot3.png
2011-07-25 15:14lssjbrolliNote Added: 0001881
2011-07-25 19:47TowNote Added: 0001882
2011-08-04 19:57lssjbrolliFile Added: server_log.txt
2011-08-04 19:58lssjbrolliFile Added: VCMI_Client_log2.txt
2011-08-04 19:58lssjbrolliFile Added: VCMI_Server_log2.txt
2011-08-04 19:59lssjbrolliNote Added: 0001896
2011-08-04 20:13lssjbrolliNote Added: 0001897
2011-08-04 20:13lssjbrolliNote Added: 0001898
2012-02-21 15:49TowNote Added: 0002214
2012-02-21 15:49TowStatusnew => closed
2012-02-21 15:49TowAssigned To => Tow
2012-02-21 15:49TowResolutionopen => fixed
2012-02-21 15:49TowFixed in Version => 0.89
2012-02-21 15:49TowRelationship addedduplicate of 0000848

Notes
(0001867)
Ivan   
2011-07-23 19:58   
Still nothing...
There may be some specific action you've done on last turn that leads to crash.
Can you reproduce this crash by loading last valid autosave and repeating this turn again?
(0001868)
lssjbrolli   
2011-07-23 20:17   
if i load a privious save i get that message and it stays there for a lot of time.

Loading procedure started!
                                                                                                              
Reading save signature: 0
Reading handlers: 70
Reading gamestate: 100
        Unpacking and handling defs: 90
        Preparing FoW, roads, rivers,borders: 20
        Making object rects: 0
Initing maphandler: 110
Server finished
(0001869)
lssjbrolli   
2011-07-23 20:32   
now even if i start a new game i get the above. Does the game save a state to a temp file that i can delete or something?
(0001870)
lssjbrolli   
2011-07-23 20:37   
nevermind, it seems the server was still running in background even if i killed the client. now i can load the previous save and start new game
(0001871)
lssjbrolli   
2011-07-23 20:44   
loaded privious save and tried all actions now it doesn't crash, i really don't like random things :(
(0001872)
Ivan   
2011-07-23 21:30   
Yeah... Random bugs are really annoying.
I'll try to play this map. How often these crashes happens?
(0001873)
lssjbrolli   
2011-07-23 23:45   
It happens on other maps too, first crash was about 1month and a half.
(0001875)
Ivan   
2011-07-24 14:42   
No crashes after one month of gameplay. Will try to play a bit longer this time.

What versions of g++ and boost you have?
(0001876)
lssjbrolli   
2011-07-24 18:44   
gcc is 4.6.1 and boost 1.46.1
(0001877)
Tow   
2011-07-24 19:19   
Does the server at the moment of crash create a savegame file (*.vlgm1)? If it's not empty, please upload it. Also, what's in the VCMI_Server_log.txt after crash?
Is there any specific pattern when does bug occur? (Eg. just after new month)
(0001878)
lssjbrolli   
2011-07-25 12:44   
yes i will upload save and log. There is no pattern, now even if i didn't do anything just end day it still crash.
(0001879)
lssjbrolli   
2011-07-25 12:52   
first crash in 3,4,4 to 3,4,5 (month, week, day), if i load previous save and end day it does not crash. second crash 5,4,6 to 5,4,7.
(0001880)
lssjbrolli   
2011-07-25 15:13   
i get a crash in win with 0.85 screenshot added, in win server does not make save when crashed
(0001881)
lssjbrolli   
2011-07-25 15:14   
tried 2 different castles(necro and tower) same result.
no action ingame only end day.
(0001882)
Tow   
2011-07-25 19:47   
Thank you for further information. The windows crash issue is 0000759 I guess.

As for the Linux one... it is not related to autosave, the save file looks fine, VCMI crashes after it's already written.

On the other hand, logfiles suggest that crash occurred when turn 85 was starting... that's start a new week, as confirm entries about setting heroes available in taverns and their initial armies. Moreover, it's also start of the new month (turn 85 should be month 3 day 1)... I'd say it's still something in new month or new week handling code. However you say that game also crashes in the middle of week.
Could you also provide us with a logs when such case occurs?
(0001896)
lssjbrolli   
2011-08-04 19:59   
sorry for delay, damn work :(, i've uploaded the logs.
(0001897)
lssjbrolli   
2011-08-04 20:13   
it seems you were right and it is related to 0000759
(0001898)
lssjbrolli   
2011-08-04 20:13   
i saved on 1,4,7 and reloaded until it crashed.
(0002214)
Tow   
2012-02-21 15:49   
I believe it's the same issue as 0000848, that was fixed in r2549.