RawTherapee crashes when trying to edit NEF files

I'm having an issue where RawTherapee crashes when trying to open an NEF file.
I'm able to view the files in a small preview, where it'll show as many files as it can fit in the "viewing" area but if I try to open one, it'll make that image bigger and appear that it's showing me some editing tools then it crashes.
This has happened on both my laptop and desktop (at the time, both were running 13.2-p4 - laptop is now running 14.0-RC4-p1) so it appears to not just be limited to a specific computer. I also found out that it doesn't appear to be specific to RawTherapee as it works just fine under Linux.
When I try to open the NEF file in GIMP, same issue occures. Since it uses the RawTherapee plugin, it crashes.
I'm also running Xfce 4.18 and I'm using the latest repo.
 
I'd probe logs to see if you can source any clues. The problem occurring on the same file with two different applications could point to a permissions issue also. I'd check those two first.
 
Can you get a backtrace with gdb?

Alternatively, can you make one of those offending NEF files available?
 
I just tried to load the NEF file in that bug report. Worked fine. I am on 15-current as of yesterday and
rawtherapee-5.9_5 from pkg.
 
I just tried to load the NEF file in that bug report. Worked fine. I am on 15-current as of yesterday and
rawtherapee-5.9_5 from pkg.
Wth?
I’m still on 13.2-p4/5. Waiting for the 14.0-RELEASE to be announced.

I might try a forced reinstall? I don’t recall needing to make any modifications to memory allocation size (/etc/profiles? I don’t remember where that’s at and I’m not home atm) or any etc files to get it working?
 
Wth?
I’m still on 13.2-p4/5. Waiting for the 14.0-RELEASE to be announced.

I might try a forced reinstall? I don’t recall needing to make any modifications to memory allocation size (/etc/profiles? I don’t remember where that’s at and I’m not home atm) or any etc files to get it working?

No, I just pkg-installed rawtherapee and called it with the NEF filename as an argument. There is no special setup and that machine never had rawtherapee before.

You might want to try to move your ~/.config/RawTh* stuff away for a test.
 
I never heard of "RawTherapee" but was curious about your segfaults. I deployed fresh 14.0, installed X, installed RawTherapee. I downloaded your _DSC0003.tiff and _DSC0003.NEF.pp3. Not sure what else should I do to trigger the bug. Interface showed me a preview of a picture (two kids), I was able to open it.
 
What CPU are you two using? It could be that it depends on AVX or something as it seems to compile using "-mtune=generic".
 
I never heard of "RawTherapee" but was curious about your segfaults. I deployed fresh 14.0, installed X, installed RawTherapee. I downloaded your _DSC0003.tiff and _DSC0003.NEF.pp3. Not sure what else should I do to trigger the bug. Interface showed me a preview of a picture (two kids), I was able to open it.
Maybe this is an issue related to 13.2 and below? I'm just waiting for the release to update on my desktop.
Have the release installed on my laptop (was already running RC4). Haven't played with it on my laptop as I'd like to do some photo stuff on my desktop.
 
It's way too late for me here, my brain is dead. I installed 13.2 in separate BE (I'm used to my own /, /usr, /usr/{src,ports}, /var ). Only once I was able to trigger crash. It was on AVX (cvt* something instruction.. due to my mistake I lost it) . But then I'm able to trigger something I absolutely don't understand and my brain is refusing to work.
I'm using VMWare VM for these tests.

On 13.2, with BE 13.2 booted I start rawtherapee. Interface allows me to choose "Places" on top left corner. I can see my ZFS datasets there. If I click on 14.0/usr dataset it actually gets mounted and creates a mess (colision of 13.2 and 14.0 as 14.0 /usr is actually mounted under 13.2). I don't understand how I can have such privileges even to do so (I'm executing it under normal user). Tested my user can't zfs mount it.
 
That extra privileges are probably coming somehow from dbus.

I can trigger this on 14.0 too.

I figured out when I can trigger the crash -- if I launch the rawtherapee outside of gnome. In my tests I set the debug env quickly -- just downloaded gnome, used gdm to launch the session and go with it. On 13.2 I initially started with twm. And there I was able to trigger the crash. As I was lacking better screen resolution there I went to gnome there too and since then I was not able to trigger the crash.

