MantisBT - VCMI
View Issue Details
0001076VCMIAI - Adventure Mappublic2012-09-18 17:402012-09-28 16:44
deecee 
Tow 
normalcrashsometimes
closedduplicate 
PC, x64Debian GNU/Linux (wheezy/sid)latest unstable
0.89 
0.9 
0001076: Game crashes when AI is playing
Game consistently crashes when player 3 (AI) starts playing.
Load attached saved game. Finish turn. It crashes.
I get the same problem regardless of whether I download the .deb package on the "Installation on Linux" page, or if I compile from the source on the same page.
No tags attached.
duplicate of 0001037closed Warmonger Stack component causes crash 
has duplicate 0000955closed Tow Rare crash when AI attacks creature bank 
tgz bug.tgz (218,595) 2012-09-18 17:40
https://bugs.vcmi.eu/file_download.php?file_id=1077&type=bug
jpg 2012-09-19_AiturnCrash089b.jpg (156,783) 2012-09-19 00:13
https://bugs.vcmi.eu/file_download.php?file_id=1078&type=bug
jpg

7z 2012-09-19_AiturnCrash089b.7z (132,512) 2012-09-19 00:13
https://bugs.vcmi.eu/file_download.php?file_id=1079&type=bug
Issue History
2012-09-18 17:40deeceeNew Issue
2012-09-18 17:40deeceeStatusnew => assigned
2012-09-18 17:40deeceeAssigned To => Tow
2012-09-18 17:40deeceeFile Added: bug.tgz
2012-09-19 00:13ZamolxisFile Added: 2012-09-19_AiturnCrash089b.jpg
2012-09-19 00:13ZamolxisFile Added: 2012-09-19_AiturnCrash089b.7z
2012-09-19 00:15ZamolxisNote Added: 0003018
2012-09-19 00:16ZamolxisNote Edited: 0003018bug_revision_view_page.php?bugnote_id=3018#r1906
2012-09-28 05:18ZamolxisNote Added: 0003054
2012-09-28 05:18ZamolxisReproducibilityalways => sometimes
2012-09-28 05:46WarmongerNote Added: 0003055
2012-09-28 09:08WarmongerRelationship addedhas duplicate 0000955
2012-09-28 16:44TowNote Added: 0003066
2012-09-28 16:44TowStatusassigned => closed
2012-09-28 16:44TowResolutionopen => duplicate
2012-09-28 16:44TowFixed in Version => 0.9
2012-09-28 16:44TowRelationship addedduplicate of 0001037

Notes
(0003018)
Zamolxis   
2012-09-19 00:15   
(edited on: 2012-09-19 00:16)
I'm not sure if it's the same cause, but I am able to easily reproduce a crash on AI turn in both 0.89 and 0.89b, by loading the map from 0001063 and hitting End Turn: game always crashes at the end of Green Player's turn (could be due to an action of its last hero moving, or maybe even related to the next color player). See screenshot and attached dump.

(0003054)
Zamolxis   
2012-09-28 05:18   
Strange. After 3-4 attempts in 0.89 & 0.89b, the game crashed every time on Green player's turn last week. However when I tried again today, again 3-4 times in a row, the game never crashed (for the same map). Hopefully the crashdump will reveal something, but I'm changing reproducibility to 'sometimes' (at least until someone identifies a pattern).
(0003055)
Warmonger   
2012-09-28 05:46   
This bug is present in StupidAI at line 160:

if(distToNearestNeighbour(ei.s->position, dists) < GameConstants::BFIELD_SIZE)

Actually, it causes most of AI crashes now.
(0003066)
Tow   
2012-09-28 16:44   
The issue originally reported by deecee actually was the duplicate to 0001037 and is already fixed by Warmonger.
The bug observed by Zamolxis is 0000955 which is caused by 0001053.

I'm closing this as a duplicate, original issue has been fixed.