View Issue Details

IDProjectCategoryView StatusLast Update
0006562DarkRadiantGUIpublic03.11.2024 04:41
Reporterorbweaver Assigned Toorbweaver  
PrioritynormalSeveritycrashReproducibilityalways
Status assignedResolutionopen 
PlatformLinuxOSUbuntuOS Version22.04
Product Version3.9.0 
Target Version3.10.0 
Summary0006562: wxGTK assertion on opening Stim/Response Editor
DescriptionWhen opening the Stim/Response Editor, there is a wxGTK assertion failure which may or may not cause an application crash depending on how assertions are being handled in a particular build.

Original report on forum: https://forums.thedarkmod.com/index.php?/topic/22513-stimresponse-editor-causes-total-darkradiant-crash
Additional InformationASSERT INFO:
../src/gtk/dataview.cpp(372): assert "iIndex != (-1)" failed in Remove(): removing inexistent element in wxArray::Remove

BACKTRACE:
[1] wxDataViewModel::ItemDeleted(wxDataViewItem const&, wxDataViewItem const&)
[2] wxDataViewModelNotifier::ItemsDeleted(wxDataViewItem const&, wxDataViewItemArray const&)
[3] wxDataViewModel::ItemsDeleted(wxDataViewItem const&, wxDataViewItemArray const&)
[4] wxutil::TreeModel::Clear()
[5] StimTypes::reload()
[6] ui::StimResponseEditor::ShowModal()
[7] ui::StimResponseEditor::ShowDialog()
[8] cmd::CommandSystem::executeCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<cmd::Argument, std::allocator<cmd::Argument> > const&)
[9] cmd::CommandSystem::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[10] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[11] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[12] wxEvtHandler::TryHereOnly(wxEvent&)
[13] wxEvtHandler::ProcessEventLocally(wxEvent&)
[14] wxEvtHandler::ProcessEvent(wxEvent&)
[15] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[16] wxMenuBase::SendEvent(int, int)
[17] g_closure_invoke
[18] g_signal_emit_valist
[19] g_signal_emit
[20] gtk_widget_activate
[21] gtk_menu_shell_activate_item
[22] g_signal_emit_valist
[23] g_signal_emit
[24] gtk_main_do_event
[25] g_main_context_dispatch
[26] g_main_loop_run
[27] gtk_main
[28] wxGUIEventLoop::DoRun()
[29] wxEventLoopBase::Run()
[30] wxAppConsoleBase::MainLoop()
[31] wxEntry(int&, wchar_t**)
[32] __libc_start_main
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

DarkRadiant: master 67744794

14.08.2024 19:07

orbweaver


Details Diff
0006562: fix for wxGTK assertion on opening Stim/Response editor

Remove the GTK-specific workaround in TreeModel::Clear() and replace it
with a far simpler approach: instead of deleting or clearing out the
root node, it is std::swapped with an empty replacement, which keeps the
old tree allocated until the end of the function.

This means that Cleared() still sees an empty root node, but the
internal wxDataViewItem pointers will not point to deallocated memory if
the wxGTK back-end chooses to dereference them during the Cleared()
call.

So far this seems to fix the S/R editor assertion without re-introducing
the crashes that the GTK-specific workaround was intended to fix, but
we'll have to wait and see if it works correctly on all the various
wxGTK versions (including FlatPak).
Affected Issues
0006562
mod - libs/wxutil/dataview/TreeModel.cpp Diff File

Issue History

Date Modified Username Field Change
13.08.2024 19:07 orbweaver New Issue
13.08.2024 19:07 orbweaver Status new => assigned
13.08.2024 19:07 orbweaver Assigned To => orbweaver
03.11.2024 04:41 orbweaver Changeset attached => DarkRadiant master 67744794