MantisBT - VCMI
View Issue Details
0001187VCMIGUI - Adventure Mappublic2013-01-25 07:182014-05-30 17:41
Warmonger 
Warmonger 
highblocksometimes
closedfixed 
 
0.910.91 
0001187: Crash at new week at some maps
Game crashes at new wek when human player should get a turn. There is some issue with drawing interface.
It seems to be reproductible only on certain set of maps. Use Jebus attached to 0001180 for example, just pass turns as first or second player.
No tags attached.
Issue History
2013-01-25 07:18WarmongerNew Issue
2013-01-25 08:12TowNote Added: 0003321
2013-01-25 08:12TowNote Edited: 0003321bug_revision_view_page.php?bugnote_id=3321#r2103
2013-01-25 08:13TowAssigned To => Ivan
2013-01-25 08:13TowStatusnew => assigned
2013-01-25 13:24IvanNote Added: 0003325
2013-01-25 14:40WarmongerNote Added: 0003326
2013-01-25 14:40WarmongerStatusassigned => resolved
2013-01-25 14:40WarmongerFixed in Version => 0.91
2013-01-25 14:40WarmongerResolutionopen => fixed
2013-01-25 14:40WarmongerAssigned ToIvan => Warmonger
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0003321)
Tow   
2013-01-25 08:12   
Seems to be broken by r3052. http://sourceforge.net/apps/trac/vcmi/changeset/3052#file1 [^]
 CPlayerInterace.cpp, lines 2428+:
void CPlayerInterface::playerStartsTurn(ui8 player)
{
    EVENT_HANDLER_CALLED_BY_CLIENT;
    if (GH.listInt.empty() || GH.listInt.front() != adventureInt)
    {
        GH.popInts(GH.listInt.size());
        GH.pushInt(adventureInt);
    }
    //...


Original code was: if there is no interface, push adventure map.
Now it is: remove and delete all interfaces and put adventure map. When there is a new week dialog, it is destroyed, then underlying adventure map is destroyed, then it is pushed back (but it's already a dangling pointer).

Why do we want remove interfaces at the start of the new turn at all? This will affect new turn dialogs.

(0003325)
Ivan   
2013-01-25 13:24   
That check should have triggered only on game start (or game loading) to remove pregame interface. Second part of check is incorrect - should be listInt.back()
(0003326)
Warmonger   
2013-01-25 14:40   
Fixed in r3127.