EUA / wxHexEditor

wxHexEditor official GIT repo
http://www.wxhexeditor.org
GNU General Public License v2.0
563 stars 121 forks source link

Changing (colour) preferences leads to a gtk crash #219

Open digidoor opened 9 months ago

digidoor commented 9 months ago

Steps to reproduce:

More specifically, the backtrace:

ASSERT INFO: /usr/src/debug/wxwidgets/wxWidgets-3.2.4/src/gtk/choice.cpp(303): assert ""Assert failure"" failed in GetString(): invalid index BACKTRACE: [1] wxChoice::GetString(unsigned int) const [2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler, wxEvent&) [3] wxEvtHandler::SearchDynamicEventTable(wxEvent&) [4] wxEvtHandler::TryHereOnly(wxEvent&) [5] wxEvtHandler::ProcessEventLocally(wxEvent&) [6] wxEvtHandler::ProcessEvent(wxEvent&) [7] wxEvtHandler::SafelyProcessEvent(wxEvent&) [8] g_signal_emit_valist [9] g_signal_emit [10] g_closure_invoke [11] g_signal_emit_valist [12] g_signal_emit [13] g_signal_emit_valist [14] g_signal_emit [15] g_cclosure_marshal_VOID__BOXEDv [16] g_signal_emit_valist [17] g_signal_emit [18] gtk_event_controller_handle_event [19] g_closure_invoke [20] g_signal_emit_valist [21] g_signal_emit [22] gtk_main_do_event [23] g_main_loop_run [24] gtk_main [25] wxGUIEventLoop::DoRun() [26] wxEventLoopBase::Run() [27] wxDialog::ShowModal() [28] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler, wxEvent&) [29] wxEvtHandler::SearchDynamicEventTable(wxEvent&) [30] wxEvtHandler::TryHereOnly(wxEvent&) [31] wxEvtHandler::DoTryChain(wxEvent&) [32] wxEvtHandler::ProcessEvent(wxEvent&) [33] wxWindowBase::TryAfter(wxEvent&) [34] wxEvtHandler::SafelyProcessEvent(wxEvent&) [35] wxMenuBase::DoProcessEvent(wxMenuBase, wxEvent&, wxWindow) [36] wxMenuBase::SendEvent(int, int) [37] g_closure_invoke [38] g_signal_emit_valist [39] g_signal_emit [40] gtk_widget_activate [41] gtk_menu_shell_activate_item [42] g_signal_emit_valist [43] g_signal_emit [44] gtk_main_do_event [45] g_main_loop_run [46] gtk_main [47] wxGUIEventLoop::DoRun() [48] wxEventLoopBase::Run() [49] wxAppConsoleBase::MainLoop() [50] wxEntry(int&, wchar_t**) [51] __libc_start_main

Unixware commented 8 months ago

Same issue on debian 12, but I managed to fix it : I noted that the Language option on the preferences was empty, so I chose one - "English" in my case- , now the prefs can save any chances. HTH

PolicyChanges commented 2 months ago

quick fix for anyone compiling.

HexDialogs.cpp: 3138 void PreferencesDialog::SaveRegistry( void ) { 3139 if(chcLang->GetSelection() != wxNOT_FOUND) { 3140 myConfigBase::Get()->Write( _T("Language"), wxLocale::FindLanguageInfo( chcLang->GetString( chcLang->GetSelection() ) )->Description ); //Saves string into configuration file. 3141 }