RawTherapee 5.1, macOS Sierra, PixBufError

Hi–

Congrats to the developers on the new release–I love this app!

When starting RawTherapee 5.1 I get an instant crash and see this in the crash report:

Application Specific Information:
abort() called
terminating with uncaught exception of type Gdk::PixbufError

I’m usually pretty adept at troubleshooting these things, but in this case I’m totally flummoxed. RT 5-gtk3 runs fine on my system.

I’m on Mac OS X 10.12.5 (16F73)

Any tips before I head over to Github to file a bug report?

thx
PP

Whoops just wanted to add the rest of the dump:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffab9b2d42 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fffabaa0457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fffab918420 abort + 129
3 libc++abi.dylib 0x00007fffaa46e84a abort_message + 266
4 libc++abi.dylib 0x00007fffaa493c4f default_terminate_handler() + 267
5 libobjc.A.dylib 0x00007fffaafa1713 _objc_terminate() + 124
6 libc++abi.dylib 0x00007fffaa490d69 std::__terminate(void ()()) + 8
7 libc++abi.dylib 0x00007fffaa4907de __cxa_throw + 121
8 libgdkmm-3.0.1.dylib 0x0000000104785b34 Gdk::PixbufError::throw_func(_GError
) + 56
9 libglibmm-2.4.1.dylib 0x000000010417893f Glib::Error::throw_exception(_GError*) + 113
10 libgdkmm-3.0.1.dylib 0x00000001047861b1 Gdk::Pixbuf::create_from_file(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) + 83
11 rawtherapee-bin 0x0000000103485606 main + 4822
12 libdyld.dylib 0x00007fffab884235 start + 1

See this page for fixing start up crashes.

Executing rawtherapee-bin and rawtherapee-cli from the cli shows that there may be some hardcoded refs to various dependencies:

./rawtherapee-cli
dyld: Library not loaded: /opt/local/lib/libcairomm-1.0.1.dylib
Referenced from: /Applications/RawTherapee-5.1.app/Contents/MacOS/./rawtherapee-cli
Reason: image not found
Abort trap: 6

./rawtherapee-bin
2017-05-20 10:09:19.503 rawtherapee-bin[9455:1746329] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.

(rawtherapee-bin:9455): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file ‘/opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache’: No such file or directory

This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.

(rawtherapee-bin:9455): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file ‘/opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache’: No such file or directory

This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
libc++abi.dylib: terminating with uncaught exception of type Gdk::PixbufError
Abort trap: 6

@paperdigits:
Thanks for the reference, but this doesn’t appear to be a config or local env issue

PP

Noticed some major diffs between the application directory structures between 5.0 and the 5.1 releases:

Rawtherapee.app/Contents/Frameworks
Rawtherapee.app/Contents/Frameworks/etc
Rawtherapee.app/Contents/Frameworks/lib
Rawtherapee.app/Contents/Frameworks/share

Rawtherapee-5.1.app/Contents/Frameworks
Rawtherapee-5.1.app/Contents/Frameworks/gdk-pixbuf-2.0
Rawtherapee-5.1.app/Contents/Frameworks/gtk-3.0

Also, there I dont see a cairo dir anywhere in the 5.1 app dir

It could be that the app is just packaged differently now…but as the output above shows it appears there are some hardcoded dependencies…

pp

@partha @ion12 Wondering if you had any thoughts. The apps I made were generated by make macosx_bundle.

@HIRAM & @ppmax,

Yes, we decided to go more with the framework structure as specified by Apple documentation rather than what we had before.

It should not affect the functionality of the app.

The errors above mean that some parts of the script are not working properly. There should be no hardcoded paths in the app. I’ll look into the latest script to see what went wrong. :frowning:

Thanks,
Partha

@ppmax,

You are obviously running from the command line. Do you see similar behavior while running the app as it’s designed to do?

cc: @HIRAM & @ion12

I’ve noticed renaming the app to something other than RawTherapee (RawTherapee.app) will cause it to crash when launching by double-clicking the icon, renaming it back will fix the crash in that case. But I also still get a crash starting the app by the ./rawtherapee-bin command. Always the same way, an exception of type Gdk::PixbufError.

@HIRAM,

This part is simple. If you rename the app, then it will crash because
GDK_PIXBUF_MODULE_FILE="${etc}/gtk-3.0/gdk-pixbuf.loaders"
points to the loader file and in there the path to RT is hardcoded to /tmp/RawTherapee.app/Contents/Frameworks/gdk-pixbuf-2.0/2.10.0/loaders/
and hence any name changes mean that the loaders would not be found.

Also, finally when you run RT from the commandline, you no longer have any of the environment variable defined that are used to setup RT before it can run. So, for now, don’t change the app name and don’t run from the commandline.

@ppmax,

Please open an issue in github and let us know. We’ll take it from there.

Thanks,
Partha

Hello all–

Sorry for my late reply: daughter’s birthday party intervened.

@HIRAM
I didn’t think of this, but you are totally correct that I have several different versions of RT in my apps folder and I typically rename the bundles accordingly. I just tried renaming back to RawTherapee.app and it starts right up

@partha
I’ll create an issue on Github later tonight.

Thanks all for the help. You guys (and gals?) rock.

PP

@ppmax,

When you create an issue in github, make sure to at least flag me.

Here’s a new mac build with @ion12’s bug fix:

https://filebin.net/omudfk02oatcqtna/RawTherapee_OSX_10.9_64_5.1.zip

   Version: 5.1
    Branch: 5.1
    Commit: f23d70fd
    Commit date: 2017-05-15
    Compiler: clang-mp-3 3.9.1
    Processor: generic x86
    System: Apple
    Bit depth: 64 bits
    Gtkmm: V3.16.0
    Build type: release
    Build flags: -arch x86_64 -std=c++11 -mtune=generic -Werror=unused-label -mmacosx-version-min=10.9 -flto -fopenmp=libomp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations -O3 -DNDEBUG
    Link flags:  -mtune=generic -headerpad_max_install_names -flto
    OpenMP support: ON
    MMAP support: ON