SLADE
SLADE copied to clipboard
Crash while opening TEXTUREx editor
SLADE Version: (3.2.1) Operating System: Linux
Issue Details: It used to not work correctly (preview canvas missing) and now it just crash when I try to open the TEXTUREx editor.
Backtrace:
Version: 3.2.1
No current action
Operating System: Linux 4.15.0-180-generic x86_64
Graphics Vendor: OpenGL not initialised
Graphics Hardware: OpenGL not initialised
OpenGL Version: OpenGL not initialised
Stack Trace:
0: [unknown location] wxLogger::DoLogWithNum(long, wchar_t const*, ...)
1: [unknown location] [unknown:139959229756357]
2: [unknown location] [unknown:139959204989312]
3: [unknown location] slade::OGLCanvas::onPaint(wxPaintEvent&)
4: [unknown location] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
5: [unknown location] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
6: [unknown location] wxEvtHandler::TryHereOnly(wxEvent&)
7: [unknown location] wxEvtHandler::ProcessEventLocally(wxEvent&)
8: [unknown location] wxEvtHandler::ProcessEvent(wxEvent&)
9: [unknown location] wxEvtHandler::SafelyProcessEvent(wxEvent&)
10: [unknown location] wxWindow::GTKSendPaintEvents(_cairo*)
11: [unknown location] wxGLCanvas::SetBackgroundStyle(wxBackgroundStyle)
12: [unknown location] [unknown:139959340083195]
13: [unknown location] [unknown:139959341416479]
14: [unknown location] g_closure_invoke
15: [unknown location] [unknown:139959314124814]
16: [unknown location] g_signal_emit_valist
17: [unknown location] g_signal_emit
18: [unknown location] [unknown:139959341468378]
19: [unknown location] [unknown:139959341504808]
20: [unknown location] gtk_main_do_event
21: [unknown location] [unknown:139959334905701]
22: [unknown location] [unknown:139959334971381]
23: [unknown location] [unknown:139959334971544]
24: [unknown location] [unknown:139959334971544]
25: [unknown location] [unknown:139959334971544]
26: [unknown location] [unknown:139959334971544]
27: [unknown location] [unknown:139959334971544]
28: [unknown location] [unknown:139959334971544]
29: [unknown location] [unknown:139959334975990]
30: [unknown location] [unknown:139959334976496]
31: [unknown location] wxWindow::Update()
32: [unknown location] wxTabFrame::DoSizing()
33: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
34: [unknown location] wxSizer::Layout()
35: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
36: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
37: [unknown location] wxSizer::Layout()
38: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
39: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
40: [unknown location] wxSizer::Layout()
41: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
42: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
43: [unknown location] wxSizer::Layout()
44: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
45: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
46: [unknown location] wxSizer::Layout()
47: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
48: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
49: [unknown location] wxSizer::Layout()
50: [unknown location] wxWindowBase::Layout()
51: [unknown location] wxAuiManager::DoFrameLayout()
52: [unknown location] wxAuiManager::OnSize(wxSizeEvent&)
53: [unknown location] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
54: [unknown location] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
55: [unknown location] wxEvtHandler::TryHereOnly(wxEvent&)
56: [unknown location] wxEvtHandler::ProcessEventLocally(wxEvent&)
57: [unknown location] wxEvtHandler::ProcessEvent(wxEvent&)
58: [unknown location] wxEvtHandler::SafelyProcessEvent(wxEvent&)
59: [unknown location] wxWindow::DoSetSize(int, int, int, int, int)
60: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
61: [unknown location] wxSizer::Layout()
62: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
63: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
64: [unknown location] wxSizer::Layout()
65: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
66: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
67: [unknown location] wxSizer::Layout()
68: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
69: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
70: [unknown location] wxSizer::Layout()
71: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
72: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
73: [unknown location] wxSizer::Layout()
74: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
75: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
76: [unknown location] wxSizer::Layout()
77: [unknown location] wxWindowBase::Layout()
78: [unknown location] wxTopLevelWindowBase::Layout()
79: [unknown location] wxAuiManager::DoFrameLayout()
80: [unknown location] wxAuiManager::OnSize(wxSizeEvent&)
81: [unknown location] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
82: [unknown location] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
83: [unknown location] wxEvtHandler::TryHereOnly(wxEvent&)
84: [unknown location] wxEvtHandler::ProcessEventLocally(wxEvent&)
85: [unknown location] wxEvtHandler::ProcessEvent(wxEvent&)
86: [unknown location] wxEvtHandler::SafelyProcessEvent(wxEvent&)
87: [unknown location] wxWindowBase::SendSizeEvent(int)
88: [unknown location] g_closure_invoke
89: [unknown location] [unknown:139959314123681]
90: [unknown location] g_signal_emit_valist
91: [unknown location] g_signal_emit
92: [unknown location] [unknown:139959334943266]
93: [unknown location] [unknown:139959334858880]
94: [unknown location] [unknown:139959311056419]
95: [unknown location] g_main_context_dispatch
96: [unknown location] [unknown:139959311054704]
97: [unknown location] g_main_loop_run
98: [unknown location] gtk_main
99: [unknown location] wxGUIEventLoop::DoRun()
100: [unknown location] wxEventLoopBase::Run()
101: [unknown location] wxAppConsoleBase::OnRun()
102: [unknown location] wxEntry(int&, wchar_t**)
103: [unknown location] main
104: [unknown location] __libc_start_main
105: [unknown location] _start
Last Log Messages:
Can't convert "lineid" to an integer (invalid)
Can't convert "lineid" to an integer (invalid)
Can't convert "lineid" to an integer (invalid)
Can't convert "lineid" to an integer (invalid)
SLADE Initialisation OK
wxWebView Error: Load request cancelled
Opening directory [REMOVED] as archive
Opening took 273 ms
Setting up the OpenGL context
Failed to setup the OpenGL context
Looks like it's due to this from the log:
Setting up the OpenGL context
Failed to setup the OpenGL context
If you're using Wayland, try running slade from the console like GDK_BACKEND=x11 slade
I'm not using Wayland. Actually, I can successfully open the TEXTUREx editor after previewing any kind of graphics (these would set up the OpenGL Context correctly) but the texture preview within the TEXTUREx editor would still be missing.

