Summary: | Digikam crash when editing raw images on OS X | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | brad <bkn> |
Component: | Plugin-DImg-RAW | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles, lexa |
Priority: | NOR | ||
Version: | 1.2.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | 1.6.0 | |
Sentry Crash Report: | |||
Attachments: | posible fix for crash in OS X. |
Description
brad
2010-04-06 01:12:40 UTC
Which libkdcraw and libraw you use. Please go to Help/Components info dialog for details. Gilles Caulier The crash appears in libgomp (GCC extension). Which gcc version you use ? Gilles Caulier gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Components Versions: digiKam version 1.2.0 (rev.: 1108543) Exiv2 can write to Jp2: Yes Exiv2 can write to Jpeg: Yes Exiv2 can write to Pgf: No Exiv2 can write to Png: Yes Exiv2 can write to Tiff: Yes Exiv2 supports XMP metadata: Yes LibCImg: 130 LibExiv2: 0.18.2 LibJPEG: 80 LibJasper: 1.900.1 LibKDE: 4.4.2 (KDE 4.4.2) LibKExiv2: 1.0.0 LibKdcraw: 1.0.0 LibLCMS: 119 LibPGF: 6.09.44 LibPNG: 1.2.43 LibQt: 4.6.2 LibRaw: 0.8.5 LibTIFF: LIBTIFF, Version 3.9.2 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc. Parallelized demosaicing: Yes LibGphoto2: 2.4.5 LibKipi: 1.0.0 An update on this bug. I just sent this message to the kdegraphics-devel list and the libraw mailing list. It turns out the bug is in dcraw_common.cpp where the OpenMP version of wavelet_denoise() is used on OS X, but the OpenMP version crashes under OS X (see above). The normal version of the wavelet_denoise executes just fine under OS X. Below is the message to the mailing lists. ----- I've been fighting a crash w/ digikam for months. I reported the bug here if > you want more info: https://bugs.kde.org/show_bug.cgi?id=233438 The bug is in libraw/internal/dcraw_common.cpp. It appears there are two versions of the wavelet_denoise() function, one uses OpenMP for parallel processing, the other is just a normal linear executing function. When this file is compiled under OS X it compiles the OpenMP version of the function, which crashes on OS X. The simple fix is to use the linear version of wavelet_denoise() on OS X. Below is an ad-hoc patch: dcraw_common.cpp: 3186 +/* the OpenMP parallel version of this function appears to be crashing under OS + * X; therefor just use the non OpenMP version of this funciton on OS X + */ +#if !defined(_OPENMP) || defined(__APPLE__) || defined(__MACOSX__) -#ifndef(_OPENMP) void CLASS wavelet_denoise()$ { I am not familiar with OpenMP nor do i understand how dcraw_common.cpp is generated so it is difficult for me to debug. If someone is willing to give me info how these things work i can try to get the OpenMP version work on OS X. I cannot reproduce the problem with latest LibRaw (0.11-Beta6) and gcc 4.2.1 apple build 5664 (the build number is dfferent from yours, I use latest xcode). I use dcraw_emu sample from LibRaw. There is a difference in OpenMP directives in yours 0.8.5 and more fresh ones. Could you please try digiKam 1.5.0 (with last stable LibRaw 0.10) ? Brad, I've found your compiler version details in KDE bugs site (see my reply in bug tracker) There are two significant differences: 1) There was a change in OpenMP directives in wavelet denoise in 0.10-Beta1. So, 0.10.0 (stable release) may behave differently with 0.8.5 you use 2) Compiler version is slightly differ. Anyway, I cannot reproduce the problem for now. I thing, it is better to continue discussion in KDE bugs interface, not in private mail. On 10/16/2010 10:54 PM, brad wrote: > https://bugs.kde.org/show_bug.cgi?id=233438 > > > > > > --- Comment #4 from brad<bkn ithryn net> 2010-10-16 20:54:45 --- > An update on this bug. I just sent this message to the kdegraphics-devel list > and the libraw mailing list. It turns out the bug is in dcraw_common.cpp where > the OpenMP version of wavelet_denoise() is used on OS X, but the OpenMP version > crashes under OS X (see above). The normal version of the wavelet_denoise > executes just fine under OS X. Below is the message to the mailing lists. > > ----- > > I've been fighting a crash w/ digikam for months. I reported the bug here if> > you want more info: > https://bugs.kde.org/show_bug.cgi?id=233438 > > The bug is in libraw/internal/dcraw_common.cpp. It appears there are two > versions of the wavelet_denoise() function, one uses OpenMP for parallel > processing, the other is just a normal linear executing function. When this > file is compiled under OS X it compiles the OpenMP version of the function, > which crashes on OS X. The simple fix is to use the linear version of > wavelet_denoise() on OS X. Below is an ad-hoc patch: > > dcraw_common.cpp: 3186 > > +/* the OpenMP parallel version of this function appears to be crashing under > OS > + * X; therefor just use the non OpenMP version of this funciton on OS X > + */ > +#if !defined(_OPENMP) || defined(__APPLE__) || defined(__MACOSX__) > -#ifndef(_OPENMP) > void CLASS wavelet_denoise()$ > { > > > I am not familiar with OpenMP nor do i understand how dcraw_common.cpp is > generated so it is difficult for me to debug. If someone is willing to give me > info how these things work i can try to get the OpenMP version work on OS X. > Created attachment 52575 [details]
posible fix for crash in OS X.
The above versioning information is a bit dated as i first ran into this bug several months ago. The new version information is below. Xcode: Xcode 3.2.4 Component versions: DevToolsCore-1705.0; DevToolsSupport-1591.0 BuildVersion: 10M2309 GCC Version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. DIGIKAM Version: digiKam version 1.5.0 (rev.: 1185190) Exiv2 can write to Jp2: Yes Exiv2 can write to Jpeg: Yes Exiv2 can write to Pgf: No Exiv2 can write to Png: Yes Exiv2 can write to Tiff: Yes Exiv2 supports XMP metadata: Yes LibCImg: 130 LibExiv2: 0.19 LibJPEG: 80 LibJasper: 1.900.1 LibKDE: 4.5.2 (KDE 4.5.2) LibKExiv2: 1.1.0 LibKdcraw: 1.1.0 LibLCMS: 119 LibPGF: 6.09.44 LibPNG: 1.2.44 LibQt: 4.7.0 LibRaw: 0.10.0 LibTIFF: LIBTIFF, Version 3.9.4 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc. Parallelized demosaicing: Yes Database backend: QSQLITE LibGphoto2: 2.4.9.1 LibKipi: 1.1.0 My patch above contained extra parens be mistake as I am not good at making patches. I attached a more proper patch. I have digikam-1.5.0 compiled from source and i have kdegraphics-4.5.2 compiled form MacPorts (with homebrew Portfile as macports is a little behind on the kde releases). How do you have libraw 0.11 compiled and installed? do you just install it over the kdegraphics version or do you not have kdegraphics installed at all? I'd like to try to duplicate your environment. Perhaps i've been building things incorrectly. The patch is applied to LibRaw 0.11-Beta7 (http://www.libraw.org/data/LibRaw-0.11.0-Beta7.tar.gz) Because I cannot reproduce the problem on my MacOS (and with LibRaw own samples), I cannot test the patch really helps or not. SVN commit 1187116 by cgilles: update internal libraw to 0.11.0-beta7 BUGS: 233438 M +5 -1 Changelog.txt A README M +1 -1 internal/dcraw_common.cpp M +6 -5 libraw/libraw_datastream.h M +1 -1 libraw/libraw_version.h M +1 -1 samples/dcraw_emu.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1187116 Alex, libraw updated in KDE 4.6 (trunk) and KDE4.5 branch. Q: do you plan to update libraw to support liblcms version 2.x where API have been re-written indeep ? http://www.littlecms.com/ Gilles Caulier Gilles, according to Marti Maria, old programs should compile fine with LCMS2. Have not tried yet, will try. P.S. I guess, it would be better to create another bug or move to private mail with LCMS-related issues. |