Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEXTUREx editor multiple issues both on Linux and Windows #1672

Open
jmfergeau opened this issue Feb 27, 2024 · 45 comments
Open

TEXTUREx editor multiple issues both on Linux and Windows #1672

jmfergeau opened this issue Feb 27, 2024 · 45 comments
Labels

Comments

@jmfergeau
Copy link

jmfergeau commented Feb 27, 2024

SLADE Version

3.2.5, 3.2.6

OS

Windows, Linux

Editor

Resource editor

Steps to Reproduce and Observed Behavior

  1. Open a wad or a folder
  2. Double-click on a texture lump
  3. On Linux, Two things might happen. Slade might just abruptly crash and close with no errors. Or if it didn't crash, the editor will work as intended but the graphical part where you can drag the elements to set the offset will not display anything. It will just display what was behind it before (or just a pitch black window) and will not be usable at all. On Windows, it doesn't crash, but the graphical part is not usable either, displaying this time a pitch red window instead.

Expected Behavior

the Texturex editor should display the window editor correctly and be fully interactive

NOTE: For the crash on linux, I found a workaround. Very weird, but it works:

  1. Open slade and open a wad or folder
  2. Open a map with the map editor
  3. Grab a linedef and attempt to click the special menu to change it
  4. An error dialog will appear. Uncheck the "show dialog next time" and click continue
  5. Cancel the special change and close the map editor
  6. Double-click the TEXTURE lump. No more crash.

Sorry if it has already been posted. I checked everywhere but haven't found anything similar.

Screenshots

The inoperant window on Windows 11

The inoperant window on Linux

@jmfergeau jmfergeau added the bug label Feb 27, 2024
@jmfergeau
Copy link
Author

Some additional notes:

I noticed the zoom in and out are somehow working since it can be done using the mousewheel. But nothing displays. I suspect the checkboxes are doing the same.

The fields around the graphic interface are all working and saving the changes works. But it's very difficult to do anything when you can't see what you're doing.

@UnBeatWaterGH
Copy link

Here's a slightly similar issue I made in July last year: #1549

@jmfergeau
Copy link
Author

Things got even worse lately.

Now not only the Start page just displays a blank window (fortunately you can still open files and folders using the menu) the TEXTUREx editor freezes entirely SLADE now...

@kinker31
Copy link

kinker31 commented Apr 4, 2024

I'm having the same issue on Linux, where the program instantly crashes, without even so much as a "This program crashed!" dialog box. Luckily, I was able to get it running on my terminal, and when I reproduced the bug, this is what it gave me:

01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it
01:46:01: Debug: window wxControl@0x564cfb4dec90 ("stbutton") lost focus even though it didn't have it

(slade:50390): Gdk-WARNING **: 01:46:01.931: 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 28145 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 was not able to get anything else from the terminal whilst I was running the program.

@MyThoughtsAreTurquoise
Copy link

Same issues here. Everything else works just fine, but whenever i open a TEXTURES lump i get one of two things: texture
preview window is black or a crash. luckely i get a application crash notification:

Version: 3.2.5
No current action

Operating System: Linux 5.15.0-105-generic x86_64
Graphics Vendor: OpenGL not initialised
Graphics Hardware: OpenGL not initialised
OpenGL Version: OpenGL not initialised

Stack Trace:

Last Log Messages:
Loading game configurations
SLADE Initialisation OK
Can't convert "-" to an integer (invalid)
Can't convert "" to an integer (invalid)
Can't convert "[" to an integer (invalid)
Can't convert "[" to an integer (invalid)
Opening archive /home/odysseus/modBench/Doom/export/mods/qcWeapons/004/qcWeapons4
Opening took 86 ms
Setting up the OpenGL context
Failed to setup the OpenGL context

On my end the crash only happens when i close the program and then try to open the TEXTURES lump for the second time. Whenever i create one, add textures to it and open it up for the first time, the program doesn't crash but then again no preview, just the UI Elements and a black preview window.

Screenshot at 2024-05-03 16-15-57

I'm using the flatpak version, platforms etc... are all up to date.

