Beep6581 / RawTherapee

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

Crash on opening dark NEF file. #1186

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 1201

I just installed the latest version 4.0.6.3 (on 64-bit Windows 7).
My camera is a Nikon D40, taking NEF raw images. Everything seemed to work fine, until
I tried to take a photo with the lens cap closed (to try the dark frame subtraction
feature), resulting in the attached file. 

The file shows up fine (with black thumbnail) in the image browser, but opening the
file leads to a reproducible crash. The status indicator shows "Fast demosaicing..."
for a few seconds, and then the program crashes with the following details: 

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: rawtherapee.exe
  Application Version:  0.0.0.0
  Application Timestamp:    4ed52cbe
  Fault Module Name:    rawtherapee.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4ed52cbe
  Exception Code:   c0000005
  Exception Offset: 0000000000355994
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    1033
  Additional Information 1: 6a64
  Additional Information 2: 6a64c969a720df968c83209eeec4ac0a
  Additional Information 3: 453e
  Additional Information 4: 453ed054180176c349928b22158e4bb9

Reported by maoz.ovadia on 2012-01-10 09:33:37

Beep6581 commented 9 years ago
Please see this: http://www.rawtherapee.com/forum/viewtopic.php?f=3&t=3639

Reported by entertheyoni on 2012-01-10 10:05:09

Beep6581 commented 9 years ago
Crash confirmed with latest RT4/Release on Ubuntu 11.10/64 (segfault). Opening the same
nef in an older Debug version of RT4 (4.0.4.30) works okay, except that it's not black
at all. Instead it shows a lot of reddish/pinky noise, see attachment. Thumbnail is
correct though. Geeqie shows the raw as it is: black. 

Reported by paul.matthijsse4 on 2012-01-12 16:14:25

Beep6581 commented 9 years ago
Probably because you have auto levels on.

Reported by entertheyoni on 2012-01-12 17:39:45

Beep6581 commented 9 years ago
Confirm here too.
Works okay with -O0 and -O1, but crashing with -O2:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda6df700 (LWP 32062)]
0x00000000006c5c12 in rtengine::ImProcFunctions::getAutoExp (this=<optimized out>,
histogram=..., histcompr=3, defgain=<optimized out>, clip=0, 
    expcomp=@0x1433c58, bright=@0x1433c78, contr=@0x1433c80, black=@0x1433c7c, hlcompr=@0x1433c8c,
hlcomprthresh=@0x1433c90)
    at /home/pinipini/rt-hg/rtengine/improcfun.cc:695
695                             count += histogram[median];
(gdb) bt
#0  0x00000000006c5c12 in rtengine::ImProcFunctions::getAutoExp (this=<optimized out>,
histogram=..., histcompr=3, defgain=<optimized out>, clip=0, 
    expcomp=@0x1433c58, bright=@0x1433c78, contr=@0x1433c80, black=@0x1433c7c, hlcompr=@0x1433c8c,
hlcomprthresh=@0x1433c90)
    at /home/pinipini/rt-hg/rtengine/improcfun.cc:695
#1  0x000000000075118e in rtengine::ImProcCoordinator::updatePreviewImage (this=0x14336a0,
todo=1023, cropCall=0x0)
    at /home/pinipini/rt-hg/rtengine/improccoordinator.cc:217
#2  0x00000000007561a3 in rtengine::ImProcCoordinator::process (this=0x14336a0) at
/home/pinipini/rt-hg/rtengine/improccoordinator.cc:658
#3  0x00007ffff7f806dd in operator() (this=0x14983b0) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:440
#4  (anonymous namespace)::call_thread_entry_slot (data=<optimized out>) at thread.cc:44
#5  0x00007ffff6ba0ee6 in g_thread_create_proxy (data=0xfeaa90) at gthread.c:1962
#6  0x00007ffff35cbe0c in start_thread () from /lib64/libpthread.so.0
#7  0x00007ffff3305ced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Reported by lebedev.ri on 2012-01-12 20:24:52

Beep6581 commented 9 years ago
I re-uploaded the raw file here: http://minus.com/mbo1MPk9Sl
Please don't attach anything over 50kB here, unless its a patch.

RT-4.0.6.49 release in Gentoo 64:
Apply a neutral profile from the file browser and then open it -> opens fine.
Click autolevels - after a while it crashes.
In RT-4.0.6.49 debug autolevels works, the preview gets updated http://i.imgur.com/d7QsH.jpg
but RT hangs afterwards for a minute or two.

GDB stack backtrace using a release build (I know):
#0  0x00000000006e8e22 in rtengine::ImProcFunctions::getAutoExp(LUT<unsigned int>&,
int, double, double, double&, int&, int&, int&, int&, int&) ()
#1  0x000000000078273f in rtengine::ImProcCoordinator::updatePreviewImage(int, rtengine::Crop*)
()
#2  0x0000000000787713 in rtengine::ImProcCoordinator::process() ()
#3  0x00007ffff694ddcd in ?? () from /usr/lib64/libglibmm-2.4.so.1
#4  0x00007ffff6be64c6 in ?? () from /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff2147c5c in start_thread () from /lib64/libpthread.so.0
#6  0x00007ffff1e8efcd in clone () from /lib64/libc.so.6

The same problem has been described in issue 1182.

Reported by entertheyoni on 2012-01-12 21:11:36