[Digikam-devel] crash under macosx (again)

Gilles Caulier caulier.gilles at gmail.com
Thu Nov 11 16:36:15 GMT 2010


Hi all,

I continue my investiguations/tests/hack into macosx.

After to have fixed a crash relevant of openmp with libraw (openmp do
not feel to be instancied into a separate thread), i go back to the
famous crash with Batch Queue Manager and CImg::blur function...

in fact, the problem is not located in BQM, but in B&W converter which
is available into editor and BQM.

If i run showfoto, and try to use B&W tool, it crash too... See below :

showfoto(88000)/digikam (core) Digikam::BlurFilter::gaussianBlurImage:
BlurFilter::Process Computation...
showfoto(88000)/digikam (core) Digikam::BlurFilter::gaussianBlurImage:
BlurFilter::Process Computation...
showfoto(88000)/digikam (core) Digikam::BlurFilter::gaussianBlurImage:
BlurFilter::Process Computation...
showfoto(88000,0x1308b1000) malloc: *** error for object 0x3f800000:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
showfoto(88000,0x1309b7000) malloc: *** error for object 0x3f800000:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
showfoto(88000,0x130934000) malloc: *** error for object 0x3f800000:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x000000010235edc5 in QWidget::testAttribute_helper ()
(gdb) bt
#0  0x000000010235edc5 in QWidget::testAttribute_helper ()
#1  0x00000001022e470f in QMacStyle::widgetSizePolicy ()
#2  0x00000001025c9d52 in QStyleOption::init ()
#3  0x00000001026c8d74 in QFrame::drawFrame ()
#4  0x00000001026c8e9e in QFrame::paintEvent ()
#5  0x000000010236fd6a in QWidget::event ()
#6  0x00000001026c925c in QFrame::event ()
#7  0x00000001023193bd in QApplicationPrivate::notify_helper ()
#8  0x000000010231d51d in QApplication::notify ()
#9  0x0000000101c4603e in KApplication::notify ()
#10 0x000000010347c5bc in QCoreApplication::notifyInternal ()
#11 0x000000010231853c in qt_sendSpontaneousEvent ()
#12 0x00000001022c347d in -[QCocoaView drawRect:] ()
#13 0x00007fff83d53081 in -[NSView _drawRect:clip:] ()
#14 0x00007fff83d51cf4 in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#15 0x00007fff83d503c6 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#16 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#17 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#18 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#19 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#20 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#21 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#22 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#23 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#24 0x00007fff83d51292 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#25 0x00007fff83d4fee8 in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#26 0x00007fff83d4c79a in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
()
#27 0x00007fff83cc5ff6 in -[NSView displayIfNeeded] ()
#28 0x00000001022c7807 in -[QCocoaWindow displayIfNeeded] ()
#29 0x00007fff83cc0ea2 in _handleWindowNeedsDisplay ()
#30 0x00007fff88d9d077 in __CFRunLoopDoObservers ()
#31 0x00007fff88d78ef4 in __CFRunLoopRun ()
#32 0x00007fff88d7884f in CFRunLoopRunSpecific ()
#33 0x00007fff8205e91a in RunCurrentEventLoopInMode ()
#34 0x00007fff8205e67d in ReceiveNextEventCommon ()
#35 0x00007fff8205e5d8 in BlockUntilNextEventMatchingListInMode ()
#36 0x00007fff83c9629e in _DPSNextEvent ()
#37 0x00007fff83c95bed in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#38 0x00007fff83c5b8d3 in -[NSApplication run] ()
#39 0x00000001022d4c75 in QEventDispatcherMac::processEvents ()
#40 0x00000001035563a4 in QEventLoop::processEvents ()
#41 0x00000001035566c4 in QEventLoop::exec ()
#42 0x0000000103557ccc in QCoreApplication::exec ()
#43 0x00000001000346af in main (argc=1, argv=0x7fff5fbff740) at
/Users/agnes/Devel/trunk/graphics/digikam/showfoto/main.cpp:87
#44 0x000000010000824c in start ()
(gdb)

Why CImg::blur() is called here ?  because of Infrared filter
rendering. B&W tool will provide a preview of B&W effects, including
IR film.

These preview are located on the right side panel, as large icons.
Each icons preview are processed in a separate thread, following this
code :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/widgets/previewlist.cpp#61

PreviewThreadWrapper is an object dedicated to wrap threaded filter to
render preview for each items hosted in the listview :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/widgets/previewlist.cpp#218

For each list view item, you create an instance of a threaded filter.
when all is ready, you call this method :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/widgets/previewlist.cpp#259

... to start all icon item thread and render preview. The advantage of
this way is to be able to display a busy indicator over the icon
during computation.

This way is used in B&W tool. look here :

http://lxr.kde.org/source/extragear/graphics/digikam/imageplugins/color/bwsepiatool.cpp#142
http://lxr.kde.org/source/extragear/graphics/digikam/libs/dimg/filters/bw/bwsepiasettings.cpp#425

The question is : why it crash at this place ? Under Linux and
Windows, i cannot see this problem.

All suggestions are welcome

Gilles Caulier



More information about the Digikam-devel mailing list