MantisBT - VCMI
View Issue Details
0002314VCMIOtherpublic2015-10-24 18:082022-04-12 11:04
SXX 
AVS 
normalcrashalways
closedfixed 
0.98d 
0.99 
0002314: Crashes related to bonus system in deserializationFix
Those saves are provided by @Povelitel. He played game and when attempt to load auto saves all of them was crashing.

Crash occur on client at lib/HeroBonus.cpp:809 (Autosave_1 Autosave_4 )

Or assertion on server at lib/HeroBonus.cpp:743 (Autosave_2 Autosave_3 Autosave_5)
No tags attached.
related to 0002306closed AVS Crash at map startup 
has duplicate 0002313closed SXX Crashes related to bonus system in deserializationFix 
has duplicate 0002319resolved AVS Game crashes when trying to load a save 
has duplicate 0002222closed AVS Freeze orange player (sometimes crash) 
has duplicate 0002159closed AVS Crash 
has duplicate 0002171resolved AVS Crash when loading save 
has duplicate 0002158closed AVS I can't load save 
has duplicate 0002301closed AVS Freeze turn AI 
has duplicate 0002315closed AVS Crash during AI turn 
has duplicate 0002318closed AVS Crash during AI turn 
has duplicate 0002384resolved AVS game crash on load save game 
has duplicate 0002263closed SXX I can't load game 
has duplicate 0002041closed AVS Crash when i try enter in town 
related to 0002316closed SXX Unique: Crash during AI turn (Bonus::DISGUISED check) 
txt BACKTRACE_CLIENT.txt (2,152) 2015-10-24 18:08
https://bugs.vcmi.eu/file_download.php?file_id=2372&type=bug
txt BACKTRACE_SERVER.txt (2,167) 2015-10-24 18:09
https://bugs.vcmi.eu/file_download.php?file_id=2373&type=bug
7z povelitel_saves.7z (1,521,735) 2015-10-24 18:10
https://bugs.vcmi.eu/file_download.php?file_id=2374&type=bug
Issue History
2015-10-24 18:08SXXNew Issue
2015-10-24 18:08SXXFile Added: BACKTRACE_CLIENT.txt
2015-10-24 18:09SXXFile Added: BACKTRACE_SERVER.txt
2015-10-24 18:10SXXFile Added: povelitel_saves.7z
2015-10-24 18:12SXXRelationship addedhas duplicate 0002313
2015-10-24 18:14SXXNote Added: 0005984
2015-10-24 18:37AVSNote Added: 0005985
2015-10-24 18:48SXXNote Added: 0005987
2015-10-24 18:49SXXNote Edited: 0005987bug_revision_view_page.php?bugnote_id=5987#r2982
2015-10-24 19:15AVSNote Added: 0005988
2015-10-24 19:22AVSRelationship addedrelated to 0002306
2015-10-24 20:22SXXNote Added: 0005993
2015-10-24 20:33AVSNote Added: 0005994
2015-10-25 19:41WarmongerRelationship addedhas duplicate 0002175
2015-10-27 15:39SXXRelationship addedhas duplicate 0002319
2015-12-09 07:32SXXRelationship deletedhas duplicate 0002175
2015-12-11 20:56SXXRelationship addedrelated to 0002318
2015-12-11 20:57SXXRelationship addedrelated to 0002316
2015-12-11 20:58SXXNote Added: 0006177
2015-12-14 06:04SXXRelationship deletedrelated to 0002316
2015-12-14 06:20SXXNote Added: 0006179
2015-12-22 23:06SXXAssigned To => AVS
2015-12-22 23:06SXXStatusnew => assigned
2015-12-25 09:22SXXRelationship addedhas duplicate 0002222
2015-12-25 09:23SXXRelationship addedhas duplicate 0002159
2015-12-25 11:55SXXRelationship addedhas duplicate 0002171
2015-12-25 11:57SXXRelationship addedhas duplicate 0002158
2015-12-25 12:14SXXRelationship addedhas duplicate 0002301
2015-12-25 12:15SXXRelationship addedhas duplicate 0002315
2015-12-25 12:21SXXRelationship deletedrelated to 0002318
2015-12-25 12:21SXXRelationship addedhas duplicate 0002318
2016-01-18 18:34SXXRelationship addedhas duplicate 0002384
2016-02-04 14:04PovelitelNote Added: 0006405
2016-08-15 07:02SXXRelationship addedhas duplicate 0002263
2016-08-15 07:03SXXNote Added: 0006560
2016-08-15 07:03SXXNote Edited: 0006560bug_revision_view_page.php?bugnote_id=6560#r3207
2016-08-15 07:07SXXNote Edited: 0006560bug_revision_view_page.php?bugnote_id=6560#r3208
2016-08-24 00:51SXXRelationship addedhas duplicate 0002041
2016-09-04 08:10SXXNote Added: 0006605
2016-09-04 08:10SXXStatusassigned => resolved
2016-09-04 08:10SXXFixed in Version => 0.99
2016-09-04 08:10SXXResolutionopen => fixed
2016-09-04 08:19SXXRelationship addedrelated to 0002316
2016-09-04 10:56AVSNote Edited: 0006605bug_revision_view_page.php?bugnote_id=6605#r3222
2016-09-07 16:02SXXNote Added: 0006626
2022-04-12 11:04PovelitelStatusresolved => closed

