RT build from git, crash on launch - Debian testing 64 bit

I updated my git clone on my laptop running Debian testing 64 bit, and built RT yesterday. When I start RT it fails immediately:

john@haystack:~/src/RawTherapee/build/release$ ./rawtherapee
terminate called after throwing an instance of ‘std::out_of_range’
_ what(): basic_string::erase: _pos (which is 18446744073709551615) > this->size() (which is 0)
Aborted

I’d appreciate any advice, can anyone else reproduce this? thanks, John

Has GCC6 made it to testing yet? There are some bad bugs in sid right now.

Doesn’t look like it:

– The C compiler identification is GNU 5.3.1
– The CXX compiler identification is GNU 5.3.1

Please post the content of AboutThisBuild.txt

Here it is:

Branch: master
Version: 4.2.852
Changeset: 89a7ebac166483a6f3deb5bd139a4c5917083558
Compiler: cc 5.3.1
Processor: x86_64
System: Linux
Bit depth: 64 bits
Gtkmm: V2.24.4
Build type: release
Build flags: -std=c++11 -Wno-deprecated-declarations -Wno-unused-result -std=gnu++11 -march=native -Werror=unused-label -fopenmp -Werror=unknown-pragmas -O3 -DNDEBUG
Link flags: -march=native
OpenMP support: ON
MMAP support: ON

Thanks for AboutThisBuild.txt. Can you upload your options file to filebin.net and post the link here? Can you make a Debug build, run it with gdb and make a bt full? That could help to find the culprit.

Ingo

the options file:

http://filebin.net/3gr71dqyjw

I’ll make the debug build, but tell me, what is “make a bt full”?

Hold on, I’ve installed gdb and am going through the options, I’ll add backtrace info.

Let me know if you find this helpful. I’ve italicized the backtrace portion.

Reading symbols from rawtherapee…done.
(gdb) run
Starting program: /home/john/src/RawTherapee/build/debug/rawtherapee
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
[New Thread 0x7fffec882700 (LWP 31641)]
[New Thread 0x7fffec081700 (LWP 31642)]
[New Thread 0x7fffeb880700 (LWP 31643)]
[New Thread 0x7fffea9cb700 (LWP 31644)]
[New Thread 0x7fffea1ca700 (LWP 31645)]
[New Thread 0x7fffe3d29700 (LWP 31646)]
[New Thread 0x7fffe3528700 (LWP 31647)]
[New Thread 0x7fffe2d27700 (LWP 31648)]
[New Thread 0x7fffe2526700 (LWP 31649)]
[New Thread 0x7fffe1d25700 (LWP 31650)]
terminate called after throwing an instance of ‘std::out_of_range’
what(): basic_string::erase: __pos (which is 18446744073709551615) > this->size() (which is 0)

Program received signal SIGABRT, Aborted.
0x00007ffff1268478 in __GI_raise (sig=sig@entry=6) at …/sysdeps/unix/sysv/linux/raise.c:55
55 …/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) list
50 in …/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
_#0 0x00007ffff1268478 in _GI_raise (sig=sig@entry=6) at …/sysdeps/unix/sysv/linux/raise.c:55
_#1 0x00007ffff12698fa in _GI_abort () at abort.c:89
_#2 0x00007ffff1fc7f6d in __gnu_cxx::_verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff1fc5f36 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff1fc5f81 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff1fc6199 in cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff1fedda5 in std::throw_out_of_range_fmt(char const*, …) ()
_ from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

#7 0x00007ffff6b3bb67 in Glib::ustring::erase(unsigned long, unsigned long) ()
_ from /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1

#8 0x0000000000e55cac in rtengine::HaldCLUT::splitClutFilename (filename=…, name=…, extension=…, _
_ profile_name=…) at /home/john/src/RawTherapee/rtengine/clutstore.cc:289

#9 0x0000000000b876cd in ClutComboBox::parseDir (this=0x23d9bc0, path=…)
_ at /home/john/src/RawTherapee/rtgui/filmsimulation.cc:282

#10 0x0000000000b86d68 in ClutComboBox::fillFromDir (this=0x23d9bc0, path=…)
_ at /home/john/src/RawTherapee/rtgui/filmsimulation.cc:189

_#11 0x0000000000b85d8b in FilmSimulation::FilmSimulation (this=0x23c15c0, _in_chrg=, _
_ vtt_parm=) at /home/john/src/RawTherapee/rtgui/filmsimulation.cc:53
#12 0x0000000000ac2a5a in ToolPanelCoordinator::ToolPanelCoordinator (this=0x18d3800)
_ at /home/john/src/RawTherapee/rtgui/toolpanelcoord.cc:78

#13 0x000000000077f887 in BatchToolPanelCoordinator::BatchToolPanelCoordinator (this=0x18d3800, parent=0x184d2e0)
_ at /home/john/src/RawTherapee/rtgui/batchtoolpanelcoord.cc:28

_#14 0x00000000007fe1e8 in FilePanel::FilePanel (this=0x184d2e0, __in_chrg=, vtt_parm=)
_ at /home/john/src/RawTherapee/rtgui/filepanel.cc:54

_#15 0x00000000007e2e74 in RTWindow::RTWindow (this=0x1810440, __in_chrg=, vtt_parm=)
_ at /home/john/src/RawTherapee/rtgui/rtwindow.cc:166

#16 0x00000000009cd612 in main (argc=1, argv=0x7fffffffdfa8) at /home/john/src/RawTherapee/rtgui/main.cc:347
(gdb)

Yes, it’s helpful. Thank you! Investigating…

A bit off topic, but just for information there’s no problem with compiling RT with cc 6.1.1, I’ve just done it.

Ingo, I’ll take this one tonight. No need for you to bother…

Yes, GCC 6 is in testing since last week, but 5.3 is still default.

I can reproduce your crash, if I add a file named .tif to my HaldCLUT directory. Could it be, that you have a similar empty filename somewhere in your HaldCLUT tree? If so, as a workaround, rename it to something proper or delete it (if it was accidentally created).

@heckflosse: I’ll provide a PR for that this evening. This bug was also present in the original clutstore.cc code.

1 Like

@floessie Great. Thank you!

Floessie,

Search of my HaldCLUT directory shows no *.tif files. However, renaming my .config directory (ie ~/.config/RawTherapee to ~/.config/RawTherapee_bck) allows the program to start normally, many thanks.

John,

Could you try the current master? Ingo merged my fix, so now it shouldn’t even crash with your ~/.config/RawTherapee_bck settings. And could you check, where your HaldCLUT folder setting points to in the *_bck options?

Thanks for taking the time.

Best,
Flössie

Floessie,

I changed the install configuration back to my standard setup and the fix worked, many thanks.

John,

Thanks for testing. So I was on the right track. :slight_smile:

Best,
Flössie