Bug 262700

Summary: Raw file will freeze with 16bit option enabled
Product: [Applications] digikam Reporter: ed_kiefer
Component: Plugin-RawImport-NativeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, gelezth, Julien, lexa
Priority: NOR    
Version: 1.7.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 2.0.0
Sentry Crash Report:
Attachments: log file of crash from enable 16bit raw
New crash information added by DrKonqi

Description ed_kiefer 2011-01-09 21:54:30 UTC
Version:           1.7.0 (using KDE 4.5.4) 
OS:                MS Windows

When I enable 16bit in raw encoding in configuration menu .
The when I try to edit a raw CR2 file I see the 16bit option is off. If I enable it in the raw import window and then update it will go to 60% an freeze .
If I leave 16bit off all is good .

Reproducible: Always

Steps to Reproduce:
Open a raw CR2 file , enable the 16bit color option and hit update

Actual Results:  
freezes with a crash


OS: WindowsNT (i686) release Windows XP
Compiler: cl.exe
Comment 1 caulier.gilles 2011-01-09 22:25:38 UTC
Which libkdcraw and libraw you use. Go to Help/Components Info menu entry for details.

Gilles Caulier
Comment 2 caulier.gilles 2011-01-09 22:30:12 UTC
Alex,

I CC you for info....

Gilles Caulier
Comment 3 ed_kiefer 2011-01-09 23:15:41 UTC
digiKam version 1.7.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.21
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.5.4 (KDE 4.5.4)
LibKExiv2: 1.1.0
LibKdcraw: 1.1.0
LibLCMS: 119
LibPGF: 6.09.44 - internal library
LibPNG: 1.4.4
LibQt: 4.7.1
LibRaw: 0.11.3
LibTIFF: LIBTIFF, Version 3.9.2 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble widget: 0.10.3
Parallelized demosaicing: No
Database backend: QSQLITE
LibKipi: 1.1.0
Comment 4 Alex Tutubalin 2011-01-10 08:17:15 UTC
For LibRaw, the output_bps parameter affects only *output*, there is no difference for processing path.
Comment 5 caulier.gilles 2011-01-10 08:46:23 UTC
Note, under windows, compiled with GCC (minGW), there is no problem here (XP/Vista/7).

Please run debugview.exe program installed into kde/bin path.

Do the same with kdebugdialog.exe and enable all debug namespace (libkdcraw, digikam, etc.)

Now run digiKam, process raw file, and look all debug messages in debugview.

Gilles Caulier
Comment 6 ed_kiefer 2011-01-10 15:33:22 UTC
I don't have debugview.exe in KDE/bin folder .
I do have KDebugdialog.exe one .

I should add a little backround to my install . When I tried to install digikam+plugins after using the KDE window installer I was missing marblewidget.dll file as I got error message at startup of digikam. I went on IRC with KDE window installer guys an they said package was missing file but to just DL the kdeedu ? package, after that kigikam worked except for this 16bit color issue .
Comment 7 caulier.gilles 2011-01-10 15:42:16 UTC
"after that digiKam worked except for this 16bit color issue".

Do you mean that issue is fixed now ?

Note : I recommend to try digiKam stand alone windows installer : 

http://sourceforge.net/projects/digikam/files/digikam/1.7.0/digiKam-installer-1.7-win32.exe/download

Gilles Caulier
Comment 8 ed_kiefer 2011-01-10 15:57:47 UTC
hmm, I also don't have libkdcraw in the package list of KDebugdialog.exe even
though it says its loaded from Help/Components

no , I meant before adding extra componet digikam would not even startup .

I will try removing all what is loaded with the KDE window installer and install your link
Comment 9 ed_kiefer 2011-01-10 17:40:33 UTC
Ok, tried your install and even more issues

first time I run it i got error message can't find VLC (I see the VLC.exe is not there in bin folder)

Then I get message it can't find my pictures and wanted to know if there on external HD or I can fix in config editor later . I do the later bit and in config I see nothing listed in picture cantiainer ? (I think that is what it is called) so in above menu I click add and point to "my picture" folder where my pictures are at .
Ok now it finds my pictures ok. So I try the 16bit color option on a CR2 to see if its fixed .

It crashes but I didn't have debug stuff loaded so I try again with debug running and I get same pop up about were pictures are, ok I get to library window and see my picture folders but no pictures are loading on the right window .
Hmm so I try again to point it this time to C:\ but it seems to hang for ever and in debug I see huge list of can't find in C:\xxxx paths.
now I can not even get digikam to open .