Notes
(0005984)
SXX   
2015-10-24 18:14   
I'm not really familiar how bonus system works inside so I didn't posted it before, but now when Warmonger fixed 0002311 I start thinking this one may be somehow related so decide to put it there as well.

PS: No idea how I managed to post it twice, but sorry.
(0005985)
AVS   
2015-10-24 18:37   
This is impossible backtrace:
10 CGDwelling::onHeroVisit CGTownInstance.cpp 112 0x7ffff6fa3949
11 CBonusSystemNode::propagateBonus HeroBonus.cpp 809 0x7ffff7277dbf
(0005987)
SXX   
2015-10-24 18:48   
(edited on: 2015-10-24 18:49)
Yes it's looks like that, but it's exactly what GDB show.
Any chance it's some kind of memory corruption?

(0005988)
AVS   
2015-10-24 19:15   
Memory corruption or bad cast in serialiser.
(0005993)
SXX   
2015-10-24 20:22   
Why do you think it's related to 0002306?
(0005994)
AVS   
2015-10-24 20:33   
"bad cast in serialiser". Unitialized type and wrong type may be same issue.
(0006177)
SXX   
2015-12-11 20:58   
I suppose all crashes in bonus system may be related to this one.

Branch that intend to fix it:
https://github.com/vcmi/vcmi/pull/147 [^]
(0006179)
SXX   
2015-12-14 06:20   
Okay thing I patched didn't fixed it, but other Warmonger / AVS branch did:
https://github.com/vcmi/vcmi/pull/148 [^]
(0006405)
Povelitel   
2016-02-04 14:04   
related 2263 ?
(0006560)
SXX   
2016-08-15 07:03   
(edited on: 2016-08-15 07:07)
New branch fixes it:
https://github.com/vcmi/vcmi/pull/202 [^]

Also make it possible to load probably all linked saves. (save from 0002158 and plenty of other load just fine)

(0006605)
SXX   
2016-09-04 08:10   
(edited on: 2016-09-04 10:56)
PR202 merged so issue must be fixed.
https://github.com/vcmi/vcmi/commit/f4f170bf92115cf21d86c3065316cfb4aefd67bd [^]

Keep in mind that even if all old corrupted saves will load many of them are beyond repair so might crash at some point in the game.

(0006626)
SXX   
2016-09-07 16:02   
There is one more fix merged that should fix (all?) crashes in old save games.

https://github.com/vcmi/vcmi/commit/e16552c2c6a1b769ade5845a3b1f8784d6de2e10 [^]