Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.81k stars 318 forks source link

Image as argument to RT leads to crashes and shows an incomplete GUI #697

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 708

What steps will reproduce the problem?
1. run RT with a RAW file as argument : $ rt foo.nef

What is the expected output? What do you see instead?

Edit in external editor may lead to crashes (see below for backtrace) and the GUI is
not complete: there is no "add to queue" button, nor the prefs once.

RT version/revision: Dev-3.1m4, CSet 1256:9f591c317703 with distance 9

Operating system and architecture (e.g. winXP-32, ubuntu-10.10-64): Linux 2.6.35.13-91.fc14.x86_64
(fedora 14)

Please provide any additional information below:
Backtrace: (thanks Luis, provided in that thread: http://rawtherapee.com/forum/viewtopic.php?p=21195#21195
)
# gdb rt
GNU gdb (GDB) Fedora (7.2.90.20110525-38.fc15)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/rt...Reading symbols from /usr/lib/debug/usr/bin/rt.debug...done.
done.
(gdb) run beija-flor-de-veste-preta_BIF_BomRetiro-101125-E_00395.orf
Starting program: /usr/bin/rt beija-flor-de-veste-preta_BIF_BomRetiro-101125-E_00395.orf
[Thread debugging using libthread_db enabled]
Automatic Monitor Profile Detection not supported on your OS
/usr/share/rawtherapee/themes/Dark:69: Clearlooks configuration option "sunkenmenu"
is not supported and will be ignored.
/usr/share/rawtherapee/themes/Dark:70: Clearlooks configuration option "menuitemstyle"
is not supported and will be ignored.
/usr/share/rawtherapee/themes/Dark:71: Clearlooks configuration option "listviewitemstyle"
is not supported and will be ignored.
/usr/share/rawtherapee/themes/Dark:72: Clearlooks configuration option "progressbarstyle"
is not supported and will be ignored.
[New Thread 0xa823db70 (LWP 28171)]
[New Thread 0xa78ffb70 (LWP 28172)]
[New Thread 0xa6effb70 (LWP 28173)]
[New Thread 0xa64ffb70 (LWP 28175)]
[New Thread 0xa5affb70 (LWP 28176)]
[Thread 0xa5affb70 (LWP 28176) exited]
[Thread 0xa6effb70 (LWP 28173) exited]
[Thread 0xa78ffb70 (LWP 28172) exited]
[New Thread 0xa78ffb70 (LWP 28177)]
[New Thread 0xa6effb70 (LWP 28178)]
[New Thread 0xa5affb70 (LWP 28179)]
[New Thread 0x960c7b70 (LWP 28180)]
[New Thread 0x958c6b70 (LWP 28181)]
[New Thread 0x950c5b70 (LWP 28182)]
[New Thread 0x96cd4b70 (LWP 28183)]
[New Thread 0x948c4b70 (LWP 28184)]
[Thread 0xa823db70 (LWP 28171) exited]
[Thread 0x96cd4b70 (LWP 28183) exited]
[Thread 0x948c4b70 (LWP 28184) exited]
[Thread 0x958c6b70 (LWP 28181) exited]
[Thread 0xa6effb70 (LWP 28178) exited]
[Thread 0x950c5b70 (LWP 28182) exited]
[Thread 0x960c7b70 (LWP 28180) exited]
[New Thread 0x960c7b70 (LWP 28185)]
[New Thread 0x950c5b70 (LWP 28186)]
[New Thread 0xa6effb70 (LWP 28187)]
[Thread 0x960c7b70 (LWP 28185) exited]
[Thread 0x950c5b70 (LWP 28186) exited]
[Thread 0xa6effb70 (LWP 28187) exited]
[Thread 0xa5affb70 (LWP 28179) exited]
[New Thread 0xa5affb70 (LWP 28189)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa5affb70 (LWP 28189)]
0x41c6139a in e::processImage (pjob=0x8f2a478, errorCode=@0x85893b8, pl=0x56175e38,
    tunnelMetaData=false)
    at /usr/src/debug/rawtherapee-staging-3.0/rtengine/simpleprocess.cc:43