Some info about my OS:

System:
Kernel: 5.15.0-105-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
Desktop: Openbox 3.6.1 dm: LightDM Distro: Linux Mint 21 Vanessa
base: Ubuntu 22.04 jammy

Graphics:
Device-1: NVIDIA GM200 [GeForce GTX 980 Ti] vendor: Micro-Star MSI
driver: nvidia v: 535.171.04 pcie: speed: 2.5 GT/s lanes: 2 ports:
active: none off: HDMI-A-1 empty: DP-1, DP-2, DP-3, DVI-I-1
bus-ID: 01:00.0 chip-ID: 10de:17c8
Display: x11 server: X.Org v: 1.21.1.4 compositor: Compton v: 1 driver:
X: loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 92
Monitor-1: HDMI-0 res: 1920x1080 dpi: 92 diag: 609mm (24")
OpenGL: renderer: NVIDIA GeForce GTX 980 Ti/PCIe/SSE2
v: 4.6.0 NVIDIA 535.171.04 direct render: Yes

@jmfergeau
Copy link
Author

Updated to 3.2.6 and there's some new. Now, when opening a TEXTURE file, the following crash log is reported, similar to #1685 :

Version: 3.2.6
No current action

Operating System: Linux 6.9.2-zen1-1-zen x86_64
Graphics Vendor: OpenGL not initialised
Graphics Hardware: OpenGL not initialised
OpenGL Version: OpenGL not initialised

Stack Trace:
0: [unknown location] [unknown:127534448105524]
1: [unknown location] [unknown:127534350915172]
2: [unknown location] [unknown:127534421576416]
3: [unknown location] [unknown:96352725713355]
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] [unknown:127534468043246]
12: [unknown location] [unknown:127534436419541]
13: [unknown location] [unknown:127534439301320]
14: [unknown location] g_closure_invoke
15: [unknown location] [unknown:127534428474597]
16: [unknown location] [unknown:127534428409408]
17: [unknown location] g_signal_emit_valist
18: [unknown location] g_signal_emit
19: [unknown location] [unknown:127534439367106]
20: [unknown location] [unknown:127534439425475]
21: [unknown location] gtk_main_do_event
22: [unknown location] [unknown:127534435120071]
23: [unknown location] [unknown:127534435196354]
24: [unknown location] [unknown:127534435196215]
25: [unknown location] [unknown:127534435196215]
26: [unknown location] [unknown:127534435196215]
27: [unknown location] [unknown:127534435196215]
28: [unknown location] [unknown:127534435196215]
29: [unknown location] [unknown:127534435196215]
30: [unknown location] [unknown:127534435214815]
31: [unknown location] [unknown:127534435215354]
32: [unknown location] wxWindow::Update()
33: [unknown location] [unknown:127534468464323]
34: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
35: [unknown location] wxSizer::Layout()
36: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
37: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
38: [unknown location] wxSizer::Layout()
39: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
40: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
41: [unknown location] wxSizer::Layout()
42: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
43: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
44: [unknown location] wxSizer::Layout()
45: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
46: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
47: [unknown location] wxSizer::Layout()
48: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
49: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
50: [unknown location] wxSizer::Layout()
51: [unknown location] wxWindowBase::Layout()
52: [unknown location] wxAuiManager::DoFrameLayout()
53: [unknown location] wxAuiManager::OnSize(wxSizeEvent&)
54: [unknown location] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
55: [unknown location] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
56: [unknown location] wxEvtHandler::TryHereOnly(wxEvent&)
57: [unknown location] wxEvtHandler::ProcessEventLocally(wxEvent&)
58: [unknown location] wxEvtHandler::ProcessEvent(wxEvent&)
59: [unknown location] wxEvtHandler::SafelyProcessEvent(wxEvent&)
60: [unknown location] wxWindow::DoSetSize(int, int, int, int, int)
61: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
62: [unknown location] wxSizer::Layout()
63: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
64: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
65: [unknown location] wxSizer::Layout()
66: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
67: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
68: [unknown location] wxSizer::Layout()
69: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
70: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
71: [unknown location] wxSizer::Layout()
72: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
73: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
74: [unknown location] wxSizer::Layout()
75: [unknown location] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
76: [unknown location] wxBoxSizer::RepositionChildren(wxSize const&)
77: [unknown location] wxSizer::Layout()
78: [unknown location] wxWindowBase::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] [unknown:127534456292807]
89: [unknown location] g_closure_invoke
90: [unknown location] [unknown:127534428475471]
91: [unknown location] [unknown:127534428411356]
92: [unknown location] g_signal_emit_valist
93: [unknown location] g_signal_emit
94: [unknown location] [unknown:127534435176157]
95: [unknown location] [unknown:127534435093104]
96: [unknown location] [unknown:127534428978906]
97: [unknown location] [unknown:127534428973705]
98: [unknown location] [unknown:127534429374903]
99: [unknown location] g_main_loop_run
100: [unknown location] gtk_main
101: [unknown location] wxGUIEventLoop::DoRun()
102: [unknown location] wxEventLoopBase::Run()
103: [unknown location] wxAppConsoleBase::MainLoop()
104: [unknown location] wxEntry(int&, wchar_t**)
105: [unknown location] main
106: [unknown location] [unknown:127534421482632]
107: [unknown location] __libc_start_main
108: [unknown location] [unknown:96352721100549]

