Skip to content

Fix AppImage GStreamer and GResource loading failures#3

Merged
astrovm merged 1 commit intomainfrom
claude/fix-appimage-gstreamer-0Ymxk
Mar 25, 2026
Merged

Fix AppImage GStreamer and GResource loading failures#3
astrovm merged 1 commit intomainfrom
claude/fix-appimage-gstreamer-0Ymxk

Conversation

@astrovm
Copy link
Copy Markdown
Owner

@astrovm astrovm commented Mar 25, 2026

Summary

  • GStreamer fix: Set GTK_MEDIA=none and clear GST_PLUGIN_SYSTEM_PATH in the AppRun hook to prevent the bundled GStreamer media backend from loading system GStreamer libraries built against an incompatible (newer) GLib version. The app doesn't use media playback, so this has no functional impact.
  • GResource fix: Added exe-relative fallback logic in main.rs so the .gresource file is found even when the ADVENTURE_MODS_PKGDATADIR env var isn't set correctly. The binary at <prefix>/bin/ now looks for resources at ../share/adventure-mods/ relative to itself.
  • Error reporting: Changed silent .ok() swallowing of GResource load errors to an eprintln warning, making future debugging easier.

Test plan

  • Build AppImage via build-aux/appimage/build-appimage.sh
  • Run the AppImage on a system with newer GLib/GStreamer (e.g. Fedora 41+, Arch) and verify no GStreamer errors appear
  • Verify the app starts and shows the welcome page with game cards
  • Verify the Flatpak build still works (no regressions from the main.rs changes)

https://claude.ai/code/session_01X2YjHosc7qFY61uwzeRYND

The AppImage crashes on startup with two issues:

1. GStreamer symbol mismatch: the bundled libmedia-gstreamer.so tries to
   load system GStreamer libraries built against a newer GLib (with
   g_sort_array from GLib 2.82+) than what the AppImage bundles. Fixed by
   setting GTK_MEDIA=none and clearing GST_PLUGIN_SYSTEM_PATH in the
   AppRun hook, since the app doesn't need media playback.

2. GResource not found: UI template files aren't loaded, causing a crash
   when GTK tries to instantiate widgets. Added exe-relative fallback
   logic in main.rs so the gresource file is found even if the
   ADVENTURE_MODS_PKGDATADIR env var isn't set correctly. Also improved
   error reporting from silent .ok() to an eprintln warning.

https://claude.ai/code/session_01X2YjHosc7qFY61uwzeRYND
@astrovm astrovm merged commit 9e8d295 into main Mar 25, 2026
@astrovm astrovm deleted the claude/fix-appimage-gstreamer-0Ymxk branch March 25, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants