MantisBT - VCMI
View Issue Details
0001177VCMIGUI - Adventure Mappublic2013-01-20 14:512014-05-30 17:41
beegee 
Ivan 
highcrashalways
closedfixed 
 
0.91 
0001177: Crash when returning to main menu from adv map
Game crashes when you want to switch/go back to main menu from the adventure map.
Stacktrace:
CModHandler.cpp at line 360 in CModHandler->reload()
CMT.cpp at line 801 in listenForEvents()
...

Problem is that townInfos[town.first] is null. This is the line where it crashes:
townInfos[town.first]->name = cientInfo.advMapCastle;
No tags attached.
Issue History
2013-01-20 14:51beegeeNew Issue
2013-01-20 21:43IvanAssigned To => Ivan
2013-01-20 21:43IvanStatusnew => assigned
2013-01-20 22:53IvanNote Added: 0003291
2013-01-20 22:53IvanAssigned ToIvan =>
2013-01-20 22:54IvanStatusassigned => feedback
2013-01-21 19:25beegeeNote Added: 0003293
2013-01-21 19:25beegeeStatusfeedback => new
2013-01-21 19:25beegeeStatusnew => resolved
2013-01-21 19:25beegeeFixed in Version => 0.dev
2013-01-21 19:25beegeeResolutionopen => fixed
2013-01-21 19:25beegeeAssigned To => Ivan
2013-02-01 14:12WarmongerProduct Version0.dev => 0.91
2013-02-01 14:12WarmongerProduct Version0.91 => 0.dev
2013-02-01 14:12WarmongerFixed in Version0.dev => 0.91
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0003291)
Ivan   
2013-01-20 22:53   
Found it. But how modHandler::reload worked all this time?

listenForEvents does not updates pointer in VLC (which is used by modHander). As result game crashes as soon as it reaches deallocated memory block.

Should be fixed (as in "does not crashes") with rev 3113 but maybe there is a better fix than this:
http://sourceforge.net/apps/trac/vcmi/changeset/3113/trunk/client/CMT.cpp [^]
(0003293)
beegee   
2013-01-21 19:25   
Thanks, seems to be fixed.