EatTheFuture / image_tools

Eat the Future's collection of image/color tools.
Other
74 stars 6 forks source link

AppImages 0.2.2 and 0.3.0 are segfaulting on manjaro linux #6

Closed muonIT closed 2 years ago

muonIT commented 2 years ago

If I try to run either the 0.2.2 or 0.3.0 releases on manjaro I get: LANG=C /tmp/appimage-debug/etf_image_tools-v0.3.0-x86_64-linux/ocio_maker.AppImage Segmentation fault (core dumped)

strace'ing it isn't really helpful.

Running ./lut_maker.AppImage --appimage-extract yields a squashfs-root/ folder. If I cd into squashfs-root/usr/bin and run ./bin there the program works. If I try running the squashfs-root/AppRun program - that segfaults. ldd'ing that is fine, as is the ./bin program. No libraries are missing.

cessen commented 2 years ago

Thanks for the report! This is my first time trying to make Appimages, so these kinds of reports are super useful.

I'll try to look into this soon.

cessen commented 2 years ago

@muonIT I was able to reproduce the issue in a VM with Manjaro. And I think I've fixed it now--it's working in the VM, at least. If you get the chance, could you test on your system with this dev build?

https://github.com/EatTheFuture/image_tools/releases/tag/dev_build-2022_01_20-3d4dc66

Thanks!

(P.S. please don't be alarmed by the linux release size--that's because I recently enabled debug symbols on dev builds, to help with tracking down issues. Normal releases will still be about the same size as before, ha ha.)

muonIT commented 2 years ago

I gave it a try just now: while all 3 programs now start up (as in show a program window). But if I try to add images inside the hdri_merge.AppImage it crashes: ./hdri_merge.AppImage Gtk-Message: 10:31:48.834: Failed to load module "xapp-gtk3-module" Gtk-Message: 10:31:48.935: Failed to load module "canberra-gtk-module" Gtk-Message: 10:31:48.936: Failed to load module "canberra-gtk-module"

(hdri_merge.AppImage:1841665): Gtk-WARNING : 10:31:49.037: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3) Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3) Abgebrochen (Speicherabzug geschrieben)

The last line means "Cancelled (Core dumped)". I can see no dumpfiles inside the program folder. I'll strace it to see if that is written somewhere else. Format der Bilddatei unbekannt = Format of the imagefile is unknown

muonIT commented 2 years ago

The strace was unsuccessfull unfortunaltely..

If I try to run e.g. lut_maker the situation is the same: ./lut_maker.AppImage Gtk-Message: 11:13:19.296: Failed to load module "xapp-gtk3-module" Gtk-Message: 11:13:19.412: Failed to load module "canberra-gtk-module" Gtk-Message: 11:13:19.412: Failed to load module "canberra-gtk-module"

(lut_maker.AppImage:1852748): Gtk-WARNING : 11:13:19.525: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3) Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3) Abgebrochen (Speicherabzug geschrieben)

✗ ~/Programme/etf_image_tools-2022_01_20-3d4dc66-x86_64-linux$ ls -lah /usr/share/icons/Adwaita/16x16/status/image-missing.png -rw-r--r-- 1 root root 565 31. Okt 20:19 /usr/share/icons/Adwaita/16x16/status/image-missing.png ✓ ~/Programme/etf_image_tools-2022_01_20-3d4dc66-x86_64-linux$ file /usr/share/icons/Adwaita/16x16/status/image-missing.png /usr/share/icons/Adwaita/16x16/status/image-missing.png: PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced

I would say that GTK chickens out because it can't determine the file type of - tada - a png file... Marvellous...

cessen commented 2 years ago

Thanks for testing! I wasn't able to reproduce at first, but it turns out that was because I was using drag-and-drop to add the images. The real issue appears to be any time a file browsing dialog is opened. I'll investigate further.

Thanks again for taking the time to report these issues! It's super helpful!

cessen commented 2 years ago

@muonIT Here's a new dev build to test, when you get the chance: https://github.com/EatTheFuture/image_tools/releases/tag/dev_build-2022_01_20-d403ba1

Apparently the issue here was that bundling gtk3 in an appimage is... really hard. From what I've been able to gather from looking at similar issues in other projects, it seems that gtk3 tries really hard to use the system's shared libraries, even when they're already available in the appimage. And that leads to using incompatible library versions with each other, which causes all kinds of strange issues.

Fortunately, we were only using gtk3 for file dialogs anyway, indirectly through a cross-platform file dialog library. And that file dialog library recently added an alternative code path that uses XDG standards on Linux to launch whatever kind of dialog is native to the current system.

Anyway, long story short, I believe this is actually fixed now. But I'll wait for your confirmation before closing this issue.

Thanks again for your help!

muonIT commented 2 years ago

Hi Nathan, I just gave the new AppImages a whirl and they work marvellously on my manjaro system! What's astonishing is that the hdri maker works a whole lot faster than the selfcompiled one and/or the extracted one from the 0.3.0 release. Loading of the images and changing the log exposure works like 50 times faster than before! Thanks a heap for your program and for your help with the AppImages! Cheers from germany, Udo

cessen commented 2 years ago

Huh... I wonder what makes it faster. I might do some tests of my own at some point.

Anyway, thanks so much for your help on this!

muonIT commented 2 years ago

You're welcome! If I can help you in any way just shout out. Maybe translate to german? Should be fairly easy, there aren't that many words anyway ;-)

cessen commented 2 years ago

I don't think I'm at the point for internationalization yet, ha ha. I'll need to set up a framework for that first. But I'll definitely keep it in mind for the future! Thanks!

Also, I just released version 0.3.1 with the fixes. And thanks to no longer bundling gtk3 (which was by far the biggest thing in the bundle), the appimage size is way smaller too. So, win-win! :-)