MantisBT - VCMI
View Issue Details
0000957VCMIAI - Adventure Mappublic2012-05-15 21:262014-05-30 17:41
Ivan 
Tow 
normalcrashsometimes
closedfixed 
x86_64Ubuntu Linux12.04 (precise)
 
 
0000957: Assertion failure in AI
Sometimes VCAI throws assertion failure.
According to debugger Thane is trying to visit tile (21,15,0) which is his current location.

See screenshot: left hero is Thane.
I'll attach saves as well. However it happens only sometimes - you'll have to wait several turns

(Not sure if you know about it)
On this map bottom player (orange) is kinda "deadlocked" - he is not attacking ore mine to get resources because of small army and don't have resources to buy better one :)
Stack:

3 __GI___assert_fail assert.c 103 0x7fa9f33c31b2
4 VCAI::moveHeroToTile VCAI.cpp 1503 0x7fa9e1213486
5 VCAI::tryRealize VCAI.cpp 1642 0x7fa9e121480f
6 VCAI::striveToGoal VCAI.cpp 1840 0x7fa9e1216144
7 VCAI::makeTurnInternal VCAI.cpp 1002 0x7fa9e120ef67
8 VCAI::makeTurn VCAI.cpp 952 0x7fa9e120e538
No tags attached.
duplicate of 0000938closed Tow Crash on AI turn 
jpg crashed-thane.jpg (158,571) 2012-05-15 21:26
https://bugs.vcmi.eu/file_download.php?file_id=925&type=bug
jpg

zip crashed-thane.zip (176,735) 2012-05-15 21:27
https://bugs.vcmi.eu/file_download.php?file_id=926&type=bug
Issue History
2012-05-15 21:26IvanNew Issue
2012-05-15 21:26IvanStatusnew => assigned
2012-05-15 21:26IvanAssigned To => Tow
2012-05-15 21:26IvanFile Added: crashed-thane.jpg
2012-05-15 21:27IvanFile Added: crashed-thane.zip
2012-05-16 06:05WarmongerNote Added: 0002444
2012-05-16 06:05WarmongerNote Edited: 0002444bug_revision_view_page.php?bugnote_id=2444#r1591
2012-05-16 06:06WarmongerNote Edited: 0002444bug_revision_view_page.php?bugnote_id=2444#r1592
2012-05-16 12:09IvanNote Added: 0002446
2012-05-16 12:52WarmongerNote Added: 0002448
2012-05-16 13:50WarmongerRelationship addedduplicate of 0000938
2012-05-18 23:02TowNote Added: 0002495
2012-05-19 00:39TowNote Added: 0002497
2012-05-19 00:39TowStatusassigned => resolved
2012-05-19 00:39TowResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0002444)
Warmonger   
2012-05-16 06:05   
(edited on: 2012-05-16 06:06)
Duplicate of 0000938 I believe?

As to AI block, it would help if there was any town management involved. Right now AI builds buildings just from the beginning of list before moving to dwellings :P

(0002446)
Ivan   
2012-05-16 12:09   
Looks to be duplicate. Close it if you wish.

Is it ok if I'll tweak that list to something more usable? Maybe with some simple logic for AI (e.g. focus on army\focus on income). Or you have some plans already?
(0002448)
Warmonger   
2012-05-16 12:52   
Town management should be a part of general reasoning system, based on goals and game info. Every hardcoded solution may fail in certain scenarios.

I don't plan to do anything with it soon, though.
(0002495)
Tow   
2012-05-18 23:02   
>Is it ok if I'll tweak that list to something more usable?

Current method of selecting structures is no good. Hardcoded or not, I would happily welcome any change that brings improvement to AI. :)
(0002497)
Tow   
2012-05-19 00:39   
Should be fixed in r2692 / r2693.
Interesting scenario.
Thane tried visiting learning stone — but there was already Tiva standing on it and he just visited her over (opnening meeting window) without getting to the actual object. That way he lost all his MPs.
Then Tiva wanted to visit castle but stubborn Thane was standing on her way. So she requested Thane's tile to be cleared. And that clearing (=visiting) mission was assigned... to Thane, because he was nearest available hero. That caused self-visiting error.