Bug 229370 - ICC profile in Colors tab incorrect for nef raw images, also crashes digikam for some profiles
Summary: ICC profile in Colors tab incorrect for nef raw images, also crashes digikam ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ColorManagement-Profiles (show other bugs)
Version: 1.1.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 09:24 UTC by Matti Rintala
Modified: 2022-02-01 11:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.3.0


Attachments
Image which causes Digikam to crash when ICC profile on Colors tab is chosen (821.65 KB, image/jpeg)
2010-03-04 09:25 UTC, Matti Rintala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Rintala 2010-03-04 09:24:30 UTC
Version:           1.1.0 (using KDE 4.3.5)
OS:                Linux
Installed from:    openSUSE RPMs

I noticed some bugs in Digikam 1.1.0's ICC profile information you get by selecting the Colors tab on the right of the main window:

1) The tab correctly shows the profile if jpg images, if they have an embedded profile. However, it shows nothing for images which are only exif tagged as AdobeRGB (without embedded profile).

2) For raw images (at least Nikon NEF), the tab always shows the profile as sRGB even if the raw images contains a different profile.

3) When I chose a jpg image which had been converted to the profile used by a photo lab I use, Digikam crashed. I'll include the image here (the profile itself is quite large as it is a printer profile).
Comment 1 Matti Rintala 2010-03-04 09:25:50 UTC
Created attachment 41317 [details]
Image which causes Digikam to crash when ICC profile on Colors tab is chosen
Comment 2 caulier.gilles 2010-03-04 10:16:35 UTC
Give us GDB backtrace for the crash

Gilles Caulier
Comment 3 Matti Rintala 2010-03-04 11:31:51 UTC
Sure. Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0a423b2 in ?? () from /lib64/libc.so.6   
(gdb) where                                         
#0  0x00007ffff0a423b2 in ?? () from /lib64/libc.so.6
#1  0x00007ffff502847b in atoi (__nptr=<value optimized out>) at /usr/include/stdlib.h:286
#2  AllocateDataFormat (__nptr=<value optimized out>)                                     
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/3rdparty/lprof/cmssheet.cpp:919         
#3  0x00007ffff5028622 in SetDataFormat (it8=0x0, n=0, label=<value optimized out>)       
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/3rdparty/lprof/cmssheet.cpp:950         
#4  0x00007ffff502a022 in DataFormatSection (it8=<value optimized out>)                   
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/3rdparty/lprof/cmssheet.cpp:1189        
#5  ParseIT8 (it8=<value optimized out>)                                                  
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/3rdparty/lprof/cmssheet.cpp:1317        
#6  0x00007ffff502a37a in cmsxIT8LoadFromMem (Ptr=0x9b18040, len=220372)                  
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/3rdparty/lprof/cmssheet.cpp:1437        
#7  0x00007ffff510d2bd in Digikam::CIETongueWidget::setProfile (this=0x410a020, hProfile=0x709ee30)
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/widgets/iccprofiles/cietonguewidget.cpp:367      
#8  0x00007ffff510d492 in Digikam::CIETongueWidget::setProfileData (this=0x410a020,                
    profileData=<value optimized out>)                                                             
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/widgets/iccprofiles/cietonguewidget.cpp:259      
#9  0x00007ffff5104d3e in Digikam::ICCProfileWidget::decodeMetadata (this=<value optimized out>)   
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/widgets/iccprofiles/iccprofilewidget.cpp:268     
#10 0x00007ffff5103fb4 in Digikam::ICCProfileWidget::setProfile (this=0x40f7e20, profile=...)      
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/widgets/iccprofiles/iccprofilewidget.cpp:200     
#11 0x00007ffff51422ff in Digikam::ImagePropertiesColorsTab::getICCData (this=0x40c0b30)           
    at /usr/src/packages/BUILD/digikam-1.1.0/libs/imageproperties/imagepropertiescolorstab.cpp:676 
#12 0x00007ffff5145396 in Digikam::ImagePropertiesColorsTab::qt_metacall (this=0x40c0b30, _c=      
    InvokeMetaMethod, _id=<value optimized out>, _a=0x9a82270)                                     
    at /usr/src/packages/BUILD/digikam-1.1.0/build/digikam/imagepropertiescolorstab.moc:101
---Type <return> to continue, or q <return> to quit---
#13 0x00007ffff18502d9 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
#14 0x00007ffff240e48f in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#15 0x00007ffff23c02ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib64/libQtGui.so.4
#16 0x00007ffff23c757e in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00007ffff3776016 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#18 0x00007ffff1840ddc in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib64/libQtCore.so.4
#19 0x00007ffff18419ea in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib64/libQtCore.so.4
#20 0x00007ffff1869803 in ?? () from /usr/lib64/libQtCore.so.4
#21 0x00007fffeb193dee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#22 0x00007fffeb1977b8 in ?? () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fffeb1978e0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#24 0x00007ffff18693a3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    () from /usr/lib64/libQtCore.so.4
#25 0x00007ffff245331e in ?? () from /usr/lib64/libQtGui.so.4
#26 0x00007ffff183f712 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#27 0x00007ffff183fae4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#28 0x00007ffff1841c99 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#29 0x0000000000780582 in main (argc=<value optimized out>, argv=<value optimized out>)
    at /usr/src/packages/BUILD/digikam-1.1.0/digikam/main.cpp:195
Comment 4 Marcel Wiesweg 2010-03-06 17:22:14 UTC
The crash is from littleCMS. Perhaps we should report it to this project.
Comment 5 Marcel Wiesweg 2010-03-06 17:41:47 UTC
1) Testing with the file d40-adobergb.jpg I got from you some time ago. This one seems to be tagged as AdobeRGB by Exif, and the profile is shown correctly for me.

2) Per definition, a RAW will have uncalibrated color, right? The profile in NEFs applies to the embedded previews.
For preview display, the embedded previews will always be converted to sRGB. Probably, for RAWs, no profile should be shown in any case.
Comment 6 Matti Rintala 2010-03-06 18:15:59 UTC
Marcel,

1) Yes, AdobeRGB jpegs work correctly in my machine also.

2) I got the impression that sRGB conversion is used for thumbnails only (for archival purposes), not embedded previews viewed normally? But yes, a choice has to be made here. For raw, either the colour tab should show the colour space of the embedded preview (stored in EXIF) or it should inform the user that a raw file does not have a colour space as such (unless you count the "raw" colour space of the sensor, but that info is not always stored in the raw file).

For me either option is fine. I just tried the colour tab out of curiosity. :-)
Comment 7 Matti Rintala 2010-03-06 18:19:39 UTC
Marcel,

About 1): I was wrong. For me, my d40-adobergb.jpg shows "No profile available...".

I have liblcms 1.18a
Comment 8 caulier.gilles 2010-03-06 23:06:47 UTC
Marcel,

Yes RAW are uncalibrated formats. so no icc color profile must be show. The color space information are for preview of course, which is post processed by camera as a JPEG file (and it's a jpeg image embedded in 90% of case).

Gilles Caulier
Comment 9 Marcel Wiesweg 2010-03-07 14:58:54 UTC
SVN commit 1100409 by mwiesweg:

For RAW files, do not display the color profile of the preview,
but instead show "Uncalibrated color space"

CCBUG: 229370

 M  +7 -3      imageproperties/imagepropertiescolorstab.cpp  
 M  +29 -4     widgets/iccprofiles/cietonguewidget.cpp  
 M  +1 -0      widgets/iccprofiles/cietonguewidget.h  
 M  +5 -0      widgets/iccprofiles/iccprofilewidget.cpp  
 M  +1 -0      widgets/iccprofiles/iccprofilewidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1100409
Comment 10 Marcel Wiesweg 2010-03-07 17:51:08 UTC
> About 1): I was wrong. For me, my d40-adobergb.jpg shows "No profile
> available...".

Just double-checked this, works for me. Do you have latest libkexiv2?

Regarding the crash, I did not find a bug tracker for littlecms. But they are also working hard on a rewrite, littlecms 2.0, which is in beta right now.
Comment 11 caulier.gilles 2010-04-04 10:46:47 UTC
digiKam and Kipi-plugins 1.2.0 are out. Please check if crash is still valid there.

Thanks in advance

Gilles Caulier
Comment 12 Matti Rintala 2010-04-09 15:48:59 UTC
I finally had time to test Digikam 1.2.0 (I didn't manage to install it on KDE 4.3.5, so I had to upgrade to 4.4.2).

Now the color tab and its color space display seem to work correctly and display "uncalibrated color space" for raw images, which is ok.

AdobeRGB images work also.

However, the test image I attached to this bug report still occasionally crashes Digikam when I open the Color Tab. When it doesn't crash, Digikam shows the color profile graph, but above the graph it displays information on my display profile even though the profiled embedded in the image is a printer profile for my photo lab...
Comment 13 caulier.gilles 2010-04-09 15:51:29 UTC
Can you provide a GDB backtrace of crash. Thanks in advance

Gilles Caulier
Comment 14 Matti Rintala 2010-04-09 15:57:37 UTC
Gilles,

Sure, I was just doing that when I got distracted with other things. Here's the stack trace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff18543b2 in ?? () from /lib64/libc.so.6
(gdb) where
#0  0x00007ffff18543b2 in ?? () from /lib64/libc.so.6
#1  0x00007ffff544c76b in ?? () from /usr/lib64/libdigikamcore.so.1
#2  0x00007ffff544c912 in ?? () from /usr/lib64/libdigikamcore.so.1
#3  0x00007ffff544e312 in ?? () from /usr/lib64/libdigikamcore.so.1
#4  0x00007ffff544e66a in ?? () from /usr/lib64/libdigikamcore.so.1
#5  0x00007ffff550b53d in Digikam::CIETongueWidget::setProfile(void*) ()
   from /usr/lib64/libdigikamcore.so.1
#6  0x00007ffff550b71a in Digikam::CIETongueWidget::setProfileData(QByteArray const&) ()
   from /usr/lib64/libdigikamcore.so.1
#7  0x00007ffff550284e in Digikam::ICCProfileWidget::decodeMetadata() ()
   from /usr/lib64/libdigikamcore.so.1
#8  0x00007ffff5501b04 in Digikam::ICCProfileWidget::setProfile(Digikam::IccProfile const&) ()
   from /usr/lib64/libdigikamcore.so.1
#9  0x00007ffff5542af5 in Digikam::ImagePropertiesColorsTab::getICCData() ()
   from /usr/lib64/libdigikamcore.so.1
#10 0x00007ffff5545816 in Digikam::ImagePropertiesColorsTab::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libdigikamcore.so.1
#11 0x00007ffff26e86c9 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
#12 0x00007ffff30887cf in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#13 0x00007ffff3032e1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib64/libQtGui.so.4
#14 0x00007ffff30393fb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#15 0x00007ffff3cc6506 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#16 0x00007ffff26d898c in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib64/libQtCore.so.4
#17 0x00007ffff26db107 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib64/libQtCore.so.4
#18 0x00007ffff2702373 in ?? () from /usr/lib64/libQtCore.so.4
#19 0x00007fffeb13bdee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#20 0x00007fffeb13f7b8 in ?? () from /usr/lib64/libglib-2.0.so.0
#21 0x00007fffeb13f8e0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#22 0x00007ffff2701eb3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#23 0x00007ffff30e151e in ?? () from /usr/lib64/libQtGui.so.4
#24 0x00007ffff26d72a2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#25 0x00007ffff26d767c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#26 0x00007ffff26db3cb in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#27 0x000000000077d34b in ?? ()
#28 0x00007ffff183ca7d in __libc_start_main () from /lib64/libc.so.6
#29 0x00000000004773b9 in _start ()
Comment 15 Johannes Wienke 2010-04-09 16:43:05 UTC
Can you please install debug symbols and reproduce the crash. The backtrace isn't useful for digikamcore.
Comment 16 Matti Rintala 2010-04-09 16:54:35 UTC
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff18543b2 in ?? () from /lib64/libc.so.6
(gdb) where
#0  0x00007ffff18543b2 in ?? () from /lib64/libc.so.6
#1  0x00007ffff544c76b in atoi (__nptr=<value optimized out>) at /usr/include/stdlib.h:286
#2  AllocateDataFormat (__nptr=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/3rdparty/lprof/cmssheet.cpp:919
#3  0x00007ffff544c912 in SetDataFormat (it8=0x0, n=0, label=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/3rdparty/lprof/cmssheet.cpp:950
#4  0x00007ffff544e312 in DataFormatSection (it8=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/3rdparty/lprof/cmssheet.cpp:1189
#5  ParseIT8 (it8=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/3rdparty/lprof/cmssheet.cpp:1317
#6  0x00007ffff544e66a in cmsxIT8LoadFromMem (Ptr=0x86d48c0, len=220372)
    at /usr/src/debug/digikam-1.2.0/libs/3rdparty/lprof/cmssheet.cpp:1437
#7  0x00007ffff550b53d in Digikam::CIETongueWidget::setProfile (this=0x4705c20, hProfile=0x74d9ff0)
    at /usr/src/debug/digikam-1.2.0/libs/widgets/iccprofiles/cietonguewidget.cpp:373
#8  0x00007ffff550b71a in Digikam::CIETongueWidget::setProfileData (this=0x4705c20, 
    profileData=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/widgets/iccprofiles/cietonguewidget.cpp:261
#9  0x00007ffff550284e in Digikam::ICCProfileWidget::decodeMetadata (this=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/libs/widgets/iccprofiles/iccprofilewidget.cpp:273
#10 0x00007ffff5501b04 in Digikam::ICCProfileWidget::setProfile (this=0x46f70c0, profile=...)
    at /usr/src/debug/digikam-1.2.0/libs/widgets/iccprofiles/iccprofilewidget.cpp:200
#11 0x00007ffff5542af5 in Digikam::ImagePropertiesColorsTab::getICCData (this=0x46b5590)
    at /usr/src/debug/digikam-1.2.0/libs/imageproperties/imagepropertiescolorstab.cpp:672
#12 0x00007ffff5545816 in Digikam::ImagePropertiesColorsTab::qt_metacall (this=0x46b5590, _c=
    InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffdc6539d0)
    at /usr/src/debug/digikam-1.2.0/build/digikam/imagepropertiescolorstab.moc:104
#13 0x00007ffff26e86c9 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
#14 0x00007ffff30887cf in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#15 0x00007ffff3032e1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib64/libQtGui.so.4
#16 0x00007ffff30393fb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00007ffff3cc6506 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#18 0x00007ffff26d898c in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib64/libQtCore.so.4
#19 0x00007ffff26db107 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib64/libQtCore.so.4
#20 0x00007ffff2702373 in ?? () from /usr/lib64/libQtCore.so.4
#21 0x00007fffeb13bdee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#22 0x00007fffeb13f7b8 in ?? () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fffeb13f8e0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#24 0x00007ffff2701eb3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#25 0x00007ffff30e151e in ?? () from /usr/lib64/libQtGui.so.4
#26 0x00007ffff26d72a2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#27 0x00007ffff26d767c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQtCore.so.4
#28 0x00007ffff26db3cb in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#29 0x000000000077d34b in main (argc=<value optimized out>, argv=<value optimized out>)
    at /usr/src/debug/digikam-1.2.0/digikam/main.cpp:193
Comment 17 Marcel Wiesweg 2010-04-11 16:39:07 UTC
The profile lets the lprof code crash. Probably noone of us will be able to fix that. Unfortunately the lprof project looks kind of dead.
Comment 18 Marcel Wiesweg 2010-05-25 20:28:19 UTC
SVN commit 1130585 by mwiesweg:

Work around a crash caused by somehow broken profile (or buggy lprof).
After that, no crash occurs. Profile is not drawn on CIE tongue but
I cannot fix that.

BUG: 229370

 M  +2 -1      NEWS  
 M  +5 -1      libs/3rdparty/lprof/cmssheet.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1130585