where is the file stored that folds his info so I can edit it or delete it ?
Comment 10 ed_kiefer 2011-01-10 22:13:37 UTC
well not sure what to say, I spent all day trying to get this to work and it crashes on startup now. It is scanning my whole C drive and I can't find way to stop that .
I did uninstall it and reinstall but same thing .

the showfoto works , I can set 16bit there and see 65k in histogram with no issue on opening but it is missing many of edit option that digikam raw converter edit window has .
Comment 11 Julien Narboux 2011-01-10 22:26:54 UTC
Before uninstalling try shuting down digikam and loggin out, then run the uninstaller, otherwise if some daemon are still running it may be the case that the uninstaller does not remove everything.
You should delete the digikamrc file but i don't know where it is on windows.


Julien
Comment 12 ed_kiefer 2011-01-10 23:25:54 UTC
Ok I think I am making progress
I deleted the .kde folder content in "C:\Documents and Settings\Ed\Application Data\.kde"
The I noticed the digikam4.Db file in C:\Documents and Settings\Ed\My Documents\My Pictures was huge 33k so I deleted this one and the thumbs.db

Now I didn't get hang and I got all orginal setup menus shown, to set startup config and also where my albums are.
It loaded much faster but I didn't have the debug stuff running so I didn't try anything, just viewed few files and closed.
I noticed many processes running of the same kioslave.exe , 11 of them with digikam running.

Will try debug 16bit test next, so far 2 runs of digikam are ok so should be fine to run test later.
Comment 13 ed_kiefer 2011-01-11 01:12:45 UTC
Created attachment 55840 [details]
log file of crash from enable 16bit raw

all I do is open a raw CR2 file when in edit window, enable 16bit color an hit update. After like 10sec it crashes
Comment 14 ed_kiefer 2011-01-11 01:18:51 UTC
The above is the log file to the 16bit update in raw editor window.
It still crashes with the newer digikam-installer-1.7-win32.exe
Comment 15 ed_kiefer 2011-01-11 20:14:18 UTC
There is really 2 issues I am seeing here .
1) the crash that happens in the raw converter edit window when you click 16bit color an update .
2) is you can enable 16bit color option in digikam config menu (edit or raw converter i forget where it is offhand) and then open a raw and the option is not enabled .

I assume the 2 are linked (I think the above log was just first type of test (enabled it in raw edit window))

If you need more logs or windows crash address-module/dump let me know I am on XP SP3 install here .
Comment 16 caulier.gilles 2011-01-12 09:16:08 UTC
I installed (and compiled as developper) digiKam under XP and Win7, and i cannot confirm this crash here.

1/ Can you take a look at this page :

http://temporaryland.wordpress.com/2011/01/06/amarok-and-digikam-on-windows/

... and let's me hear if it can help

2/ Can you send me by provate mail a RAW file sample to test here.

Thanks in advance

Gilles Caulier
Comment 17 ed_kiefer 2011-01-12 14:09:11 UTC
Are you talking about that she ran it in compatibility mode ? 
She has 64bit system, I am on 32bit XP .
I did try compatibility mode with setting of w98 as I am already in native XP SP3.
Same crash
I can send you the CR2 file but I see your on gmail, can it handle 15mb file ?

BTW I have DPP, gimp, Ufraw , picasa ,Irfanview all working fine .
I can try a 3rd time on install but not sure what else I can do to help, maybe wait for a next version that might be better .

FWIW: I am a software developer so not a newbe when it comes to windows , but i am not C++ coder so can't help in that way .
Comment 18 caulier.gilles 2011-01-12 14:27:54 UTC
you can send me CR2 file using gmail...

Gilles Caulier
Comment 19 ed_kiefer 2011-01-12 14:43:44 UTC
ok, sending

Also can you answer if this sounds right, when I have digikam running (just
start it) I have 13-kioslave.exe ,1-klauncher.exe , 1-digikam.exe , 1-kded4.exe
,1-dbus-daemon.exe 
not sure if that is normal in regard to kioslave.exe

also if I set in setting>configure editor>raw decoding , 16bit color should the
16bit color checkbox be enabled when I open a raw file in edit window .I have
check docs but could not find info on this .
Comment 20 ed_kiefer 2011-01-12 14:53:05 UTC
little extra info on the kioslave.exe processes, it seems after a while it shuts down all but 1 kioslave.exe , maybe cause it loading different modules, anyway that doesn't alter the crash but seemed odd to me .
Comment 21 caulier.gilles 2011-01-12 15:09:45 UTC
I confirm, using your CR2 file, digiKam crash under windows.

Gilles Caulier
Comment 22 caulier.gilles 2011-01-12 15:22:36 UTC
Under Linux, with next digiKam 2.0.0, it do not crash :

http://www.flickr.com/photos/digikam/5348637831/

But it's not the same version of RAW decoder than under Windows

Gilles Caulier
Comment 23 caulier.gilles 2011-01-12 15:35:36 UTC
With current implementation from svn trunk under Linux, digiKam 1.8.0, with libraw 0.12.3, all work fine:

http://www.flickr.com/photos/digikam/5349270536/sizes/o/in/photostream/

between 1.7.0and 1.8.0, there is no real difference here...

The only difference is libraw :0.11.3 for you and 0.12.3 for me...

it's a specific windows crash...

Gilles Caulier
Comment 24 ed_kiefer 2011-01-12 15:36:43 UTC
yes, I looked at where they are with newer model cr2 formats and I think they
were up to canon 60D with libraw 11.2 on there site
(http://www.libraw.org/download )

Acording to help>container info I have 12.1 so maybe a bug ?

Anyway glad you able to comfirm , thats first step .

info from your installer

digiKam version 1.7.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.21
LibJPEG: 62
LibJasper: 1.900.1
LibKDE: 4.4.4 (KDE 4.4.4)
LibKExiv2: 1.2.0
LibKdcraw: 1.3.0
LibLCMS: 118
LibLensFun: 0.2.5-1 - internal library
LibLqr: internal library
LibPGF: 6.09.44 - internal library
LibPNG: 1.2.35
LibQt: 4.6.2
LibRaw: 0.12.1
LibTIFF: LIBTIFF, Version 3.8.2 Copyright (c) 1988-1996 Sam Leffler Copyright
(c) 1991-1996 Silicon Graphics, Inc.
Marble widget: 0.11.0 Release Candidate 1
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibKipi: 1.2.0
Comment 25 ed_kiefer 2011-01-12 15:43:03 UTC
PS: the first component  info is from the KDE windows installer , the one I just posted is from your standalone digikam installer you linked to . I should of posted that before but didn't notice it was different .

Anyway I check checking back for update to DL an recheck .

Ed
Comment 26 caulier.gilles 2011-01-12 15:56:34 UTC
The crash is not due to RAw decoder (libraw). It appear into post processing, when Curves is applied :

warning: Debug:digikam(3940) KUrl::path: converted to local file - the related c
all should be converted to toLocalFile() "/D:/data/photos/BKO262700/IMG_0162.CR2
"

Scaling with darkness 0, saturation 13581, and
multipliers 2,102539 1,000000 1,507813 1,000000
AHD interpolation...
[New Thread 3940.0x1dc]
Converting to sRGB colorspace...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3940.0x73c]
0x04d558b3 in Digikam::ImageCurves::curvesLutProcess (this=0x28d7fb84,
    srcPR=0x0, destPR=0x0, w=2856, h=4290)
    at D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\curves\imagecurves.cpp:666

666     D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\curves\imagecurves.cpp: N
o such file or directory.
        in D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\curves\imagecurves.cpp

(gdb) bt
#0  0x04d558b3 in Digikam::ImageCurves::curvesLutProcess (this=0x28d7fb84,
    srcPR=0x0, destPR=0x0, w=2856, h=4290)
    at D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\curves\imagecurves.cpp:666

#1  0x04d59487 in Digikam::CurvesFilter::filterImage (this=0x28d7fd1c)
    at D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\curves\curvesfilter.cpp:97

#2  0x04cd680c in Digikam::DImgThreadedFilter::startFilterDirectly (
    this=0x28d7fd1c)
    at D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\dimgthreadedfilter.cpp:146

#3  0x04f41b00 in Digikam::RawPostProcessing::rawPostProcessing (
    this=0x34d15a80)
    at D:\devel\mingw\1.7.0\digikam\utilities\imageeditor\rawimport\rawpostproce
ssing.cpp:121
#4  0x04cd680c in Digikam::DImgThreadedFilter::startFilterDirectly (
    this=0x34d15a80)
    at D:\devel\mingw\1.7.0\digikam\libs\dimg\filters\dimgthreadedfilter.cpp:146

#5  0x04e3dbfa in Digikam::DynamicThread::DynamicThreadPriv::run (
    this=0x3404fda0)
    at D:\devel\mingw\1.7.0\digikam\libs\threads\dynamicthread.cpp:306
#6  0x6a1ce5dc in ZN11QThreadPoolC2EP7QObject ()
   from C:\Program Files\digiKam\kde4\bin\QtCore4.dll
#7  0x6a1d66d6 in ZN7QThread11setPriorityENS_8PriorityE ()
   from C:\Program Files\digiKam\kde4\bin\QtCore4.dll
#8  0x77c0a3b0 in msvcrt!_endthreadex () from C:\WINDOWS\system32\msvcrt.dll
#9  0x7c80b729 in KERNEL32!GetModuleFileNameA ()
   from C:\WINDOWS\system32\kernel32.dll
#10 0x00000000 in ?? ()
(gdb)


The question is why it doesn't appear too under Linux...

Gilles Caulier
Comment 27 ed_kiefer 2011-01-12 16:17:41 UTC
I see , I am not to familiar with linux , with window installer do you compile on a win system with VS ?
Only thing I can think is to just see how next version works or debug it on the win compile system >dmp file
Comment 28 caulier.gilles 2011-01-12 18:20:52 UTC
No. All is compiled using Mingw4 (gcc for windows). There is a full GCC compiler package with TDM-GCC (http://tdm-gcc.tdragon.net/)

To debug, i install GDB as under linux and i run digiKam as well. when it crash, i get backtrace with "bt" gdb command.

No need M$ tool. All is compiled with Open source solutions.

Gilles Caulier
Comment 29 Thibaut Gelez 2011-02-22 14:00:18 UTC
Created attachment 57442 [details]
New crash information added by DrKonqi

digikam (1.8.0) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

Versions: Digikam 1.8.0, KDE 4.6
OS: Archlinux

I have the exact same description as the original one.
The 16-bit option appears off in the RAW import tab of the editing window whereas I switched it on in the configuration menu.
Then, after enabling it in the RAW import tab, I update the file and the crash occurs, after a freeze at around 34% of completion.

I must add that this Archlinux install is special because it is made on a USB flash drive, without Swap space. I don't know if this is relevant, but it is worth mentioning.

Thibaut

-- Backtrace (Reduced):
#7  0xb6998cca in Digikam::ImageCurves::curvesLutProcess(unsigned char*, unsigned char*, int, int) () from /usr/lib/libdigikamcore.so.1
#8  0xb699c2e7 in Digikam::CurvesFilter::filterImage() () from /usr/lib/libdigikamcore.so.1
#9  0xb6914b78 in Digikam::DImgThreadedFilter::startFilterDirectly() () from /usr/lib/libdigikamcore.so.1
#10 0xb6b9796b in Digikam::RawPostProcessing::rawPostProcessing() () from /usr/lib/libdigikamcore.so.1
#11 0xb6b97dcd in Digikam::RawPostProcessing::filterImage() () from /usr/lib/libdigikamcore.so.1
Comment 30 Thibaut Gelez 2011-02-22 15:22:14 UTC
I did the same test on Windows XP with KDE 4.5.4 and Digikam 1.7.0, and the same crash occured with the same file.
But on Linux with Digikam 2.0.0 beta, it worked.

So to sum up my tests:

Works on V2.0.0beta on Linux (indicates "libraw 0.13.0 beta3")
Crashes on V1.7.0 on Windows and V1.8.0 on Linux (indicates "libraw 0.11.3")

Is it due to different versions of the RAW decoding library?

Hope this helps.
Comment 31 caulier.gilles 2011-02-22 15:29:57 UTC
No,

Curves adjustments, where digiKam lock, is a post processed computation on image.

I'm surprizd that 2.0.0 do not crash. Code still the same (i think)...

Michael, Marcel, do you have touched this code in 2.0.0 ?

Gilles Caulier
Comment 32 Alex Tutubalin 2011-02-22 15:42:27 UTC
It was a lot of changes between LibRaw 0.11.3 and 0.13.x

But nothing changed in 8/16 bit processing. It is just different gamma LUT.
Comment 33 caulier.gilles 2011-07-06 11:18:24 UTC
We need feedback using a recent version. 2.0.0 RC is out, please test...

Thanks in advance

Gilles Caulier
Comment 34 ed_kiefer 2011-07-06 15:34:58 UTC
Seems to work fine in 2.0 RC 
but I have new issue , I opened raw (cannon 450D CR2) and did some post processing changes in raw editing tab .
Now I imported and then saved to same folder (I renamed file _1 add to name).
Now that cr2 file cannot be opened in either digikam or zoombrowser and odd thing I no longer see the orginal cr2 in digikam even though its there in zoombrowser .

I will try DDP if any difference . ok same as zoombrowser will not open/display .

This is first time using digikam, maybe its not meant to alter cr2 ?
only edit and export to a jpg, tiff, etc ?
Comment 35 caulier.gilles 2011-07-06 15:45:03 UTC
ok, so original  report can be closed.

For new issue, it's relevant of Versioning feature. I already see this problem in the past, but now it's disappear.

Please open a new file in bugzilla about this subject.

Gilles Caulier