Beep6581 / RawTherapee

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

Segfault when pasting a copied profile with retinex filter / XTrans #2913

Closed sguyader closed 8 years ago

sguyader commented 8 years ago

Hi, Today I decided to try the retinex filter, so I compiled the current code from retinex branch. It seems to work nicely, but when I copy a profil with retinex "on", and try to paste it over another image, I get a segfault. Here's the debug message from gdb session:

[...]
Applying Retinex
[New Thread 9868.0x2d9c]
[New Thread 9868.0x2908]
[New Thread 9868.0x2aa8]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 9868.0x2908]
0x00000000008852f0 in rtengine::RawImageSource::retinex ()
    at C:\Rawtherapee-sources\rtrepo\rtengine\rawimagesource.cc:2101
2101                        LBuffer[i][j] = temp[i][j];
(gdb)

It seems to be restricted to Xtrans-sensor images, as it happens on Fujifilm X-T1 raw files (from different cameras), but I couldn't get the crash from Pentax K-10D raw files.

Desmis commented 8 years ago

I cannot reconstituted...but I found an omission in Partialpaste... I push a change ! Is that correct the defect ? :)

sguyader commented 8 years ago

Sorry but I still get crashes with new changes. It's weird because it's not always crashing, but it occurs at least in 50% cases of partial paste. It also happened once with a complete profile paste, but then it was ok after clearing the profile, only crashing with partial paste. With a Release target, when it crashes the Windows error message says : "Instruction at 0x007e9d58 referenced memory at 0x00000000. The memory could not be read." I'll make a nex Debug build and check.

heckflosse commented 8 years ago

Crash confirmed. I take a look

Ingo

sguyader commented 8 years ago

Yep, I just got again the same crashes and debug message as in the first post, with a complete profile paste in which only the Retinex filter was enabled. But this time I got it crashing also on a Pentax K10D raw file.

heckflosse commented 8 years ago

Fixed

sguyader commented 8 years ago

Confirmed, thanks!