View Issue Details

IDProjectCategoryView StatusLast Update
0005493DarkRadiantGUIpublic05.09.2021 18:22
Reporterjonri Assigned Togreebo  
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
PlatformArch Linux 
Product Version2.11.0 
Target Version2.11.0Fixed in Version2.11.0 
Summary0005493: TreeModel column accessed before initialization
DescriptionDarkRadiant crashes on open periodically. Recent builds have crashed more frequently and I was finally able to catch it in the debugger. It's happened to me in previous versions but this run is from the latest master.

See attachments for stack trace and context.

Highlights:
1. This happens when the ModelSelector is being initialized.
2. The constructor for its ResourceTreeView is called, which has this note in the source:
    // Note that we need to avoid accessing the _columns reference in the constructor
    // since it is likely owned by subclasses and might not be ready yet
3. When this constructor calls AssociateModel(), wx ultimately calls back into our TreeModel::GetColumnType(), which accesses _columns.
4. The note in the constructor was correct, as _columns is not initialized when it gets accessed. In this run it was null, in other runs it's been random.
Steps To ReproduceLaunch DarkRadiant on Linux and get lucky.
Additional InformationI can reproduce this often enough to get you any other information you need.
TagsNo tags attached.
Attached Files
stacktrace.txt (5,560 bytes)   
1  wxutil::TreeModel::Column::getWxType                                                          TreeModel.cpp        25   0x7ffff7e8c6ac 
2  wxutil::TreeModel::GetColumnType                                                              TreeModel.cpp        571  0x7ffff7e8eaa6 
3  ??                                                                                                                      0x7ffff6e9ce1b 
4  gtk_tree_view_set_model                                                                                                 0x7ffff5f59072 
5  ??                                                                                                                      0x7ffff6ea2ceb 
6  wxDataViewCtrl::AssociateModel(wxDataViewModel *)                                                                       0x7ffff6eaa4a1 
7  wxutil::TreeView::AssociateModel                                                              TreeView.cpp         88   0x7ffff7e9ee78 
8  wxutil::ResourceTreeView::ResourceTreeView                                                    ResourceTreeView.cpp 60   0x7ffff7e7dc65 
9  wxutil::ResourceTreeView::ResourceTreeView                                                    ResourceTreeView.cpp 37   0x7ffff7e7d9bc 
10 ui::ModelTreeView::ModelTreeView                                                              ModelTreeView.cpp    10   0x5555559277cc 
11 ui::ModelSelector::setupTreeView                                                              ModelSelector.cpp    273  0x5555559234a8 
12 ui::ModelSelector::ModelSelector                                                              ModelSelector.cpp    73   0x555555921a46 
13 ui::ModelSelector::Instance                                                                   ModelSelector.cpp    141  0x5555559226ab 
14 ui::ModelSelector::Populate                                                                   ModelSelector.cpp    294  0x5555559236c5 
15 sigc::pointer_functor0<void>::operator()                                                      ptr_fun.h            77   0x5555557e3c93 
16 sigc::adaptor_functor<sigc::pointer_functor0<void>>::operator()                               adaptor_trait.h      256  0x5555557e35f0 
17 sigc::internal::slot_call<sigc::pointer_functor0<void>, void>::call_it                        slot.h               483  0x5555557e296e 
18 sigc::internal::signal_emit0<void, sigc::nil>::emit                                           signal.h             794  0x5555556e1c75 
19 sigc::signal0<void, sigc::nil>::emit                                                          signal.h             2800 0x5555556e3592 
20 module::ModuleRegistry::loadAndInitialiseModules                                              ModuleRegistry.cpp   192  0x7ffff2958043 
21 radiant::Radiant::startup                                                                     Radiant.cpp          85   0x7ffff29bbae7 
22 RadiantApp::onStartupEvent                                                                    RadiantApp.cpp       172  0x5555557b019c 
23 wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler *, wxEvent&)                           0x7ffff7975dde 
24 wxEvtHandler::SearchDynamicEventTable(wxEvent&)                                                                         0x7ffff797615b 
25 wxEvtHandler::TryHereOnly(wxEvent&)                                                                                     0x7ffff79761f1 
26 wxEvtHandler::ProcessEventLocally(wxEvent&)                                                                             0x7ffff79762ac 
27 wxEvtHandler::ProcessEvent(wxEvent&)                                                                                    0x7ffff7976382 
28 wxEvtHandler::ProcessPendingEvents()                                                                                    0x7ffff7976e87 
29 wxAppConsoleBase::ProcessPendingEvents()                                                                                0x7ffff7813db0 
30 wxApp::DoIdle()                                                                                                         0x7ffff738fe7a 
31 ??                                                                                                                      0x7ffff738ffa4 
32 g_main_context_dispatch                                                                                                 0x7ffff597ca84 
33 ??                                                                                                                      0x7ffff59d09b1 
34 g_main_loop_run                                                                                                         0x7ffff597bfd3 
35 gtk_main                                                                                                                0x7ffff5e4d95e 
36 wxGUIEventLoop::DoRun()                                                                                                 0x7ffff73ab876 
37 wxEventLoopBase::Run()                                                                                                  0x7ffff784e37e 
38 wxAppConsoleBase::MainLoop()                                                                                            0x7ffff7814766 
39 wxEntry(int&, wchar_t * *)                                                                                              0x7ffff7893199 
40 main                                                                                          main.cpp             7    0x55555579f246 
stacktrace.txt (5,560 bytes)   

Activities

Related Changesets

DarkRadiant: master 40e534bf

22.01.2021 03:49

greebo


Details Diff
0005493: TreeModel::ColumnRecord needs to be initialised before it's passed to the base class.
wxGTK will trigger queries to the TreeModel when calling TreeView::AssociateModel.
Affected Issues
0005493
mod - libs/wxutil/dataview/ResourceTreeView.cpp Diff File
mod - radiant/ui/mediabrowser/MediaBrowserTreeView.cpp Diff File
mod - radiant/ui/mediabrowser/MediaBrowserTreeView.h Diff File
mod - radiant/ui/modelselector/ModelTreeView.cpp Diff File
mod - radiant/ui/modelselector/ModelTreeView.h Diff File

Issue History

Date Modified Username Field Change
19.01.2021 03:39 jonri New Issue
19.01.2021 03:39 jonri File Added: Screenshot_20210118_221945.png
19.01.2021 03:39 jonri File Added: Screenshot_20210118_222045.png
19.01.2021 03:39 jonri File Added: stacktrace.txt
19.01.2021 05:03 greebo Status new => acknowledged
22.01.2021 03:47 greebo Status acknowledged => confirmed
22.01.2021 03:47 greebo Assigned To => greebo
22.01.2021 03:47 greebo Status confirmed => assigned
22.01.2021 03:56 greebo Changeset attached => DarkRadiant master 40e534bf
22.01.2021 08:36 greebo Target Version => 2.11.0
22.01.2021 08:36 greebo Status assigned => resolved
22.01.2021 08:36 greebo Resolution open => fixed
22.01.2021 08:36 greebo Fixed in Version => 2.11.0
22.01.2021 08:37 greebo Severity normal => crash
05.09.2021 18:22 greebo Status resolved => closed