Pyfa icon indicating copy to clipboard operation
Pyfa copied to clipboard

Linux version crashes on startup

Open jasconius opened this issue 8 months ago • 16 comments

Linux version 2.66.1 AppImage crashes two or three seconds after startup as of 4/1

I strongly suspect that this is the update popup window causing the crash as the application was working fine prior to the release of 2.66.2

jasconius avatar Apr 01 '26 15:04 jasconius

https://ci.appveyor.com/project/pyfa-org/pyfa/builds/54467077/job/pe242als8x4bq4qq/artifacts please try this build and let me know if it works

@tadeasf same request. It's the build with your changes

DarkFenX avatar Jul 31 '26 10:07 DarkFenX

Image works fine on fedora @DarkFenX would imagine this isn't anything distro-dependent

tadeasf avatar Jul 31 '26 10:07 tadeasf

Well, the fix shouldn't be. The appimage itself is - e.g. it does not work on debian testing:

$ ./pyfa-v2.68.0+6-gab6bc94b0-linux.AppImage 
Failed loading SDL3 library.
Aborted                    ./pyfa-v2.68.0+6-gab6bc94b0-linux.AppImage

But this is old news. Issue is deeper than pyfa updater code, obviously. I will check it later.

DarkFenX avatar Jul 31 '26 11:07 DarkFenX

Well, the fix shouldn't be. The appimage itself is - e.g. it does not work on debian testing:

$ ./pyfa-v2.68.0+6-gab6bc94b0-linux.AppImage 
Failed loading SDL3 library.
Aborted                    ./pyfa-v2.68.0+6-gab6bc94b0-linux.AppImage

But this is old news. Issue is deeper than pyfa updater code, obviously. I will check it later.

hmmm, that's interesting. i can potentially spin up a box during the weekend and test it out, but it's kinda a hassle so if you'll have infra for it already i'll happily leave it up to you

tadeasf avatar Jul 31 '26 12:07 tadeasf

@DarkFenX I think I found the chain:

  1. wxPython uses libwx_gtk3u_core-3.2.so.0 and this has a hard DT_NEED set for libSDL2-2.0.so.0 (wxwidgerts uses SDL for wxSound) so it loads on import wx
  2. SDL2 is not bundled in the AppImage. Why tho? wcuz the wheel is installed via pip in after_bundle -> after appimage-builder finishes apt deps resolution - so nothing pulls SDL in. on my fedora desktop it works cuz fedora has real SDL2. sid debian tho? it uses sdl2-compat 2.32.70+ds-1
  3. sdl2-compat ELF constructor is weird so it throws bare message plus SIGABRT with no traceback, very javascripty of it (jkjk) but apparently it's this:
dllinit() { if (!LoadSDL3()) { error_dialog(loaderror); abort(); } }, with loaderror = "Failed loading SDL3 library." on dlopen("libSDL3.so.0")

dlopen fails even if libsdl3-0 is installed , LD_DEBUG=libs:

/appdir/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0: error: version lookup error: version 'V_1.10.0' not found (required by /usr/lib/x86_64-linux-gnu/libSDL3.so.0).

host SDL3 3.4.14 needs xkbcommon higher than 1.10, the appimage forces its bundled jammy 1.4.0

i reproduced this pretty little chain of dependency hell via podman debian:testing container. bare image fails on libX11 and X libs fails on libSDL2-2.0.so.0 cannot open shared object file proving it's not bundled. + libsdl2-2.0.0 does the same shit

imo fix is to just include libsdl2-2.0-0 in apt.include in AppImageBuilder yaml

tadeasf avatar Aug 17 '26 20:08 tadeasf

@DarkFenX monthly bump

tadeasf avatar Sep 13 '26 21:09 tadeasf

@tadeasf i was working on a separate branch to update dependencies, and didn't check the bug tracker, sorry. I will push new release as-is today; it is very likely to be buggy, so I will be fixing reported issues and making a bugfix release later this week.

Could you check if your fix still holds against new build with new wx?

DarkFenX avatar Sep 22 '26 14:09 DarkFenX

@DarkFenX i'll have a look during the weekend, is that quick enough? blocked with work until then

tadeasf avatar Sep 24 '26 08:09 tadeasf

@tadeasf it is fine (nobody reported new issues anyway). New appimage launches on my machine just fine btw, so probably this is no longer necessary.

DarkFenX avatar Sep 24 '26 12:09 DarkFenX

@DarkFenX okay. let me know if i can help with any other issues, i'll be happy to fix some other stuff. i've already accustomed myself with a bit of the codebase so i'd love to leverage that if possible before i'll forget it again

tadeasf avatar Sep 24 '26 14:09 tadeasf

I need help with debugging windows-specific issues, but I guess you cannot help with that.

Let me know once you tested this issue on your rig, so that I can close it.

DarkFenX avatar Sep 24 '26 22:09 DarkFenX

I think this does indeed have something to do with the update popup. I've been using the crash on startup as the notification a new version is available :D

sicks avatar Sep 28 '26 04:09 sicks

@tadeasf it is fine (nobody reported new issues anyway). New appimage launches on my machine just fine btw, so probably this is no longer necessary.

confirmed, works fine on my box, spun ubuntu one, works on that as well

regarding windows, I have a drive with W11 on it for gaming purposes so I am well able to help out in that regard

tadeasf avatar Sep 29 '26 00:09 tadeasf

Confirming the cause and the fix on Arch (Omarchy/Hyprland, Wayland, AMD Strix Halo iGPU, Mesa 26.2.2).

v2.68.0 aborted ~1s after startup once v2.69.0 was out: the update dialog's wx.html2.WebView made the bundled WebKitGTK abort with Could not create surfaceless EGL display: EGL_BAD_ALLOC. Aborting....

On my machine the root cause wasn't helper-process spawning but EGL: the AppImage bundles libwayland-client.so.0.20.0 (from Ubuntu jammy), and the host's libEGL_mesa.so.0 fails to load against it with undefined symbol: wl_fixes_interface (that symbol arrived in wayland 1.24). That leaves glvnd with no working EGL driver, so WebKit aborts.

v2.69.0 starts cleanly here, since webViewAvailable() now skips the WebView on wxGTK. Note that the bundled libwayland 1.20 is still in 2.69.0, so any future GL/EGL use inside the AppImage would hit the same thing on distros with a newer Mesa.

kirilan avatar Oct 03 '26 19:10 kirilan

@kirilan would you include extra libs / exclude some from appimage?

I didn't really plan what to include properly; I just made an image which worked on my rig, and then fixed issues the path of least resistance (usually "include extra libs" until it works whenever people had issues).

DarkFenX avatar Oct 06 '26 15:10 DarkFenX

Closing this one; still ping me if you think set of dependencies in appimage needs to be changed

DarkFenX avatar Oct 08 '26 10:10 DarkFenX