Last Log Messages:
Loading game configurations
SLADE Initialisation OK
Can't convert "-" to an integer (invalid)
Can't convert "\" to an integer (invalid)
Can't convert "[" to an integer (invalid)
Can't convert "[" to an integer (invalid)
Opening directory /home/max/Documents/yumedoom as archive
Opening took 9833 ms
Setting up the OpenGL context
Failed to setup the OpenGL context

It seems to not find openGL. Though it's installed. (i use mesa drivers)

(Also the problem with the Start page not loading is still there)

@sirjuddington
Copy link
Owner

What version of wxWidgets is it built with? Should say in the console log. I think there might be some issue with the version of wx that the flatpak SLADE is built with

@jmfergeau
Copy link
Author

jmfergeau commented May 29, 2024

I don't use flatpak. I build slade using AUR. Here in this case I compiled slade manually since AUR is not up-to-date yet.

I use wxwidgets v3.2.5

I'm going to try the flatpak version though, just to check.

EDIT: well, same problem, both with the start page (becoming pitch black though, instead of just empty) and same error with TEXTURE lump.

@jmfergeau
Copy link
Author

I switched to debian for multiple reasons but still same problem in there. I use the flatpak version. (and the crash handler also crashes :| )

@jmfergeau
Copy link
Author

jmfergeau commented Jul 5, 2024

I switched from flatpak to the debian package available in the drd repos. And all the problems i mentionned got fixed. Start page works again and no issues at all when editing TEXTUREx.

So, tempoprary fix: use Debian and install Slade using the debian drd repo. 🤷‍♂️

Note though: The debian package version needs the libwebkit2gtk-4.0-37 dependency thought it won't be install with slade. libwebkit2gtk-4.1 is released but not detected and used by slade. (for reasons?)

@Blzut3
Copy link
Collaborator

Blzut3 commented Jul 5, 2024

Compatibility with all currently supported versions of Debian and Ubuntu. That said the latest package should have binaries for both (it would be possible to make a single universal binary but I don't really feel like going that deep into dependency building). Which is used is determined by /usr/bin/slade by running:

ldconfig -N -p | awk '$1 == "libwebkit2gtk-4.1.so.0"'

Does this return nothing for you?

@jmfergeau
Copy link
Author

jmfergeau commented Jul 6, 2024

ldconfig -N -p | awk '$1 == "libwebkit2gtk-4.1.so.0"'

Does this return nothing for you?

It returns me this:

        libwebkit2gtk-4.1.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0

@Blzut3
Copy link
Collaborator

Blzut3 commented Jul 6, 2024

That's the expected output, so it should be running the 4.1 binary.

@jmfergeau
Copy link
Author

And yet, if i launch slade without libwebkit2gtk-4.0, i get this and it doesn't run:

/usr/bin/slade: 4: ldconfig: not found
/usr/share/slade/slade.legacy: error while loading shared libraries: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory

@Blzut3
Copy link
Collaborator

Blzut3 commented Jul 7, 2024

You edited out your note about ldconfig needing to specifically be /sbin/ldconfig. Did you have new information or what that still valid?

I can change the script to specifically call /sbin/ldconfig in the next build, but Ubuntu definitely puts /sbin in the PATH by default. A bit surprised Debian would differ there. You can modify /usr/bin/slade accordingly in the mean time, apt should unconditionally overwrite the file on package upgrade.

@jmfergeau
Copy link
Author

Ubuntu might do that but pure Debian definitely doesn't add sbin in $PATH for non-root users by default since version 10. Because they expect all the programs in there to be able to run as root only. (Except it's not true. For instance you can do mkfs.msdos to make a floppy image file without the need to be root) But well, Debian is Debian. 🤷‍♂️

