MantisBT - VCMI
View Issue Details
0001899VCMIMechanics - Objectspublic2014-09-26 10:242015-04-11 18:07
Povelitel 
SXX 
normalcrashalways
closedfixed 
0.96b 
0.97c 
0001899: in this map when I visit the hill fort - crash
just go to - hill fort
No tags attached.
has duplicate 0001935closed SXX Hill fort crash 
has duplicate 0002021closed SXX Crash while visiting Hill Fort 
related to 0001945closed SXX Crash when learning skill from University or Magic Univercity 
related to 0001991closed SXX Conflux error 
? Revenge 113.h3m (245,211) 2014-09-26 10:24
https://bugs.vcmi.eu/file_download.php?file_id=1908&type=bug
txt VCMI_Client_log.txt (2,515,261) 2014-09-26 10:25
https://bugs.vcmi.eu/file_download.php?file_id=1909&type=bug
txt VCMI_Server_log.txt (2,373,009) 2014-09-26 10:25
https://bugs.vcmi.eu/file_download.php?file_id=1910&type=bug
Issue History
2014-09-26 10:24PovelitelNew Issue
2014-09-26 10:24PovelitelStatusnew => assigned
2014-09-26 10:24PovelitelAssigned To => Ivan
2014-09-26 10:24PovelitelFile Added: Revenge 113.h3m
2014-09-26 10:24PovelitelNote Added: 0004987
2014-09-26 10:25PovelitelFile Added: VCMI_Client_log.txt
2014-09-26 10:25PovelitelFile Added: VCMI_Server_log.txt
2014-09-26 15:49WarmongerProduct Version0.96 => 0.96b
2014-10-29 17:51WarmongerNote Added: 0005037
2014-10-29 18:07WarmongerNote Edited: 0005037bug_revision_view_page.php?bugnote_id=5037#r2659
2014-11-10 08:11WarmongerRelationship addedrelated to 0001937
2014-11-10 08:12WarmongerRelationship deletedrelated to 0001937
2014-11-10 08:12WarmongerRelationship addedrelated to 0001935
2014-11-17 11:12NouiNote Added: 0005117
2014-11-17 11:19NouiNote Edited: 0005117bug_revision_view_page.php?bugnote_id=5117#r2701
2015-01-02 15:30WarmongerRelationship addedhas duplicate 0002021
2015-01-06 16:25SXXNote Added: 0005349
2015-01-06 17:10SXXNote Added: 0005350
2015-01-06 17:10SXXAssigned ToIvan => SXX
2015-01-06 17:18SXXNote Added: 0005351
2015-01-07 08:52WarmongerNote Added: 0005353
2015-01-07 10:14SXXNote Added: 0005354
2015-01-07 10:22SXXNote Edited: 0005354bug_revision_view_page.php?bugnote_id=5354#r2782
2015-01-07 10:22SXXNote Added: 0005355
2015-01-07 10:31SXXNote Edited: 0005354bug_revision_view_page.php?bugnote_id=5354#r2783
2015-01-07 15:11SXXNote Added: 0005360
2015-01-07 15:11SXXStatusassigned => resolved
2015-01-07 15:11SXXFixed in Version => 0.97c
2015-01-07 15:11SXXResolutionopen => fixed
2015-01-07 15:14SXXRelationship replacedhas duplicate 0001935
2015-01-07 15:15SXXRelationship addedrelated to 0001945
2015-01-07 15:48SXXRelationship addedrelated to 0001991
2015-04-11 18:07PovelitelStatusresolved => closed

Notes
(0004987)
Povelitel   
2014-09-26 10:24   
0.96b
(0005037)
Warmonger   
2014-10-29 17:51   
(edited on: 2014-10-29 18:07)
Game crashes when rendering first free slot, not sure why. Probably issue with block() function.

(0005117)
Noui   
2014-11-17 11:12   
(edited on: 2014-11-17 11:19)
I can confirm that it doesn't crash as early when the visiting hero doesn't have any free army slots. However, the game does crash when I try to upgrade creatures.

Edit: The game doesn't crash if you upgrade your creatures using the "upgrade all" button, but it does crash if you try to upgrade one specific creature.

(0005349)
SXX   
2015-01-06 16:25   
If no one else doing it at moment I'll start to investigate/fix this one.
So far I'm find out that "upgrade all" button work properly.
(0005350)
SXX   
2015-01-06 17:10   
So problems found that I see after some testing:
1 - Most likely crash with empty slots occur because attempt to "block" non-exist button.
2 - If you attempt to upgrade one unit there is crash (assert) in makeDeal as it's get garbage instead of slot id. Likely occur due to bad code at /client/windows/GUIClasses.cpp:1396
3 - IDs for single unit upgrade also may become messed up a bit. E.g unit in previous slot upgraded instead of choosen one.
(0005351)
SXX   
2015-01-06 17:18   
2 - So it's just invalid capture for lambda here: "&" (grab reference) instead of needed "=":
[&]{ makeDeal(SlotID(i)) };

It's grab reference for i in loop which is obviously become garbade by the time it's called. :-)
(0005353)
Warmonger   
2015-01-07 08:52   
Did that work? I think that's first thing I tried, but with no sucess at that time.
(0005354)
SXX   
2015-01-07 10:14   
(edited on: 2015-01-07 10:31)
Yeah of course, but there also needed fix crash that occur on button state change. E.g by default game is trying to set state to -1 for empty slots as result there no image for button found and button remain disabled. And code attempt to "block" it cause client crash.

(0005355)
SXX   
2015-01-07 10:22   
So here is pull request:
https://github.com/vcmi/vcmi/pull/74 [^]
(0005360)
SXX   
2015-01-07 15:11   
Should be now fixed in git:
https://github.com/vcmi/vcmi/commit/3466457d69d718f1d1b99a63864474911d9a6f09 [^]