[Kde-imaging] Gettings a segfault with libkdcraw?
kde at timotheegroleau.com
kde at timotheegroleau.com
Fri Jul 17 08:09:28 CEST 2009
Hello there,
My name is Tim, I'm a kphotoalbum user and wannabe dev (please bear with me),
and I'm trying to use likdcraw build myself a batch conversion utility for my
Nikon D60 raws.
Although I have some (very rusted) c++ background, I have never developed on
linux before so I'm just getting started. I volunteered help to kphotoalbum
before but so far, erm, I haven't had time to do anything at all :( .
Anyway, I made a one-file test program with code taken from kphotoalbum (see
attached timtest.cpp) which I managed to compile, but which gives me a
segfault with the following output (in the method decodeRAWImage of KDcraw).
=============================
processing
<unknown program name>(8027)/ KDcrawIface::KDcraw::loadFromDcraw: LibRaw:
dcraw emulation: ("-H 0", "-w", "-q 0", "-o 1", "DSC_6323.NEF")
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Reading metadata pass 0 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Reading metadata pass 1 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Reading RAW data pass 0 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Reading RAW data pass 1 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Scaling colors pass 0 of 2
Scaling with darkness 0, saturation 4095, and
multipliers 1.429688 1.000000 1.933594 1.000000
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Scaling colors pass 1 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Pre-interpolating pass 0 of 2
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Pre-interpolating pass 1 of 2
Bilinear interpolation...
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Interpolating pass 0 of 3
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Interpolating pass 1 of 3
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Interpolating pass 2 of 3
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Converting to RGB pass 0 of 2
Converting to sRGB colorspace...
<unknown program name>(8027)/ KDcrawIface::KDcrawPriv::progressCallback:
LibRaw progress: Converting to RGB pass 1 of 2
<unknown program name>(8027)/ KDcrawIface::KDcraw::loadFromDcraw: LibRaw: data
info: width= 3900 height= 2613 rgbmax= 255
Segmentation fault
=============================
How can I troubleshoot this and move on?
For info on my system, I'm on gentoo, with qt 4.5.2, likdcraw 4.2.4-r1 (that's
the gentoo version, the header file /usr/include/libkdcraw/version.h shows
kdcraw_version[] = "0.4.2")
I've uploaded the raw file at the following url, for reference:
http://timotheegroleau.com/tmp/DSC_6323.NEF
kphotoalbum and the kipi raw exporter have no problem handling this file btw,
Maybe to extend on what I am trying to do: I'm making my own utility using
code taken from kphotoalbum, because kphotoalbum manages to show me my raws
with the color as per what my Nikon D60 was showing me on its LCD. I tried
using command line dcraw, and using the raw export in the kipi plugins, but in
both cases, no matter what parameters I try to change, I am always getting
images which are either too dark or with washed out colors. kphotoalbum shows
me the pics just like I want them (the color, exposure, and white balance
match the embedded thumbnail created by the camera), out of the box. I looked
at the code and it seems to just use all the default settings of libkdcraw. So
this is why I'm trying to use it in the same way to see if I would get the
same results. If there is another way to manage that, I'd be very happy to
hear about it. In particular, if the kipi raw converter plugin could give the
same result as kphotoalbum gives me, I'd much rather use that.
Any advice is much appreciated, many thanks in advance.
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timtest.cpp
Type: text/x-c++src
Size: 1420 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-imaging/attachments/20090717/d22b6034/attachment-0001.cpp
More information about the Kde-imaging
mailing list