MantisBT - VCMI
View Issue Details
0000261VCMIMechanics - Adventure Mappublic2009-11-30 13:592010-06-02 00:13
Steven Aus 
Tow 
normalcrashalways
closedfixed 
0.74c 
 
0000261: Crash when doing anything on new turn.
It initially happened in Windows 7, then I tried it in Win XP SP3 as well. I initially thought it was due to picking up a treasure chest, but subsequent tests showed that it happened no matter what you did on the next turn.

Attached are one of the sets of crash dumps and logs, and also the saved game that always seems to produce the crashes on doing anything on the adventure map the next game turn.

Hopefully we can figure out what causes this repeatable crash, as I haven't come across a crash in 0.74c that could not be avoided in some way (apart from castle battle crashes, but I guess they can be avoided in the current development version of the game by not attacking castles ;).
No tags attached.
7z VCMI-RepeatableCrash.7z (222,692) 2009-11-30 13:59
https://bugs.vcmi.eu/file_download.php?file_id=119&type=bug
7z VCMI-RepeatableCrash-Zam.7z (77,614) 2009-12-01 00:42
https://bugs.vcmi.eu/file_download.php?file_id=124&type=bug
Issue History
2009-11-30 13:59Steven AusNew Issue
2009-11-30 13:59Steven AusFile Added: VCMI-RepeatableCrash.7z
2009-11-30 15:06OnionKnightNote Added: 0000323
2009-11-30 15:30ZamolxisSticky IssueNo => Yes
2009-11-30 15:34ZamolxisNote Added: 0000324
2009-12-01 00:42ZamolxisFile Added: VCMI-RepeatableCrash-Zam.7z
2009-12-01 00:44ZamolxisNote Edited: 0000324bug_revision_view_page.php?bugnote_id=324#r423
2009-12-01 00:46ZamolxisNote Edited: 0000324bug_revision_view_page.php?bugnote_id=324#r424
2009-12-01 02:29Steven AusNote Added: 0000333
2009-12-01 11:39OnionKnightNote Added: 0000338
2009-12-01 21:12TowStatusnew => assigned
2009-12-01 21:12TowAssigned To => Tow
2009-12-01 21:14TowNote Added: 0000343
2009-12-01 21:14TowStatusassigned => resolved
2009-12-01 21:14TowResolutionopen => fixed
2009-12-01 21:20ZamolxisSticky IssueYes => No
2010-06-02 00:13ZamolxisNote Added: 0000917
2010-06-02 00:13ZamolxisStatusresolved => closed

Notes
(0000323)
OnionKnight   
2009-11-30 15:06   
Looks like it has to do with saving (the autosave I presume) on the new turn. I haven't looked into the serialization process much so I can't fix it personally, looks like corrupted data somewhere as it fails on memcpy.
(0000324)
Zamolxis   
2009-11-30 15:34   
(edited on: 2009-12-01 00:46)
I've made it a sticky, however it's strange that I can't reproduce it. I've loaded a saved game, hit end turn, had some battles, then end turn again, then built in town and few more battles, but still nothing also after the next end turn.

EDIT: I've managed to reproduce it with your save on my machine. With one difference though: for me it crashes immediately after I give the End Turn command, so no need to do something as you mention in your report. Because of that, I'm attaching my log reports as well for this crash (just in case - but if they are not necessary, a dev can delete them). Though after the crash pop-up, we can still set paths in the game for example (just not follow them). Maybe you were referring to that.

(0000333)
Steven Aus   
2009-12-01 02:29   
For me, I can do what I like on the save before I end turn, it doesn't crash then. However, on the new turn, with any hero, clicking on any square on the adventure map causes a crash every time. You can interact with the town fine, but you can't do anything on the adventure map without the game crashing. Which kind of limits your progress in the map. ;-)
(0000338)
OnionKnight   
2009-12-01 11:39   
I'm using a debug build so things are likely different, crashing more early. For me it crashes pretty much the moment after you end turn, I can move the cursor for a second or so.
(0000343)
Tow   
2009-12-01 21:14   
The line:
h & availableHeroes[i]->subID;
in PlayerState serialzie method was crashing, because one of availableHeroes pointers was NULL.
I've added (not tested) handling for that situation in r1379. It may work, and definitely won't be worse than current crash behaviour. I'm not sure if we should allow adding empty pointers to availableHeroes vector. (no heroes => no pointers in vector is more logic imho).

I mark it as resoved for now, if the problem reoccurs please reopen this ticket.
(0000917)
Zamolxis   
2010-06-02 00:13   
I see this hasn't been reopen in half a year so it must be fully solved. Closed.