I also got this when running slade from console
~$ env GDK_BACKEND=x11 slade
(slade:15881): GLib-GObject-WARNING **: 02:57:29.442: invalid cast from 'GtkMenuItem' to 'GtkImageMenuItem'
(slade:15881): Gtk-CRITICAL **: 02:57:29.442: gtk_image_menu_item_set_image: assertion 'GTK_IS_IMAGE_MENU_ITEM (image_menu_item)' failed
I'm getting a similar problem, but it just instantly crashes instead. Terminal output is as follows:
(slade:219808): GLib-GObject-WARNING **: 20:40:21.933: invalid cast from 'GtkMenuItem' to 'GtkImageMenuItem'
(slade:219808): Gtk-CRITICAL **: 20:40:21.933: gtk_image_menu_item_set_image: assertion 'GTK_IS_IMAGE_MENU_ITEM (image_menu_item)' failed
(slade:219808): Gdk-WARNING **: 20:40:27.334: The program 'slade' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 55253 error_code 3 request_code 148 (unknown) minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
i'm having this same issue, i tried opening it on wayland and it now it wont crash but it's still unusable.
I am using flatpak and having the same issue.
Also having this issue with the flatpak of Slade v3.2.1 on Linux with X11
it seems to work on X11 when using a wxwidgets built without EGL, either via ./configure --disable-glcanvasegl or cmake -DwxUSE_GLCANVAS_EGL=OFF.
as Xindage said, it does kind of work on wayland, however the EGL backend on most recent wxWidgets (3.2.2.1) has bugs which make it effectively unusable (https://github.com/wxWidgets/wxWidgets/issues/22580). using a wxwidgets without EGL along with the environment variable GDK_BACKEND=x11 does seem to work on sway, albeit through xwayland.
this PKGBUILD which builds wxwidgets without EGL may be convenient if you are on archlinux.
I already worked around in my system and I'm not going to fight with slade anymore, I used distrobox and installed slade (old version) on a contained debian system. Not even debian is safe from this crash on the least version as well.
Same on Arch Linux, using both the regular and -git variants available on the AUR. I'm using an NVidia 1060 if it matters, since OpenGL stuff seems to be the culprit. Moved my error log to a gist because it's huge.
Those "Can't convert to an integer" messages are interesting though. I'll try the suggestion to disable EGL.
EDIT: yep, that fixed the problem.
I think this one could possibly be fixed in the latest wxWidgets 3.2.2, at least on my laptop with Ubuntu 23.04 and the latest wx3.2.2 packages I don't get this crash or the weird issues with the opengl canvas showing in the wrong place that I was getting with wx3.1.6/ubuntu 22.04
I think this has been fixed for a while now, since ever since I moved to 3.2.1 I haven't experienced crashes when opening any TEXTURES lump or similar.
It's not fixed on arch linux with also wxwidgets 3.2.2, as it still crashes while opening any TEXTUREx editor
@sirjuddington Yes, still not fixed, same problem with wx 3.2.2 and slade 3.2.4 I also get the following warning when compiling:
[ 75%] Building CXX object src/CMakeFiles/slade.dir/TextEditor/UI/SCallTip.cpp.o
/home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/TextEditor/UI/SCallTip.cpp: Dans la fonction membre « void slade::SCallTip::updateBuffer() »:
/home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/TextEditor/UI/SCallTip.cpp:594:25: attention: « virtual void wxBitmap::SetWidth(int) » est obsolète [-Wdeprecated-declarations]
594 | buffer_.SetWidth(1000);
| ~~~~~~~~~~~~~~~~^~~~~~
Dans le fichier inclus depuis /usr/include/wx-3.2/wx/aboutdlg.h:13,
depuis /home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/common.h:5,
depuis /home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/cotire/slade_CXX_prefix.cxx:4,
depuis /home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/cotire/slade_CXX_prefix.hxx:4:
/usr/include/wx-3.2/wx/gtk/bitmap.h:126:23: note: déclaré ici
126 | wxDEPRECATED(void SetWidth( int width ) wxOVERRIDE);
| ^~~~~~~~
/usr/include/wx-3.2/wx/defs.h:671:43: note: dans la définition de la macro « wxDEPRECATED »
671 | #define wxDEPRECATED(x) wxDEPRECATED_DECL x
| ^
/home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/TextEditor/UI/SCallTip.cpp:595:26: attention: « virtual void wxBitmap::SetHeight(int) » est obsolète [-Wdeprecated-declarations]
595 | buffer_.SetHeight(1000);
| ~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/wx-3.2/wx/gtk/bitmap.h:125:23: note: déclaré ici
125 | wxDEPRECATED(void SetHeight( int height ) wxOVERRIDE);
| ^~~~~~~~~
/usr/include/wx-3.2/wx/defs.h:671:43: note: dans la définition de la macro « wxDEPRECATED »
671 | #define wxDEPRECATED(x) wxDEPRECATED_DECL x
| ^
/home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/TextEditor/UI/SCallTip.cpp:599:25: attention: « virtual void wxBitmap::SetWidth(int) » est obsolète [-Wdeprecated-declarations]
599 | buffer_.SetWidth(size.GetWidth());
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/wx-3.2/wx/gtk/bitmap.h:126:23: note: déclaré ici
126 | wxDEPRECATED(void SetWidth( int width ) wxOVERRIDE);
| ^~~~~~~~
/usr/include/wx-3.2/wx/defs.h:671:43: note: dans la définition de la macro « wxDEPRECATED »
671 | #define wxDEPRECATED(x) wxDEPRECATED_DECL x
| ^
/home/steven/.cache/yay/slade/src/SLADE-3.2.4/src/TextEditor/UI/SCallTip.cpp:600:26: attention: « virtual void wxBitmap::SetHeight(int) » est obsolète [-Wdeprecated-declarations]
600 | buffer_.SetHeight(size.GetHeight());
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/wx-3.2/wx/gtk/bitmap.h:125:23: note: déclaré ici
125 | wxDEPRECATED(void SetHeight( int height ) wxOVERRIDE);
| ^~~~~~~~~
/usr/include/wx-3.2/wx/defs.h:671:43: note: dans la définition de la macro « wxDEPRECATED »
671 | #define wxDEPRECATED(x) wxDEPRECATED_DECL x
| ^
(Sorry for the french)