View Issue Details

IDProjectCategoryView StatusLast Update
0006216DarkRadiantGUIpublic13.01.2024 05:34
Reporterorbweaver Assigned Toorbweaver  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version2204
Product Version3.7.0 
Target Version3.8.0Fixed in Version3.8.0 
Summary0006216: Light Inspector crashes on Linux
DescriptionBringing up the light inspector with the L key causes an immediate crash on Linux systems. Reproduced in local source build (f3f3f9d3cc0e930b71481b4788b40d269411530a), and the 3.7.0 FlatPak.
Additional InformationFirst reported on forums here: https://forums.thedarkmod.com/index.php?/topic/21704-dark-radiant-370-crashs-when-trying-to-open-light-inspector/
TagsNo tags attached.

Activities

orbweaver

orbweaver

03.01.2023 20:17

developer   ~0015688

The crash occurs in LightInspector::shaderSelectionChanged(), because the _texSelector member is a null pointer.

void LightInspector::shaderSelectionChanged()
{
    // Get the selected shader
    auto ishader = _texSelector->getSelectedShader(); // NULL pointer dereference
    ...
}
orbweaver

orbweaver

04.01.2023 20:34

developer   ~0015701

Fixed in a1f0c789f34b4bb11a132aaeb03a380da18fe6b5

Related Changesets

DarkRadiant: master a1f0c789

04.01.2023 20:25

orbweaver


Details Diff
0006216: fix crash on showing Light Inspector

Crash was caused by a race condition initialising the _texSelector
member of LightInspector. This member stores a pointer to a
MaterialSelector, but the MaterialSelector constructor itself was
triggering a callback to shaderSelectionChanged() which found a null
_texSelector since the assignment hadn't happened yet.

MaterialSelector no longer accepts a std::function callback in its
constructor, but instead exposes a sigc::signal which client code can
connect to. This automatically avoids any future race condition because
nothing can access or connect to the signal until the MaterialSelector
has been fully constructed.
Affected Issues
0006216
mod - radiant/ui/lightinspector/LightInspector.cpp Diff File
mod - radiant/ui/materials/MaterialChooser.cpp Diff File
mod - radiant/ui/materials/MaterialSelector.cpp Diff File
mod - radiant/ui/materials/MaterialSelector.h Diff File

Issue History

Date Modified Username Field Change
03.01.2023 20:09 orbweaver New Issue
03.01.2023 20:09 orbweaver Status new => assigned
03.01.2023 20:09 orbweaver Assigned To => orbweaver
03.01.2023 20:17 orbweaver Note Added: 0015688
04.01.2023 20:34 orbweaver Status assigned => resolved
04.01.2023 20:34 orbweaver Resolution open => fixed
04.01.2023 20:34 orbweaver Fixed in Version => 3.8.0
04.01.2023 20:34 orbweaver Note Added: 0015701
05.01.2023 16:22 orbweaver Changeset attached => DarkRadiant master a1f0c789
13.01.2024 05:34 greebo Status resolved => closed