43              pl->setProgressStr ("PROGRESSBAR_PROCESSING");
Missing separate debuginfos, use: debuginfo-install GConf2-2.32.3-1.fc15.i686 ORBit2-2.14.19-2.fc15.i686
atk-2.0.0-1.fc15.i686 atkmm-2.22.5-1.fc15.i686 cairo-1.10.2-3.fc15.i686 cairomm-1.9.8-2.fc15.2.i686
dbus-libs-1.4.6-4.fc15.i686 expat-2.0.1-11.fc15.i686 fontconfig-2.8.0-3.fc15.i686 freetype-2.4.4-4.fc15.i686
gamin-0.1.10-9.fc15.i686 gdk-pixbuf2-2.23.3-1.fc15.i686 glib2-2.28.6-2.fc15.i686 glibc-2.13.90-9.i686
glibmm24-2.28.1-1.fc15.i686 gtk2-2.24.4-1.fc15.i686 gtk2-engines-2.20.2-2.fc15.i686
gtkmm24-2.24.0-3.fc15.i686 gvfs-1.8.1-2.fc15.i686 ibus-gtk2-1.3.99.20110408-5.fc15.i686
ibus-libs-1.3.99.20110408-5.fc15.i686 lcms2-2.1-2.fc15.i686 libX11-1.4.3-1.fc15.i686
libXau-1.0.6-2.fc15.i686 libXcomposite-0.4.3-2.fc15.i686 libXcursor-1.1.11-3.fc15.i686
libXdamage-1.1.3-2.fc15.i686 libXext-1.2.0-2.fc15.i686 libXfixes-5.0-1.fc15.i686 libXi-1.4.2-1.fc15.i686
libXinerama-1.1.1-2.fc15.i686 libXrandr-1.3.1-2.fc15.i686 libXrender-0.9.6-2.fc15.i686
libgcc-4.6.0-7.fc15.i686 libgomp-4.6.0-7.fc15.i686 libiptcdata-1.0.4-4.fc15.i686 libjpeg-turbo-1.1.0-2.fc15.i686
libpng-1.2.44-3.fc15.i686 libselinux-2.0.99-4.fc15.i686 libsigc++20-2.2.9-1.fc15.i686
libstdc++-4.6.0-7.fc15.i686 libtiff-3.9.5-1.fc15.i686 libudev-167-4.fc15.i686 libxcb-1.7-2.fc15.i686
pango-1.28.4-1.fc15.i686 pangomm-2.28.2-1.fc15.i686 pixman-0.20.2-2.fc15.i686 zlib-1.2.5-3.fc15.i686

(gdb) bt
#0  0x41c6139a in e::processImage (pjob=0x8f2a478, errorCode=@0x85893b8, pl=0x56175e38,
    tunnelMetaData=false)
    at /usr/src/debug/rawtherapee-staging-3.0/rtengine/simpleprocess.cc:43
#1  0x081015e7 in operator() (_A_a4=@0x85893c0, _A_a3=@0x85893bc, _A_a2=@0x85893b8,
    _A_a1=@0x85893b4, this=0x85893b0)
    at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:225
#2  operator()<rtengine::ProcessingJob*&, int&, rtengine::ProgressListener*&, bool&>
(
    _A_arg4=@0x85893c0, _A_arg3=@0x85893bc, _A_arg2=@0x85893b8, _A_arg1=@0x85893b4,
    this=0x85893ac) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:144
#3  operator() (this=0x85893a8) at /usr/include/sigc++-2.0/sigc++/adaptors/bind.h:1672
#4  sigc::internal::slot_call0<sigc::bind_functor<-0x000000001, sigc::pointer_functor4<rtengine::ProcessingJob*,
int&, rtengine::ProgressListener*, bool, rtengine::IImage16*>, rtengine::ProcessingJob*,
int, rtengine::ProgressListener*, bool, sigc::nil, sigc::nil, sigc::nil>, rtengine::IImage16*>::call_it
(rep=0x8589390)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#5  0x081027e5 in emit (impl=<optimized out>)
    at /usr/include/sigc++-2.0/sigc++/signal.h:687
#6  emit (this=0x8a31490) at /usr/include/sigc++-2.0/sigc++/signal.h:2669
#7  ProgressConnector<rtengine::IImage16*>::workingThread (this=0x8a31490)
    at /usr/src/debug/rawtherapee-staging-3.0/rtgui/progressconnector.h:81
#8  0x45d4f553 in ?? () from /usr/lib/libglibmm-2.4.so.1
#9  0x45497755 in ?? () from /lib/libglib-2.0.so.0
#10 0x453b4c5e in start_thread () from /lib/libpthread.so.0
#11 0x452c4b4e in clone () from /lib/libc.so.6
(gdb) 

Reported by thibault.north on 2011-05-29 21:34:52

Beep6581 commented 9 years ago
The reduced feature set is normal in that mode (no batch queue etc.)
But I think I fixed that bug already. I see you are using an old version, just update
to the latest one (currently a7abd2701e49)

Reported by oduis@hotmail.com on 2011-05-30 06:04:55

Beep6581 commented 9 years ago
What is the reason for reduced feature set? I don't see much benefit from restricting
access to file browser, preferences and other top panel features. There is switch to
turn top panel on though it's not working...

Reported by michal.thoma on 2011-05-30 11:39:35

Beep6581 commented 9 years ago
I didn't implement this feature, but I think it was planned to have RT as sole converter
frontend when used with other file browsers or digital asset management systems.
RT is not very powerful as a file browser, and it takes long on startup on large directories.
And a batch queue is also problematic if you might have e.g. 3 image instances open.

Reported by oduis@hotmail.com on 2011-05-30 16:01:26

Beep6581 commented 9 years ago
I did it: as a natural behaviour when one want to edit a single image (for example by
right click in explorer or through others DAM as you say), and is not interested in
browsing or batch functionalty (only one image is selected so why bother to wait for
what in queue?).
But... as hombre asked me also, we can/should discuss this feature on the forum if
not agreed. This is not the right place IMHO for discussions.