Code:
(gdb) bt
#0  0x0000000000b9c55f in  ()
#1  0x00000000009cb60a in  ()
#2  0x00000000009e30d0 in  ()
#3  0x00000000009e3733 in  ()
#4  0x00000000009e3beb in  ()
#5  0x0000000824e32d12 in  () at /usr/local/lib/libglibmm-2.4.so.1
#6  0x00000008233c6173 in  () at /usr/local/lib/libglib-2.0.so.0
#7  0x00000008233ca7f4 in  () at /usr/local/lib/libglib-2.0.so.0
#8  0x00000008233cabc1 in  () at /usr/local/lib/libglib-2.0.so.0
#9  0x00000008233caee9 in g_main_loop_run () at /usr/local/lib/libglib-2.0.so.0
#10 0x0000000825a6f5fb in gtk_main () at /usr/local/lib/libgtk-3.so.0
#11 0x00000008290a38cf in Gtk::Main::run(Gtk::Window&) () at /usr/local/lib/libgtkmm-3.0.so.1
#12 0x000000000063226d in  ()

#0  0x0000000000b9c55f in ?? ()
=> 0x0000000000b9c55f:    f2 0f 5a 50 08         cvtsd2ss xmm2,QWORD PTR [rax+0x8]
[Current thread is 1 (LWP 100359)]
(gdb

(gdb) i r $rax
rax            0x0                 0
(gdb)

(gdb) info proc map
process 1190
Mapped address spaces:

          Start Addr           End Addr       Size     Offset   Flags   File
            0x400000          0x1383000   0xf83000        0x0  r-x CN-- /usr/local/bin/rawtherapee
           0x1383000          0x143b000    0xb8000   0xf82000  rw- C--- /usr/local/bin/rawtherapee
           0x143b000          0x1448000     0xd000        0x0  rw- C---
...
FreeBSD doesn't distribute debug symbols to its packages, I need to recompile rawtherapee from sources. This is a code that leads to the crash:
Code:
=> 0x0000000000b9c53e:    call   0xc2aed0
   0x0000000000b9c543:    movss  xmm6,DWORD PTR [rbp-0x5c]
   0x0000000000b9c548:    pxor   xmm2,xmm2
   0x0000000000b9c54c:    pxor   xmm3,xmm3
   0x0000000000b9c550:    pxor   xmm5,xmm5
   0x0000000000b9c554:    movss  xmm9,DWORD PTR [rbp-0x54]
   0x0000000000b9c55a:    pxor   xmm15,xmm15
   0x0000000000b9c55f:    cvtsd2ss xmm2,QWORD PTR [rax+0x8]       ; !<
That function 0xc2aed0 is now interesting, it does something "RBG" related. Having source/debug symbols would ease this up a lot.
Will try to have a look after sleep/when time allows it.
 
As this is related to a port I did update the 6876 on github. IThoughtTooLongForThis you should contact port maintainer if he/she can have a look on this.
It's worth a test if you run this program in full gnome desktop to see if it's ok. If anything you can use that as workaround and continue your work.

Matrix spaces, ICC color profiles - that's big unknown to me. Code assumes at least "sRGB" profile should be there. But function returns 0. Code is not sanitizing this and uses it further. Hence segmentation fault.
 
  • Like
Reactions: mer
It's actually a GDM thing. I can run this program in OpenBox if I start it with GDM. And other way around: if I start gnome session immediately from startx I get the same ICC color issues.
So it's something GDM does that helps. I don't use X too much, maybe somebody here on forums will be able to comment on ICC.

I still think it's a bug in code to assume these profiles are there but .. it's easier to install gdm and use your favorite window manager than to default to gnome.
 
As this is related to a port I did update the 6876 on github. IThoughtTooLongForThis you should contact port maintainer if he/she can have a look on this.
It's worth a test if you run this program in full gnome desktop to see if it's ok. If anything you can use that as workaround and continue your work.

Matrix spaces, ICC color profiles - that's big unknown to me. Code assumes at least "sRGB" profile should be there. But function returns 0. Code is not sanitizing this and uses it further. Hence segmentation fault.
I did try reaching out to the port maintainer about a month ago and all I got were crickets. I can try again.
 
Back
Top