MantisBT - VCMI
View Issue Details
0001154VCMIAI - Adventure Mappublic2012-12-01 08:382014-05-30 17:41
Warmonger 
Ivan 
normalcrashrandom
closedfixed 
PCWindows 7SP1
 
0.910.91 
0001154: Random crash when AI tries to recruit hero
Looks like related to 0001149. Both bugs appeared on same period, probably related to faulty map initialization / serialization.
Listening... Striving to goal of type WIN
        Considering goal WIN
        Decomposing goal of type WIN
        Considering goal CONQUER
        Decomposing goal of type CONQUER
        Considering goal RECRUIT HERO
        Decomposing goal of type RECRUIT HERO
    Attempting realizing goal with code RECRUIT HERO
Sending a request "struct HireHero". It'll have an ID=164.
Sending to server a pack of type struct HireHero
We'll wait till request 164 is answered.
    received server message of type struct HeroRecruited
    Made first apply on cl
Disaster happened.
Reason: 0xc0000005 - EXCEPTION_ACCESS_VIOLATION at 0023:614A0F5C
Attempt to write to 0x0000003D
Thread ID: ef4 [3828]
Crash info will be put in VCMI_client.exe_crashinfo.dmp
No tags attached.
related to 0001149closed Ivan Crash(es) on visiting Shipwreck survivor 
? CoTD 252x252 001.h3m (264,267) 2012-12-05 17:38
https://bugs.vcmi.eu/file_download.php?file_id=1158&type=bug
Issue History
2012-12-01 08:38WarmongerNew Issue
2012-12-01 08:38WarmongerStatusnew => assigned
2012-12-01 08:38WarmongerAssigned To => beegee
2012-12-01 08:39WarmongerRelationship addedrelated to 0001149
2012-12-04 19:10beegeeNote Added: 0003227
2012-12-05 17:37WarmongerNote Added: 0003233
2012-12-05 17:38WarmongerFile Added: CoTD 252x252 001.h3m
2012-12-05 17:38WarmongerNote Edited: 0003233bug_revision_view_page.php?bugnote_id=3233#r2057
2012-12-12 13:45IvanNote Added: 0003244
2012-12-12 14:09IvanNote Edited: 0003244bug_revision_view_page.php?bugnote_id=3244#r2065
2012-12-12 14:09IvanAssigned Tobeegee => Ivan
2012-12-12 14:56IvanNote Added: 0003245
2012-12-12 14:56IvanStatusassigned => feedback
2012-12-12 17:36WarmongerNote Added: 0003248
2012-12-12 17:36WarmongerStatusfeedback => assigned
2012-12-12 17:36WarmongerStatusassigned => resolved
2012-12-12 17:36WarmongerFixed in Version => 0.91
2012-12-12 17:36WarmongerResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0003227)
beegee   
2012-12-04 19:10   
For me it looks like that 0001149 is not related to this mantis call. More on this in 0001149.
I couldn't confirm this bug. AI can create as many heroes as it wants to have:)
(0003233)
Warmonger   
2012-12-05 17:37   
(edited on: 2012-12-05 17:38)
For me it crashes especially on large maps, which may be caused by two reasons I can think of:

1. Race condition - map is processed slower than on small maps
2. Not enough heroes avaliable to recruit.

Check attached map.

(0003244)
Ivan   
2012-12-12 13:45   
(edited on: 2012-12-12 14:09)
I think I got this (or similar) issue 1-2 times without "help" from AI on the first day of game.

Sometimes starting heroes army is out of sync with server. So far happened only with lvl-1 creature specialists and only when hero in options was set to random.

Will try to reproduce it but it occurs quite rarely for me.

EDIT:
Wow. Logging in CGHeroInstance::initArmy() shows that client and server give completely different armies. Will try to fix.

(0003245)
Ivan   
2012-12-12 14:56   
I definitely fixed out of sync issue. And I may have fixed original bug - please check.
(0003248)
Warmonger   
2012-12-12 17:36   
Yeah, it work great now :)