Keep open only if this bug is not fixed.

Reported by ffsup2@yahoo.it on 2011-05-30 18:32:40

Beep6581 commented 9 years ago
No opposite voice, so I'll close it, I think I fixed it.

Reported by oduis@hotmail.com on 2011-05-31 20:16:45

Beep6581 commented 9 years ago
That was a quick discussion...

Maybe we should actually discuss that on the forum, so I  won't reopen that bug. But
when I open an image with a program, I expect to find all its features and not see
a subset of them.
Thanks anyway for having fixed the crash!

Reported by thibault.north on 2011-05-31 21:53:04

Beep6581 commented 9 years ago
> Keep open only if this bug is not fixed.

The bug was open for a day afterwards, so I closed it, so no bad intention.
I think you should start a discussion in the forum, I'm sure he'll join.

Reported by oduis@hotmail.com on 2011-05-31 22:18:08

Beep6581 commented 9 years ago
I read this issue from work and could only reply now (I don't trust the computers at
work enough to log into any of my accounts). I agree that I want RT to use exactly
the same interface when started via right-click as it does when started normally. If
scanning a directory is the reason the Queue tab and other features were disabled,
then RT should not scan the directory the image was opened from by default, not unless
the user clicks on the file browser tab. Completely disabling the file browser and
queue tabs and other features is not a fix, it's a cheap workaround.

Reported by entertheyoni on 2011-05-31 23:01:41

Beep6581 commented 9 years ago
I agree with the last comment.

Some image viewers have exactly the same issue, that is a bug IMO: they sort the contents
of the directory even if you want to see just one image in it. This is the case of
gqview and geeqie, for example.

So: don't scan anything if an existing file is passed as an argument.

Reported by luisflorit on 2011-06-02 03:14:51

Beep6581 commented 9 years ago
I completely agree with comment no. 8. We need exactly this functionality, this is actually
how branch_3.0 behaves now. 

Reported by michal.thoma on 2011-06-02 17:43:20

Beep6581 commented 9 years ago
OK. As many people prefers the old behaviour, I'll revert to "standard" interface ...
(early or later)

Reported by ffsup2@yahoo.it on 2011-06-02 20:38:25

Beep6581 commented 9 years ago
From my point of view it would be great to have the option. I see the reason and scenarios
you built the current version for, e.g. opening several images from other programs.

Reported by oduis@hotmail.com on 2011-06-02 20:44:08

Beep6581 commented 9 years ago
Is it currently possible to load images to file browser using list of filepaths?

Reported by michaelezra000 on 2011-06-02 21:07:24

Beep6581 commented 9 years ago
@12 & 13 - If it's possible to open several images from other program to one instance
of RT, it would be pretty helpful. Unfortunately this is not the case, right now you
will open several instances of RT simultaneously (and if you open a many of them you'll
wait quite some time for computer to start responding because of initial demosaicing).
There is no real gain with incomplete interface as it's implemented now.

I would be happy with that launching of rt <filename> would start RT in normal way,
supplied image will open as tab and file browser wouldn't touch other files in directory
as suggested in comment 8.

In addition to that, I think we would benefit limiting RT to one instance - so every
other launching of rt <filename> won't open new RT window though will open new image
tab in existing window. Initial demosaic should start only when image is first displayed
by user thus preventing long initial delay when opening many images at once.

Reported by michal.thoma on 2011-06-03 08:32:11

Beep6581 commented 9 years ago
@14 Michael, if we enable RT's file browser to load images using a list of filepaths,
this would serve the purpose that you are describing and would also be further useful
for implementing image collections down the road (as filepath lists). 

I imagine behavior *somewhat* similar to ACR when it is launched from bridge with more
than one image. Thumbs of all images would load to the file browser. The filebrowser
would be reading filelist:<name_of_file_list>. If another image is sent to RT, it is
simply appended to the filelist reserved for remote launch. RT should be monitoring
changes to filelist loaded to reflect its changes. I agree that RT should be limited
to a single instance in this case.

This functionality will work when either single or multi-tab layout are used. Additionally,
as now file browser will allow all current functionality over the development settings,
ranking, labeling & sending to trash. This is certainly useful when operating on a
group of files.

Reported by michaelezra000 on 2011-06-03 11:17:45

Beep6581 commented 9 years ago
@15 Micheal, I think the functionality you're describing would be really perfect!

Filelists as collections seems quite nice idea and also this  would bring some flexibility
for scripting... Though I believe most users will more likely launch several "rt <filename>"
commands to open more files in once - just because this is common behavior when launching
several selected files using context menu in most file/image managers and DAM. Programing
the script to create file list and launch rt in one command is probably not viable
option for most...

Reported by michal.thoma on 2011-06-03 12:11:32

Beep6581 commented 9 years ago
RT should use command line switch to read from filelist.
With that switch on RT should add files to filelists first, and then (re)open the filelist.
This will provide transparency for calling apps

Reported by michaelezra000 on 2011-06-03 13:45:17