So yeah maybe it would be relevant to add /sbin/ in next build, just in case other pure Debian or pure Debian-based users uses Slade (I can't be the only one on the whole planet, eh? :p )

@SkullGamer205
Copy link

SkullGamer205 commented Jul 31, 2024

uname -a

Linux SkullGamer205-PC 6.9.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 12 Jun 2024 20:17:17 +0000 x86_64 GNU/Linux

wxWidgets ver: 3.2.5-1
Slade ver: 3.2.6-2

On X11 (AwesomeWM): Slade crashes after open TEXTUREx editor
On Wayland (Weston): Works, but with black screen. See below
photo_2024-07-31_20-59-52

photo_2024-07-31_20-59-57

@SkullGamer205
Copy link

uname -a

Linux SkullGamer205-PC 6.9.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 12 Jun 2024 20:17:17 +0000 x86_64 GNU/Linux

wxWidgets ver: 3.2.5-1 Slade ver: 3.2.6-2

On X11 (AwesomeWM): Slade crashes after open TEXTUREx editor On Wayland (Weston): Works, but with black screen. See below photo_2024-07-31_20-59-52

photo_2024-07-31_20-59-57

Black screen also show on X11 with nvidia (i.e prime slade), but after several seconds Slade crashed.
изображение

@jmfergeau
Copy link
Author

Heads up to say I had to ditch debian cuz issues and had to return to arch. And i'm still facing the problem :(

@kinker31
Copy link

kinker31 commented Nov 9, 2024

Although I'm still having the issue on the native Linux excecutable, I don't experience this problem when I'm running the Windows .exe on Wine. I'd love to get the stack trace, but the program crashes before the window even shows up, and trying to run the program with a terminal only gives a "button lost focus even though it didn't have it" debug message.

If it helps, I use the linux-zen kernel on Arch Linux, with AMD architecture.

@jmfergeau
Copy link
Author

Although I'm still having the issue on the native Linux excecutable, I don't experience this problem when I'm running the Windows .exe on Wine. I'd love to get the stack trace, but the program crashes before the window even shows up, and trying to run the program with a terminal only gives a "button lost focus even though it didn't have it" debug message.

If it helps, I use the linux-zen kernel on Arch Linux, with AMD architecture.

That's the thing. I, like all the others who got the problem, use nvidia.

@nkalkhof
Copy link

Although I'm still having the issue on the native Linux excecutable, I don't experience this problem when I'm running the Windows .exe on Wine. I'd love to get the stack trace, but the program crashes before the window even shows up, and trying to run the program with a terminal only gives a "button lost focus even though it didn't have it" debug message.
If it helps, I use the linux-zen kernel on Arch Linux, with AMD architecture.

That's the thing. I, like all the others who got the problem, use nvidia.

I don't think it is GPU(driver) related because I'm having the same issues on Gentoo Linux running an Intel UHD630 GT2 iGPU. I Successfully build the latest git master using the cmake flag to pull and build it's own wxWidgets. Still the same crash. No idea why @sirjuddington won't try fix that. Maybe he cannot reproduce it?!

@Blzut3
Copy link
Collaborator

Blzut3 commented Nov 18, 2024

Well jmfergeau noted that it doesn't happen on Debian with my packages. I can't say I'm doing anything particularly special with my packages besides building wxWidgets and SFML myself for static linking. My binaries are built with GCC 11.

wxWidgets build:

cmake .. -DwxBUILD_TOOLKIT=gtk3 -DCMAKE_BUILD_TYPE=Release -DwxBUILD_SHARED=OFF -DwxUSE_LIBTIFF=builtin -DwxUSE_LIBLZMA=sys -DwxUSE_LIBPNG=builtin -DCMAKE_INSTALL_PREFIX=$UsrPrefix -DwxUSE_LIBJPEG=builtin -DwxUSE_WEBVIEW=ON -DwxUSE_REGEX=builtin -DwxUSE_GLCANVAS_EGL=OFF

Slade build:

cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_WXPATH=$UsrPrefix -DSFML_CONFIG=$UsrPrefix/lib/cmake/SFML/SFMLConfig.cmake -DSFML_STATIC_LIBRARIES=TRUE -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DSFML_LIBRARY="sfml-system;sfml-audio;sfml-network;sfml-window" -DFLUIDSYNTH_LIBRARIES=fluidsynth

Nothing special about the SFML build.

@kinker31
Copy link

Well jmfergeau noted that it doesn't happen on Debian with my packages. I can't say I'm doing anything particularly special with my packages besides building wxWidgets and SFML myself for static linking. My binaries are built with GCC

Might be a case of wxWidgets having different versions and/or code on different distros then?

Completely at a loss for ideas if not, but if so, maybe Slade should bundle the version of wxWidgets known to fully work instead on relying on the distro for the dependency?

@nkalkhof
Copy link

cmake .. -DwxBUILD_TOOLKIT=gtk3 -DCMAKE_BUILD_TYPE=Release -DwxBUILD_SHARED=OFF -DwxUSE_LIBTIFF=builtin -DwxUSE_LIBLZMA=sys -DwxUSE_LIBPNG=builtin -DCMAKE_INSTALL_PREFIX=$UsrPrefix -DwxUSE_LIBJPEG=builtin -DwxUSE_WEBVIEW=ON -DwxUSE_REGEX=builtin -DwxUSE_GLCANVAS_EGL=OFF=OFF

Thanks for the hint. Using -DwxUSE_GLCANVAS_EGL=OFF building WxWidgets and rebuilding slade did the trick for me.

@Blzut3
Copy link
Collaborator

Blzut3 commented Nov 19, 2024

Might be a case of wxWidgets having different versions and/or code on different distros then?

No. Since Slade so often finds bugs in wxWidgets it's not viable for my packages to use a system provided copy of wxWidgets while still retaining 5 years of back support for Ubuntu/Debian versions. The latest version is compiled from the official sources and statically linked.

However like most projects, the build system for wxWidgets auto detects what's available on the system and configures itself so builds can differ. Or I guess in this case I intentionally disable a feature since it has been noted to be problematic with the current version of wxWidgets.

Thanks for the hint. Using -DwxUSE_GLCANVAS_EGL=OFF building WxWidgets and rebuilding slade did the trick for me.

Oh that's a little surprising. I was under the impression that others in this thread would have already tried that. It has been noted that wxWidgets without EGL fixes a TEXTURE editor crash here: #1390 (comment)

@kinker31
Copy link

kinker31 commented Jan 2, 2025

Although the AUR's pkgbuild has had the -DwxUSE_GLCANVAS_EGL=OFF for quite a bit now, I'm still running into the same issue. Both the release and git package crash when I test this. If I had to hazard a guess, I'm not sure the flag that's supposed to be solving the issue is even working, given how this shows up when I build/install the package:

CMake Warning:
  Manually-specified variables were not used by the project:

    wxUSE_GLCANVAS_EGL

EDIT: ...now the program immediately crashes when opening any kind of sound.

@Blzut3
Copy link
Collaborator

Blzut3 commented Jan 3, 2025

That needs to be specified on the wxWidgets build not SLADE. The AUR package maintainer will need to build a custom wxWidgets as part of the SLADE package instead of using the system copy.

For the sound thing, make sure you're using SFML 2.6 instead of SFML 3.0 as that sounds like #1759.

@envolution
Copy link

envolution commented Jan 3, 2025

@kinker31 @Blzut3 can you please try (on arch)

$ GDK_BACKEND=x11 slade

and see if you can reproduce the error?

If that doesn't resolve it, please try install https://aur.archlinux.org/packages/wxwidgets-gtk3-noegl
and use the same GDK_BACKEND launch command

@kinker31
Copy link

kinker31 commented Jan 3, 2025

@kinker31 @Blzut3 can you please try GDK_BACKEND=x11 slade and see if you can reproduce the error?

If that doesn't resolve it, please install https://aur.archlinux.org/packages/wxwidgets-gtk3-noegl and use the same GDK_BACKEND launch command

Although attempting to run Slade directly through the terminal gives me slade: symbol lookup error: slade: undefined symbol: _ZNK13wxGLCanvasEGL15IsShownOnScreenEv as a response, I can run the program just fine with the modified wxwidgets package.

victory
And I'm proud to finally say it works, at least for now.

@jmfergeau
Copy link
Author

Well, bad news. I've just installed the patched wxwidgets of @envolution and it resolved nothing for me. Still same problem both for TEXTUREx editor and the start page... So I guess the problem is something else for linux... :(

@envolution
Copy link

@jmfergeau I don't really want to commandeer this issue log, but please make sure you're calling slade with GDK_BACKEND=x11. I issued a new PKGBUILD that deprecates the need for wxwidgets-gtk-noegl so you can reinstall wxwidgets-gtk, then install slade, then run

$ GDK_BACKEND=x11 slade

if that doesn't work

$ ldd /usr/bin/slade | grep gtk3

and post to https://aur.archlinux.org/packages/slade
let's try keep the packaging issues/conversation there.

@Blzut3
Copy link
Collaborator

Blzut3 commented Jan 3, 2025

@envolution I use Ubuntu and maintain the deb package for Slade, so can't test your package but of course feel free to reach out if you need to compare notes.

For this issue in particular don't worry too much about causing too much packaging noise here since until something changes this is a packaging issue. As an aside, I think you might be able to set CMAKE_INSTALL_RPATH on the Slade build to avoid needing to run patchelf if you prefer.

@jmfergeau Given you say you have the start page issue definitely double check that you're running under XWayland (GDK_BACKEND=x11).

@jmfergeau
Copy link
Author

the real problem for me was that I forgot i was using the flatpak version. (for the reason that I could at least reach the editor with this one rather than having an abrupt crash on it.) So I reverted to the aur one. Though I noticed the aur package provides its own wxwidgets it builds with, so I have the feeling the slade built wants to use this one...

anyway @Blzut3 and @envolution I don't use wayland because nvidia so i'm already natively on x11. And still same problem, even if I add GDK_BACKEND=x11.

@envolution
Copy link

@jmfergeau i made another change to aur/slade that should (hopefully) resolve it for you

@Blzut3
Copy link
Collaborator

Blzut3 commented Jan 4, 2025

@jmfergeau Wayland should work on nvidia at this point, although I wouldn't blame you for wanting to give it a little more time to bake in their drivers. Interesting that you're seeing problems on native X11 though, would seem that the problem you're facing may be different from the common one everyone else is facing. You may want to do a debug build and get a complete stack trace (since the dump you posted in May doesn't have Slade symbol names).

