Summary: | Digikam crashes when building thumbnails of grayscale DNGs | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Colin Baker <colin> |
Component: | Plugin-DImg-RAW | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles, dmitry.mospan, lexa |
Priority: | NOR | ||
Version: | 1.4.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.0.0 | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
Grayscale DNG open by Showfoto showfoto loading grayscale DNG image properlly... |
Description
Colin Baker
2011-04-20 01:37:24 UTC
It's probably a bug in libkdcraw. Go to help/Components Info and copy and paste all content. I recommend to update digiKam to last stable 1.9.0 and also libkdcraw if possible. Can you provide a link to your DNG image to test in local ? Gilles Caulier Created attachment 60328 [details]
New crash information added by DrKonqi
digikam (1.9.0) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.2
- What I was doing when the application crashed:
1) Start digikam
2) Select new album folder with color .jpg and .dng (tiff raw)
3) Building thumbnails...... and crash
-- Backtrace (Reduced):
#7 Digikam::RAWLoader::loadedFromDcraw (this=0x9d276868, data=..., width=2688, height=4063, rgbmax=255, observer=0xd8110b8) at /build/buildd/digikam-1.9.0/libs/dimg/loaders/rawloader.cpp:254
#8 0x0386a58d in Digikam::RAWLoader::load (this=0x9d276868, filePath=..., observer=0xd8110b8) at /build/buildd/digikam-1.9.0/libs/dimg/loaders/rawloader.cpp:121
#9 0x03855020 in Digikam::DImg::load (this=0x9d276e5c, filePath=..., loadFlagsInt=13, observer=0xd8110b8, rawDecodingSettings=...) at /build/buildd/digikam-1.9.0/libs/dimg/dimg.cpp:476
#10 0x03855aea in Digikam::DImg::load (this=0x9d276e5c, filePath=..., loadMetadata=false, loadICCData=true, loadUniqueHash=false, observer=0xd8110b8, rawDecodingSettings=...) at /build/buildd/digikam-1.9.0/libs/dimg/dimg.cpp:382
#11 0x039d4c1b in Digikam::ThumbnailCreator::loadWithDImg (this=0xa4331c8, path=..., profile=0x9d276f70) at /build/buildd/digikam-1.9.0/libs/threadimageio/thumbnailcreator.cpp:457
Dmitry, Can you send me the image responsible of this crash ? Note : i suspect a libkdcraw binary compatibility issue on your computer. If it work on mine, it will confirm it. Also, i need to know the libkdcraw and libraw version that you use. Gilles Caulier Hi! Operating System: Linux 2.6.38-8-generic #42-Ubuntu SMP i686 Distribution: Kubuntu 11.04 I have long sought to understand the patterns of failure digikam. Found a few files. If their mark in the album, digikam crash. I suggest to download one of them - http://www.rirc.ru/images/scan0003.dng (Size 21M) If a lot of files in the album, the crash quickly. To reiterate my problem, I always do this: Open/Close album, Several times clicked on the album, Click on the icon to rotate the image. Digikam is usually crash. I could not find installed libraw. Probably it is part of another package? I found that I had a version of the libkdcraw9: $ LANG=C dpkg -s libkdcraw9 Package: libkdcraw9 Status: install ok installed Priority: optional Section: libs Installed-Size: 840 Maintainer: Kubuntu Developers <kubuntu-devel@lists.ubuntu.com> Architecture: i386 Source: kdegraphics Version: 4:4.6.2-0ubuntu1 Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libgomp1 (>= 4.2.1), libkdecore5 (>= 4:4.5), libkdeui5 (>= 4:4.5.80), libkio5 (>= 4:4.5), liblcms1 (>= 1.15-1), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.5.3), libstdc++6 (>= 4.4.0), kdegraphics-libs-data (>= 4:4.6.2-0ubuntu1) Description: RAW picture decoding C++ library (runtime) C++ interface around dcraw binary program used to decode RAW picture files. . This library is used by kipi-plugins, digiKam and krita . libkdcraw9 contains the library of libkdcraw. Homepage: http://www.kde.org/ Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Terminal output: $ digikam ..... Building histograms... Building histograms... /home/dimich/1/scan0003.dng: Cannot use camera white balance. Scaling with darkness 0, saturation 65535, and multipliers 1.000000 25926.744141 25926.744141 25926.744141 /home/dimich/1/scan0003.dng: Cannot use camera white balance. Scaling with darkness 0, saturation 65535, and multipliers 1.000000 25926.744141 25926.744141 25926.744141 Building histograms... Building histograms... /home/dimich/1/scan0003.dng: Cannot use camera white balance. Scaling with darkness 0, saturation 65535, and multipliers 1.000000 1.000000 1.000000 1.000000 /home/dimich/1/scan0003.dng: Cannot use camera white balance. Scaling with darkness 0, saturation 65535, and multipliers 1.000000 1.000000 1.000000 1.000000 Building histograms... Building histograms... KCrash: Application 'digikam' crashing... KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit sock_file=/home/dimich/.kde/socket-dimich-desktop/kdeinit4__0 QSocketNotifier: Invalid socket 14 and type 'Read', disabling... QSocketNotifier: Invalid socket 36 and type 'Read', disabling... QSocketNotifier: Invalid socket 39 and type 'Read', disabling... QSocketNotifier: Invalid socket 47 and type 'Read', disabling... QSocketNotifier: Invalid socket 112 and type 'Read', disabling... QSocketNotifier: Invalid socket 115 and type 'Read', disabling... QSocketNotifier: Invalid socket 109 and type 'Read', disabling... QSocketNotifier: Invalid socket 13 and type 'Read', disabling... QSocketNotifier: Invalid socket 48 and type 'Read', disabling... QSocketNotifier: Invalid socket 118 and type 'Read', disabling... QSocketNotifier: Invalid socket 121 and type 'Read', disabling... QSocketNotifier: Invalid socket 52 and type 'Read', disabling... QSocketNotifier: Invalid socket 43 and type 'Read', disabling... digikam: Fatal IO error: client killed Dmitry, Libraw library is include in libkdcraw. Go to Help/Components Info from digiKam menu and copy and paste the contents here. Also, i suspect that 2 version of libkdcraw is installled on your system. Please check... Gilles Caulier Created attachment 60369 [details]
Grayscale DNG open by Showfoto
Alex, Look like with Dmitry DNG image, Showfoto open strongly this RAW file. I attached a screen-shot to this file. I use last libraw of course, as you can see in components info dialog. Note that Showfoto don't crash here. Gilles Caulier Hello! The dcraw_emu sample (from latest LibRaw 0.13.5) extracts nice cat BW negative from the sample file. I've tested under Windows7, will try unix version later today. The resulting image is black and white (one component, not three), may it cause the problem on the later stages? Alex, You want mean that color depth of image data extracted from libraw, can be different than RGB ? Same about JPEG embeded preview image ? Gilles Caulier For dcraw_make_mem_image call you *should* take libraw_processed_image_t.colors field into account. For grayscale image this field is equal to 1 and bitmap allocated according to exact color count: === quote from source === unsigned ds = S.height * S.width * (O.output_bps/8) * P1.colors; libraw_processed_image_t *ret = (libraw_processed_image_t*)::malloc(sizeof(libraw_processed_image_t)+ds); ... ret->colors = P1.colors; For thumbnail things are simpler: for libraw_processed_image_t.type == LIBRAW_THUMBNAIL_BITMAP the libraw_processed_image_t.colors is always 3 and for libraw_processed_image_t.type == LIBRAW_THUMBNAIL_JPEG the thumbnail is JPEG data (libraw does not analyse this type of thumbnails) Alex, i think i found the problem : it's in PPM creation header : https://projects.kde.org/projects/kde/kdegraphics/libs/libkdcraw/repository/revisions/master/entry/libkdcraw/kdcraw_p.cpp#L61 For grayscaled image, i need to set header with P3 (PGM), not P6 (PPM) Gilles Caulier Alex, Sorry, i would said P5 for PGM, not P3... Gilles dcraw uses: if(colors>3) "P7" else "P%d",colors/2+5 :) Git commit d24a6a9fcfe9d7a57fdef257e69fb4f70612a829 by Gilles Caulier. Committed on 27/05/2011 at 09:52. Pushed by cgilles into branch 'master'. create right PGM header with Grayscale image. CCBUGS: 271323 M +4 -1 libkdcraw/kdcraw_p.cpp http://commits.kde.org/libkdcraw/d24a6a9fcfe9d7a57fdef257e69fb4f70612a829 Git commit 58cc00a214e6ece264d016b2a12f13c1bc0528ff by Gilles Caulier. Committed on 27/05/2011 at 10:17. Pushed by cgilles into branch 'master'. If colors component is 1 (Grayscale), make demosaiced image as RGB for client application. BUGS: 271323 M +21 -6 libkdcraw/kdcraw.cpp http://commits.kde.org/libkdcraw/58cc00a214e6ece264d016b2a12f13c1bc0528ff Created attachment 60374 [details]
showfoto loading grayscale DNG image properlly...
Dmitry,
All is fixed now in libkdcraw from git Master repository...
Gilles Caulier
|