MantisBT - VCMI
View Issue Details
0001002VCMIAI - Adventure Mappublic2012-06-13 20:002012-06-23 15:57
douggie_m 
 
normalmajorrandom
closedduplicate 
PowerPCGNU/Linux
 
 
0001002: Unexpected behavior when AI loses its hero
When you kill AI's hero, game may crash on AI turn:

----------------------------------------
Player 1 starting turn
System message: You are not allowed to perform this action!
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 255info!
vcmiclient: CGameState.cpp:2740: void CPathfinder::calculatePaths(int3, int): Assertion `hero == getHero(hero->id)' failed.
Aborted
----------------------------------------
Looks like it occurs randomly.

Saved game to re-produce this issue is attached. Load it and just end turn.
No tags attached.
duplicate of 0000954closed Tow AI crashes after losing hero on enemy's turn 
duplicate of 0000998closed  Cannot find player info 
bz2 dungeon_keeper_2.saved_game.tar.bz2 (103,996) 2012-06-13 20:00
https://bugs.vcmi.eu/file_download.php?file_id=962&type=bug
Issue History
2012-06-13 20:00douggie_mNew Issue
2012-06-13 20:00douggie_mStatusnew => assigned
2012-06-13 20:00douggie_mAssigned To => Tow
2012-06-13 20:00douggie_mFile Added: dungeon_keeper_2.saved_game.tar.bz2
2012-06-13 20:03WarmongerNote Added: 0002673
2012-06-13 20:03WarmongerRelationship addedduplicate of 0000954
2012-06-13 20:03WarmongerRelationship addedduplicate of 0000998
2012-06-14 15:16douggie_mNote Added: 0002675
2012-06-14 15:22WarmongerNote Added: 0002676
2012-06-14 15:27douggie_mNote Added: 0002677
2012-06-23 15:57IvanNote Added: 0002767
2012-06-23 15:57IvanStatusassigned => closed
2012-06-23 15:57IvanAssigned ToTow =>
2012-06-23 15:57IvanResolutionopen => duplicate

Notes
(0002673)
Warmonger   
2012-06-13 20:03   
Duplicate of 0000954 & 0000998.
(0002675)
douggie_m   
2012-06-14 15:16   
> Duplicate of 0000954 & 0000998.

Ah, so other guys found this too. I supposed it is so rare, so...

Sorry for dupe.

And that saved game which I've uploaded doesn't reproduce this bug. It looks like you need to kill some hero (I believe it shall be AI's starting one) and finish the turn without saving/loading after that. Real magic, yeah.
(0002676)
Warmonger   
2012-06-14 15:22   
AI state is currently not saved, so after reload it may behave totally different.
(0002677)
douggie_m   
2012-06-14 15:27   
> AI state is currently not saved, so after reload it may behave totally different.

Ah, okay. So I do confirm: when you save game after killing AI's hero, and the game crashes after that, just load that savegame and 99% chance it would be okay.
(0002767)
Ivan   
2012-06-23 15:57   
Closing duplicates