@jmfergeau
Copy link
Author

jmfergeau commented Jan 5, 2025

@envolution I got the update and tried. Nothing changed, still crashing like before. :/ But well, thanks for trying.

@Blzut3 Wayland works for me but electron-chromium-based programs are having problems. And I use several of them (like discord and my browser) and can't afford to not use them. Anyway I tried gdb on slade but gdb simply refuses to let me because "/usr/bin/slade": not in executable format: file format not recognized... Though if you guys have any tips of things i can do to get you more info, i'd be glad to try.

EDIT: I noticed that, if i hit continue, I get more errors, but the TEXTUREx editor finally manages to open. It still has the same problem as on the flatpak, though. But it got me a thousand lines of backtraces that can maybe help.

backtrace.txt

@envolution
Copy link

If you're using the aur package, /usr/bin/slade is a shell script, /usr/bin/slade3.bin is the binary you'd want to open with gdb

@Blzut3
Copy link
Collaborator

Blzut3 commented Jan 5, 2025

Those assertions indicate that wxWidgets is failing to create an OpenGL context for some reason. (I assume other OpenGL software works fine.) Search results for that message don't reveal much except that maybe the attributes specified are incompatible? Don't know much about OpenGL programming so I really don't know what to make of any of that myself.

@envolution
Copy link

