Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0011527 [DCSS] Bug Report crash have not tried 2018-07-16 07:44 2018-07-23 04:32
Reporter kitchen_ace View Status public  
Assigned To aidanholm
Priority normal Resolution done  
Status closed   Product Branch 0.22 stable branch
Summary 0011527: Crash when all skill targets met
Description Linux 32 bit, compiled from Git.

Once the current skill target for fighting is met by fireballing a few wolves, the game prompts me that I have to select a skill for training, but crashes instead of opening the skill menu.
Additional Information
Tags No tags attached.
Attached Files txt file icon crash-Vefaeraa-20180716-014100.txt [^] (55,673 bytes) 2018-07-16 07:44 [Show Content]
? file icon Vefaeraa.cs [^] (394,574 bytes) 2018-07-16 07:45

- Relationships
has duplicate 0011549closedaidanholm Game crashes on skill level reached 

-  Notes
(0032398)
Gorice (reporter)
2018-07-22 16:40

I think this is because UISkillMenu::_allocate_region() calls SkillMenu::exit() but ignores the return value (false in this case) then immediately calls SkillMenu::init().

Note that exit() will not call SkillMenu::clear() if it detects that the player needs to enable at least 1 skill for training (regardless of the value of its calling argument, bool experience_check, which is just passed on to finish_experience()). exit() will return false instead of true to signal this occurrence but it's being ignored in _allocate_region().

Not calling SkillMenu::clear before calling init() will mean that the old menu components (buttons and switches) will not be freed and their pointers are not set to nullptr before new versions are dynamically allocated and the pointers overwritten. In particular the old switches will not be cleared out of the Map m_switches meaning that it will contain duplicate entries for all the switches. I suspect this is then causing the segmentation fault in SkillMenu::shift_bottom_down() within the loop:
 for (auto &entry : m_switches)
    entry.second->move(down);
(0032405)
aidanholm (developer)
2018-07-23 03:36

Thanks for your comment! Looks like that's exactly what happened; advil committed a fix at 4c1e2d5471.

- Issue History
Date Modified Username Field Change
2018-07-16 07:44 kitchen_ace New Issue
2018-07-16 07:44 kitchen_ace File Added: crash-Vefaeraa-20180716-014100.txt
2018-07-16 07:45 kitchen_ace File Added: Vefaeraa.cs
2018-07-22 15:10 aidanholm Relationship added has duplicate 0011549
2018-07-22 16:40 Gorice Note Added: 0032398
2018-07-23 01:19 Siegurt Issue Monitored: Siegurt
2018-07-23 03:36 aidanholm Note Added: 0032405
2018-07-23 03:36 aidanholm Status new => resolved
2018-07-23 03:36 aidanholm Fixed in Branch => 0.22 development branch
2018-07-23 03:36 aidanholm Resolution open => done
2018-07-23 03:36 aidanholm Assigned To => aidanholm
2018-07-23 04:32 kitchen_ace Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker