MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000955VCMIAI - Adventure Mappublic2012-05-09 08:062014-05-30 17:43
ReporterWarmonger 
Assigned ToTow 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformPCOSWindows 7OS VersionSP1
Product Version0.88 
Target Version0.89Fixed in Version0.93 
Summary0000955: Rare crash when AI attacks creature bank
DescriptionSometimes (like 1 in a 100) AI will cause crash when attacking creature bank. It happens randomly, but still.
Additional InformationDebugger pointed at this line in StupidAI:

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

However, that was caught in RD mode and can be not precise.
TagsNo tags attached.
Attached Filesrar file icon Bug955.rar [^] (263,203 bytes) 2012-09-28 19:35

- Relationships
duplicate of 0001076closedTow Game crashes when AI is playing 
child of 0001053closedTow Battle continues after AI clears Bank 

-  Notes
(0002416)
Zamolxis (viewer)
2012-05-09 17:57
edited on: 2012-08-31 16:34

Could it be at the end of daily movement? I believe I had it on my own hero and was even reproducible (I'll do more tests when I find time to write a report).

(0003063)
Warmonger (administrator)
2012-09-28 11:48
edited on: 2012-09-28 11:50

With latest changes, game crashes at
assert(enemiesUnreachable.size());

Looks like consequence of 0001053 - after clearing bank, AI attacks it again and finds empty battlefield.

CBattleAI [0E147F90]: activeStack called for Battle stack [6]: 9 creat
ures of Skeletons from slot 4 of armyobj=5201
CStupidAI [0E85D6F8]: actionStarted called
CBattleAI [0E147F90]: actionStarted called
CStupidAI [0E85D6F8]: battleStackMoved called
CBattleAI [0E147F90]: battleStackMoved called
CStupidAI [0E85D6F8]: battleAttack called
CBattleAI [0E147F90]: battleAttack called
CStupidAI [0E85D6F8]: battleStacksAttacked called
CBattleAI [0E147F90]: battleStacksAttacked called
CStupidAI [0E85D6F8]: battleAttack called
CBattleAI [0E147F90]: battleAttack called
CStupidAI [0E85D6F8]: battleStacksAttacked called
CBattleAI [0E147F90]: battleStacksAttacked called
CStupidAI [0E85D6F8]: actionFinished called
CBattleAI [0E147F90]: actionFinished called
CStupidAI [0E85D6F8]: activeStack called for Battle stack [1]: 84 crea
tures of Archers from slot 1 of armyobj=6214
CStupidAI [0E85D6F8]: actionStarted called
CBattleAI [0E147F90]: actionStarted called
CStupidAI [0E85D6F8]: battleAttack called
CBattleAI [0E147F90]: battleAttack called
CStupidAI [0E85D6F8]: battleStacksAttacked called
CBattleAI [0E147F90]: battleStacksAttacked called
CStupidAI [0E85D6F8]: actionFinished called
CBattleAI [0E147F90]: actionFinished called
                Player 3: I won the Starting battle of Loynis attackin
g Loynis the Cleric at 15 30 0!
CStupidAI [0E85D6F8]: battleEnd called
CStupidAI [0E85D6F8]: destroyed
CBattleAI [0E147F90]: battleEnd called
Warning: an orphaned child!
                Adding query 393 - Hero Loynis got level 5. Total quer
ies count: 1
                I'll answer the query 393 giving the choice 0
                Attempted answering query 393 - Hero Loynis got level
5. Request id=47133. Waiting for results...
                Adding query 394 - Blocking dialog query with 0 compon
ents - {Crypt}

You tentatively approach the burial crypt of ancient warriors. Do you
 want to search the graves?. Total queries count: 2
                I'll answer the query 394 giving the choice 1
                Attempted answering query 394 - Blocking dialog query
with 0 components - {Crypt}

You tentatively approach the burial crypt of ancient warriors. Do you
 want to search the graves?. Request id=47134. Waiting for results...
                Removing query 393 - Hero Loynis got level 5. Total qu
eries count: 1
                Removing query 394 - Blocking dialog query with 0 comp
onents - {Crypt}

You tentatively approach the burial crypt of ancient warriors. Do you
 want to search the graves?. Total queries count: 0
Opening StupidAI
Loaded Stupid AI 0.1
CStupidAI [0E85D148]: created
CStupidAI [0E85D148]: init called, saving ptr to IBattleCallback
CStupidAI [0E85D148]: battleStart called
CBattleAI [0E147F90]: battleStart called
CStupidAI [0E85D148]: battleNewRoundFirst called
CBattleAI [0E147F90]: battleNewRoundFirst called
CStupidAI [0E85D148]: battleNewRound called
CBattleAI [0E147F90]: battleNewRound called
CStupidAI [0E85D148]: activeStack called for Battle stack [2]: 1 creat
ures of Paladins from slot 254 of armyobj=6214
Assertion failed: enemiesUnreachable.size(), file StupidAI.cpp, line 1
59

(0003067)
Tow (developer)
2012-09-28 16:49

> Looks like consequence of 0001053 - after clearing bank, AI attacks it again and finds empty battlefield.

Yes, this is a reasonable explanation. So apparently this bug is just another manifestation of 0001053.

In r2941 I changed StupidAI to not crash when a buggy battle against nothing happens. This should fix this issue.
0001053 remains to be fixed.
(0003073)
Warmonger (administrator)
2012-09-28 19:29
edited on: 2012-09-28 19:36

Unfortunatelly, it didn't help much. Game just crashed because bankConfig for cleared bank was null.
Suprisingly, debugger pointed inside CBank::endBattle() in the battle, which means that second battle started before all reward dialogs were handled.

This time it's reproductible, attached save. Brown hero Lacus should crash at Crypt.

(0003255)
Warmonger (administrator)
2012-12-13 18:26

Today I managed to reproduce it as human player, that is Crypt visit dialog popped up on top of Commander level-up window.
(0003490)
Tow (developer)
2013-04-20 11:37

Fixed in r3336.

- Issue History
Date Modified Username Field Change
2012-05-09 08:06 Warmonger New Issue
2012-05-09 08:06 Warmonger Status new => assigned
2012-05-09 08:06 Warmonger Assigned To => Tow
2012-05-09 17:57 Zamolxis Note Added: 0002416
2012-05-09 18:09 Zamolxis Note Edited: 0002416 View Revisions
2012-08-31 16:34 Zamolxis Note Edited: 0002416 View Revisions
2012-09-28 09:08 Warmonger Relationship added duplicate of 0001076
2012-09-28 11:48 Warmonger Note Added: 0003063
2012-09-28 11:49 Warmonger Relationship added child of 0001053
2012-09-28 11:50 Warmonger Note Edited: 0003063 View Revisions
2012-09-28 16:49 Tow Note Added: 0003067
2012-09-28 16:49 Tow Status assigned => resolved
2012-09-28 16:49 Tow Fixed in Version => 0.9
2012-09-28 16:49 Tow Resolution open => fixed
2012-09-28 19:29 Warmonger Note Added: 0003073
2012-09-28 19:29 Warmonger Status resolved => feedback
2012-09-28 19:29 Warmonger Resolution fixed => reopened
2012-09-28 19:35 Warmonger File Added: Bug955.rar
2012-09-28 19:36 Warmonger Note Edited: 0003073 View Revisions
2012-12-13 18:26 Warmonger Note Added: 0003255
2012-12-13 18:26 Warmonger Status feedback => assigned
2013-04-20 11:37 Tow Note Added: 0003490
2013-04-20 11:37 Tow Status assigned => resolved
2013-04-20 11:37 Tow Fixed in Version 0.9 => 0.93
2013-04-20 11:37 Tow Resolution reopened => fixed
2014-05-30 17:43 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean