MantisBT - VCMI
View Issue Details
0001435VCMIGUI - Battlespublic2013-09-05 00:572014-06-22 15:02
Povelitel 
Tow 
highcrashalways
closedfixed 
windowsxpsp3
0.93b 
0.94 
0001435: crash turn AI
end turn
No tags attached.
has duplicate 0001433closed Tow crash turn AI 
rar AI.rar (781,081) 2013-09-05 00:57
https://bugs.vcmi.eu/file_download.php?file_id=1449&type=bug
Issue History
2013-09-05 00:57PovelitelNew Issue
2013-09-05 00:57PovelitelStatusnew => assigned
2013-09-05 00:57PovelitelAssigned To => Tow
2013-09-05 00:57PovelitelFile Added: AI.rar
2013-09-08 16:10TowNote Added: 0003965
2013-09-08 16:10TowStatusassigned => confirmed
2013-09-08 16:23TowRelationship addedhas duplicate 0001433
2013-09-10 23:35TowNote Added: 0003990
2013-09-11 22:00TowNote Added: 0004003
2013-09-11 22:00TowStatusconfirmed => resolved
2013-09-11 22:00TowFixed in Version => 0.94
2013-09-11 22:00TowResolutionopen => fixed
2013-09-11 22:01TowCategoryAI - Adventure Map => GUI - Battles
2014-06-22 13:36PovelitelNote Added: 0004768
2014-06-22 15:02KantorNote Added: 0004786
2014-06-22 15:02KantorStatusresolved => closed

Notes
(0003965)
Tow   
2013-09-08 16:10   
Crash happens in CBattleInterface::spellCast

Offending line:
boost::algorithm::replace_first(text, "%s", CGI->creh->creatures[sc->attackerType]->namePl); //casting stack
when BattleSpellCast object has attackerType set to -1.
(0003990)
Tow   
2013-09-10 23:35   
I have fix for this to make the issue non-crashing, will commit this before the next build.
(0004003)
Tow   
2013-09-11 22:00   
Worked around in r3544.

The issue is realted to Armor of the Damned casting spells at the beginning of the battle.
The battle GUI doesn't know the caster (not a hero and not a creature) and crashed on attempts of formatting console log message. Now a placeholder name will be used.
Eventually we will need to provide better info about caster (possibly an artifact).
(0004768)
Povelitel   
2014-06-22 13:36   
Kantor, look, can can close them?
(0004786)
Kantor   
2014-06-22 15:02   
This one may be closed.