MantisBT - VCMI
View Issue Details
0000398VCMIMechanics - Otherpublic2010-03-01 23:452023-04-12 23:37
Zamolxis 
Ivan 
normalcrashsometimes
resolvedfixed 
0.8 
 
0000398: Crash if I exit the game while in battle
I'm not sure yet, but it seems to happen only for the battles in which I have already cast a spell. At least from my attempts to reproduce so far I have: 3 battles with no spell - close application with no crash; 3 battles with spell - crash if I close application before exiting battle. To reproduce use the savegame from report 0000396. Crashdump attached.
No tags attached.
7z 2010-03-02_CrashIfExitDuringBattle.7z (106,353) 2010-03-01 23:45
https://bugs.vcmi.eu/file_download.php?file_id=274&type=bug
jpg 2010-03-02_CrashIfExitDuringBattle.jpg (32,771) 2010-03-01 23:46
https://bugs.vcmi.eu/file_download.php?file_id=275&type=bug
jpg
Issue History
2010-03-01 23:45ZamolxisNew Issue
2010-03-01 23:45ZamolxisFile Added: 2010-03-02_CrashIfExitDuringBattle.7z
2010-03-01 23:45ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=637#r637
2010-03-01 23:46ZamolxisFile Added: 2010-03-02_CrashIfExitDuringBattle.jpg
2013-12-07 18:20beegeeNote Added: 0004168
2013-12-07 18:20beegeeNote Edited: 0004168bug_revision_view_page.php?bugnote_id=4168#r2458
2013-12-07 18:21beegeeStatusnew => confirmed
2013-12-07 18:23beegeeNote Edited: 0004168bug_revision_view_page.php?bugnote_id=4168#r2459
2023-04-12 16:59IvanStatusconfirmed => acknowledged
2023-04-12 23:37IvanNote Added: 0008597
2023-04-12 23:37IvanStatusacknowledged => resolved
2023-04-12 23:37IvanResolutionopen => fixed
2023-04-12 23:37IvanAssigned To => Ivan

Notes
(0004168)
beegee   
2013-12-07 18:20   
(edited on: 2013-12-07 18:23)
This problem is not simple to fix. The server will be shut down hard if the client sends the appropriate package. A mutex is locked, but won't be unlocked in battle. When the mutex is destructed from the operating system when the process terminates, boost complains about this failing assert:

vcmiserver: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.

I didn't receive any exceptions or any other error message, just that failing assert.

(0008597)
Ivan   
2023-04-12 23:37   
Fixed in 1.2