@jmfergeau I just want to rule out a possibility of you using older packages I created. Can you confirm you have the system wxwidgets and slade is linked properly to the custom one (as below)?

$ pacman -Q | grep -i wxwidgets-gtk
wxwidgets-gtk3 3.2.6-1

$ ldd /usr/bin/slade3.bin | grep -i gtk3
        libwx_gtk3u_aui-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_aui-3.2.so.0 (0x00007b4b0c55b000)
        libwx_gtk3u_gl-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_gl-3.2.so.0 (0x00007b4b0d57c000)
        libwx_gtk3u_stc-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_stc-3.2.so.0 (0x00007b4b0c200000)
        libwx_gtk3u_propgrid-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_propgrid-3.2.so.0 (0x00007b4b0c450000)
        libwx_gtk3u_webview-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_webview-3.2.so.0 (0x00007b4b0d54d000)
        libwx_gtk3u_core-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_core-3.2.so.0 (0x00007b4b0b800000)

@jmfergeau
Copy link
Author

@envolution here's what I got with the commands you sent:

pacman -Q | grep -i wxwidgets-gtk
wxwidgets-gtk3-noegl 3.2.6-1

ldd /usr/bin/slade3.bin | grep -i gtk3
        libwx_gtk3u_aui-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_aui-3.2.so.0 (0x0000722d8f75b000)
        libwx_gtk3u_gl-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_gl-3.2.so.0 (0x0000722d9078e000)
        libwx_gtk3u_stc-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_stc-3.2.so.0 (0x0000722d8f400000)
        libwx_gtk3u_propgrid-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_propgrid-3.2.so.0 (0x0000722d8f650000)
        libwx_gtk3u_webview-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_webview-3.2.so.0 (0x0000722d9075f000)
        libwx_gtk3u_core-3.2.so.0 => /usr/share/slade3/lib/libwx_gtk3u_core-3.2.so.0 (0x0000722d8ea00000)

Also, thanks for the point out. I could run gdb on slade and I got the following In this file slade_gdb_log.txt I don't know if it can help but just in case...

and yes @Blzut3 I have other stuff using opengl and they all run like a charm. Slade is the only one that doesn't. (And as I'm trying, I just noticed that even the map editor crashes on me. Which is very problematic to me since UDB is very bad on linux and I have no better alternatives for making maps now :( )

@envolution
Copy link

@jmfergeau you'll definitely want to replace wxwidgets-gtk3-noegl with wxwidgets-gtk3 - it was an unsuccessful attempt at working around the issue. It's no longer needed as you may notice aur/slade builds wxwidgets-gtk3 internally. I don't think this is causing the current issue for you, but it's not helping either.

@jmfergeau
Copy link
Author

@envolution well indeed since same problem with and without so I guess i can revert to the usual one at this point.

@jmfergeau
Copy link
Author

I found a temporary "fix" to use slade while waiting for the fix: make a vmware machine (because qemu and virtualbox failed there) then install debian then slade via the drd repo. Worked like a charm after some tweaks.

@jmfergeau
Copy link
Author

I found another issue that seems related to it: the "convert to png" is completely messed up if used on a pc that has the issues. On my tests, the texture ended up being grayscale and all messed up. Though, everything goes fine if I do it on my debian vm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants