Bug 257255 - graphics/rawtherapee: Crashes in rtengine::Color::rgb2lab01 when editing a picture: Failed to load module "colorreload-gtk-module"
Summary: graphics/rawtherapee: Crashes in rtengine::Color::rgb2lab01 when editing a pi...
Status: Closed Not Enough Information
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Matthias Andree
Keywords: crash, needs-qa
Depends on:
Reported: 2021-07-18 18:35 UTC by M. Draney
Modified: 2021-07-20 16:24 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (mandree)
koobs: merge-quarterly?


Note You need to log in before you can comment on or make changes to this bug.
Description M. Draney 2021-07-18 18:35:03 UTC
I start it up and it loads fine.  When I to edit a picture it loads the picture and then shortly crashes.  When starting up it gives me this error

Gtk-Message: 14:09:25.848: Failed to load module "colorreload-gtk-module"

I am running an up to date 13.0 and just updated packages.  There seems to be a regression somewhere because it used to work.  

I rebuilt it in ports to see if it would make and difference.  It did not.  I then rebuilt in and included Make_Debug=Yes in make.conf and ran it through gdb like the rawtherapee site mentions.  When it crashes it gives me this message.

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000000ddb930 in rtengine::Color::rgb2lab01 (profile=..., profileW=..., 
    r=1, g=1, b=0, LAB_l=@0x7fffffffbc78: -nan(0x7fc900), 
    LAB_a=@0x7fffffffbc80: -nan(0x7fc900), 
    LAB_b=@0x7fffffffbc7c: 4.59163468e-41, workingSpace=false)
    at /usr/ports/graphics/rawtherapee/work/rawtherapee-5.8/rtengine/color.cc:483
483     /usr/ports/graphics/rawtherapee/work/rawtherapee-5.8/rtengine/color.cc: No such file or directory.

I searched for it and didn't find the file either.  The color does load horribly right before it crashes.  

Comment 1 Alexey Dokuchaev freebsd_committer 2021-07-19 02:29:40 UTC
Over to maintainer.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-19 03:52:14 UTC
Seeing a Ports WRKDIR at runtime is seems odd
Comment 3 Matthias Andree freebsd_committer 2021-07-19 14:22:06 UTC
@Kubilay, the WRKDIR is an artifact of WITH_DEBUG=yes that adds debug information. I don't see references to work or wrk in my build.

@M. Draney, I cannot reproduce this on my 13.0-RELEASE-p3 amd64.

Please make sure that all ports that rawtherapee depends on are fully updated, too, with consistent settings in make.conf, do not try to use nondefault compilers.  In doubt, check if you have nondefault settings somewhere (perhaps create a new user, copy over only your image and .pp3 file and retry) - just in case there is some stray configuration lingering.

rawtherapee is sensitive against mixing and match compiler versions or libc++/libstdc++, you may see failures.  

For better debugging, please leave the source in place after installing the port under "WITH_DEBUG=YES" in make.conf and installation, meaning, after "make install", do _not_ invoke "make clean".

If it continues to fail, please attach to this BR the following information:
- output of: ldd /usr/local/bin/rawtherapee
- output of (this goes on one line): sh -c 'ldd /usr/local/bin/rawtherapee | awk "/=>/{print \$3}" | xargs pkg which -q |sort -u' 
- after crash, in gdb, the output of these two commands:
-- bt full
-- thread apply all bt

the colorreload-gtk-module appears to be some leftover KDE/Plasma desktop configuration that requires the colorreload-gtk-module, you may be able to fix that warning by installing the x11-themes/plasma5-kde-gtk-config port or package.
Comment 4 Matthias Andree freebsd_committer 2021-07-19 14:25:12 UTC
(In reply to Matthias Andree from comment #3)
you may need to start rawtherapee as:

gdb /usr/local/bin/rawtherapee

and once gdb has started up, type just one letter r and press the enter key to really launch RT.
Comment 5 Matthias Andree freebsd_committer 2021-07-20 16:24:18 UTC
feel free to reopen if you can fill in missing information.