MantisBT - VCMI
View Issue Details
0002479VCMIAI - Adventure Mappublic2016-09-16 01:382022-04-12 11:04
SXX 
SXX 
normalcrashalways
closedfixed 
0.98g 
0.99 
0002479: VCAI::performTypicalActions: crash when attempt to use removed hero
Problem occur because in that function getUnblockedHeroes called here once and resulting vector actually remain there for all AI turn duration. Within turn hero might get killed and of course when AI try to use removed hero game crashing.

First I though there is some race condition, but actually it's looks like problem occur due to lack of checks.

What bother me the most is that is why we didn't catch this one before since I run a lot of games and only now I got reproducible crash. I suppose this can be related to both fixed RMG or fact that AI just not usually lose heroes on it's turn.
No tags attached.
zip BUG_2479_CRASH_VCAI.zip (1,666,178) 2016-09-16 01:38
https://bugs.vcmi.eu/file_download.php?file_id=2522&type=bug
Issue History
2016-09-16 01:38SXXNew Issue
2016-09-16 01:38SXXStatusnew => assigned
2016-09-16 01:38SXXAssigned To => SXX
2016-09-16 01:38SXXFile Added: BUG_2479_CRASH_VCAI.zip
2016-09-16 01:57SXXNote Added: 0006676
2016-09-16 01:57SXXStatusassigned => resolved
2016-09-16 01:57SXXFixed in Version => 0.99
2016-09-16 01:57SXXResolutionopen => fixed
2022-04-12 11:04PovelitelStatusresolved => closed

Notes
(0006676)
SXX   
2016-09-16 01:57   
Applied fix:
https://github.com/vcmi/vcmi/commit/30042cac3d5ede31155ca98e0c1294dcaff7e05b [^]