MantisBT - VCMI
View Issue Details
0000782VCMIOtherpublic2011-08-05 09:052014-05-30 17:40
lssjbrolli 
Tow 
normalcrashalways
closedfixed 
 
0.86 
0000782: crash after finishing battle at castle
after winning battle at castle and closing summary window game crashes with:

The winner is the attacker.
lost Warning: an orphaned child!
vcmiclient: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:46: boost::condition_variable::~condition_variable(): Assertion `!pthread_mutex_destroy(&internal_mutex)' failed.
Aborted
play attached save
attack stronghold
No tags attached.
? Autosave_4.vlgm1 (586,255) 2011-08-05 09:06
https://bugs.vcmi.eu/file_download.php?file_id=766&type=bug
? Autosave_4.vcgm1 (80) 2011-08-05 15:09
https://bugs.vcmi.eu/file_download.php?file_id=767&type=bug
? Autosave_4.vsgm1 (117) 2011-08-05 15:10
https://bugs.vcmi.eu/file_download.php?file_id=768&type=bug
txt server_log.txt (12,420) 2011-08-05 19:31
https://bugs.vcmi.eu/file_download.php?file_id=769&type=bug
txt VCMI_Client_log.txt (115,344) 2011-08-05 19:31
https://bugs.vcmi.eu/file_download.php?file_id=770&type=bug
txt VCMI_Server_log.txt (117,989) 2011-08-05 19:32
https://bugs.vcmi.eu/file_download.php?file_id=771&type=bug
log vcmi.log (8,857) 2011-08-06 13:44
https://bugs.vcmi.eu/file_download.php?file_id=772&type=bug
Issue History
2011-08-05 09:05lssjbrolliNew Issue
2011-08-05 09:06lssjbrolliFile Added: Autosave_4.vlgm1
2011-08-05 09:07lssjbrolliNote Added: 0001904
2011-08-05 09:49WarmongerNote Added: 0001905
2011-08-05 15:09lssjbrolliFile Added: Autosave_4.vcgm1
2011-08-05 15:10lssjbrolliFile Added: Autosave_4.vsgm1
2011-08-05 15:10lssjbrolliNote Added: 0001907
2011-08-05 16:54WarmongerNote Added: 0001908
2011-08-05 17:18lssjbrolliNote Added: 0001909
2011-08-05 19:31lssjbrolliFile Added: server_log.txt
2011-08-05 19:31lssjbrolliFile Added: VCMI_Client_log.txt
2011-08-05 19:32lssjbrolliFile Added: VCMI_Server_log.txt
2011-08-05 19:47lssjbrolliNote Added: 0001910
2011-08-05 20:57majaczekNote Added: 0001911
2011-08-05 20:58lssjbrolliNote Added: 0001912
2011-08-05 23:12IvanNote Added: 0001915
2011-08-06 13:27lssjbrolliNote Added: 0001918
2011-08-06 13:44lssjbrolliFile Added: vcmi.log
2011-08-06 13:45lssjbrolliNote Added: 0001919
2011-08-06 18:45IvanNote Added: 0001921
2011-08-06 19:29lssjbrolliNote Added: 0001922
2011-08-25 15:50TowNote Added: 0001932
2011-08-25 15:50TowStatusnew => resolved
2011-08-25 15:50TowFixed in Version => 0.89
2011-08-25 15:50TowResolutionopen => fixed
2011-08-25 15:50TowAssigned To => Tow
2014-05-30 17:40beegeeStatusresolved => closed

Notes
(0001904)
lssjbrolli   
2011-08-05 09:07   
r2275
(0001905)
Warmonger   
2011-08-05 09:49   
Autosave consists of three files.
(0001907)
lssjbrolli   
2011-08-05 15:10   
sorry, my bad :(
(0001908)
Warmonger   
2011-08-05 16:54   
In my first attempt it is not reproductible. Did you use any special strategy?
(0001909)
lssjbrolli   
2011-08-05 17:18   
No special strategy, i will upload logs later tonight, not at pc right now.
(0001910)
lssjbrolli   
2011-08-05 19:47   
it seems to happen only aggains stronghold, i captured a necroplis without problem
(0001911)
majaczek   
2011-08-05 20:57   
maybe it's escape tunnnel support bug?
(0001912)
lssjbrolli   
2011-08-05 20:58   
i don't know, does the ai builds anything? or what do you mean?
(0001915)
Ivan   
2011-08-05 23:12   
Probably one of multithreading bugs we have from time to time. It looks that on Win it is possible to delete locked mutex but on Linux this results in assertion failure.
I'll try to reproduce this myself.
lssjbroll, can you create core dump or get stacktrace? This may make things more simple.
(0001918)
lssjbrolli   
2011-08-06 13:27   
i will as soon as i find out how to compile vcmi with debug symbols. any pointers?
(0001919)
lssjbrolli   
2011-08-06 13:45   
is that what you want? or do you need something else?
(0001921)
Ivan   
2011-08-06 18:45   
That's what I need. Don't see how to fix this though.
It looks that there is still an active stack in the battle. Maybe last creature got morale?

Crash happens in CBattleInterface::givenCommand destructor.
The only other place in code where givenCommand used is CPlayerInterface::activeStack - called when a stack got turn
(0001922)
lssjbrolli   
2011-08-06 19:29   
only if morale is happening every time? maybe the game expects another stack to heve turn, but that stack doesn't exist, but again i'm no dev so this kinda goes over me.
if you need anything else to try, drop a line :)
(0001932)
Tow   
2011-08-25 15:50   
Fixed in r2307.
Nasty, little bug. First SetActiveStack packet was duplicated.