Application: palapeli (1.0) KDE Platform Version: 4.4.3 (KDE 4.4.3) Qt Version: 4.6.2 Operating System: Linux 2.6.34-020634rc6-generic x86_64 Distribution: Ubuntu 10.04 LTS -- Information about the crash: Palapeli crashed with a segmentation fault when I pressed the "create" button of the new puzzle dialog. I have already created new puzzles succesfully before with the same parameters but other images. The crash can be reproduced some of the time. -- Backtrace: Application: Palapeli (palapeli), signal: Segmentation fault [Current thread is 1 (Thread 0x7fbe27e45760 (LWP 7125))] Thread 2 (Thread 0x7fbe16acc710 (LWP 7126)): #0 0x00007fbe24d2aa2d in __pthread_mutex_unlock_usercnt (mutex=0x14f7268) at pthread_mutex_unlock.c:52 #1 __pthread_mutex_unlock (mutex=0x14f7268) at pthread_mutex_unlock.c:290 #2 0x00007fbe21e35869 in IA__g_main_context_acquire (context=0x14f7260) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2061 #3 0x00007fbe21e37295 in g_main_context_iterate (context=0x14f7260, block=0, dispatch=21983848, self=0x1) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2535 #4 0x00007fbe21e378fc in IA__g_main_context_iteration (context=0x14f7260, may_block=1) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2654 #5 0x00007fbe250d4566 in QEventDispatcherGlib::processEvents (this=0x13bfc00, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:414 #6 0x00007fbe250a9992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #7 0x00007fbe250a9d6c in QEventLoop::exec (this=0x7fbe16acbdb0, flags=) at kernel/qeventloop.cpp:201 #8 0x00007fbe24fb3d59 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487 #9 0x00007fbe2508a178 in QInotifyFileSystemWatcherEngine::run (this=0x14d2e50) at io/qfilesystemwatcher_inotify.cpp:248 #10 0x00007fbe24fb6775 in QThreadPrivate::start (arg=0x14d2e50) at thread/qthread_unix.cpp:248 #11 0x00007fbe24d269ca in start_thread (arg=<value optimized out>) at pthread_create.c:300 #12 0x00007fbe242d669d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #13 0x0000000000000000 in ?? () Thread 1 (Thread 0x7fbe27e45760 (LWP 7125)): [KCrash Handler] #5 qt_fetchPixel<(QImage::Format)3> (buffer=0x7fff6f0241f0, data=0x3418ab0, y=<value optimized out>, x=<value optimized out>, length=<value optimized out>) at painting/qdrawhelper.cpp:388 #6 qt_fetchUntransformed<(QImage::Format)3> (buffer=0x7fff6f0241f0, data=0x3418ab0, y=<value optimized out>, x=<value optimized out>, length=<value optimized out>) at painting/qdrawhelper.cpp:545 #7 0x00007fbe25e87de6 in blend_untransformed_generic<(SpanMethod)0> (count=<value optimized out>, spans=0x7fff6f028340, userData=<value optimized out>) at painting/qdrawhelper.cpp:3351 #8 0x00007fbe25e8e4fe in blend_untransformed_argb<(SpanMethod)0> (count=76, spans=0x7fff6f028340, userData=0x3418ab0) at painting/qdrawhelper.cpp:3377 #9 0x00007fbe25e63b34 in fillRect_normalized (r=<value optimized out>, data=0x3418ab0, pe=<value optimized out>) at painting/qpaintengine_raster.cpp:1511 #10 0x00007fbe25e66014 in QRasterPaintEngine::drawImage (this=<value optimized out>, p=<value optimized out>, img=<value optimized out>) at painting/qpaintengine_raster.cpp:2528 #11 0x00007fbe25df6a4f in QPainter::drawImage (this=0x7fff6f028e10, p=..., image=...) at painting/qpainter.cpp:5527 #12 0x00007fbe27a5b6eb in QPainter::drawImage (this=0x7fff6f029450, pieceID=0, mask=..., offset=...) at /usr/include/qt4/QtGui/qpainter.h:887 #13 Pala::SlicerJob::addPieceFromMask (this=0x7fff6f029450, pieceID=0, mask=..., offset=...) at /build/buildd/kdegames-4.4.3/palapeli/libpala/slicerjob.cpp:114 #14 0x00007fbe15304f99 in JigsawSlicer::run (this=<value optimized out>, job=<value optimized out>) at /build/buildd/kdegames-4.4.3/palapeli/slicers/slicer-jigsaw.cpp:200 #15 0x000000000041eef7 in Palapeli::PuzzleCreatorDialog::createPuzzle (this=0x1ddb200) at /build/buildd/kdegames-4.4.3/palapeli/src/creator/puzzlecreator.cpp:142 #16 0x000000000041fea4 in Palapeli::PuzzleCreatorDialog::qt_metacall (this=0x1ddb200, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff6f0296f0) at /build/buildd/kdegames-4.4.3/obj-x86_64-linux-gnu/palapeli/src/puzzlecreator.moc:78 #17 0x00007fbe250bde3f in QMetaObject::activate (sender=0x1ddb200, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293 #18 0x00007fbe270e44b8 in KDialog::slotButtonClicked (this=0x1ddb200, button=4) at ../../kdeui/dialogs/kdialog.cpp:862 #19 0x00007fbe270e6329 in KDialog::qt_metacall (this=0x1ddb200, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff6f0298d0) at ./kdialog.moc:190 #20 0x000000000041fe50 in Palapeli::PuzzleCreatorDialog::qt_metacall (this=0x7fff6f0241f0, _c=120, _id=54626992, _a=0x0) at /build/buildd/kdegames-4.4.3/obj-x86_64-linux-gnu/palapeli/src/puzzlecreator.moc:71 #21 0x00007fbe250bde3f in QMetaObject::activate (sender=0x1e76be8, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293 #22 0x00007fbe250c315e in QSignalMapper::mapped (this=0x7fff6f0241f0, _t1=4) at .moc/release-shared/moc_qsignalmapper.cpp:101 #23 0x00007fbe250c4372 in QSignalMapper::map (this=0x1e76be8, sender=0x1ec6580) at kernel/qsignalmapper.cpp:266 #24 0x00007fbe250c45f0 in QSignalMapper::qt_metacall (this=0x1e76be8, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff6f029a60) at .moc/release-shared/moc_qsignalmapper.cpp:87 #25 0x00007fbe250bde3f in QMetaObject::activate (sender=0x1ec6580, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293 #26 0x00007fbe263335f2 in QAbstractButton::clicked (this=0x7fff6f0241f0, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206 #27 0x00007fbe2604d86b in QAbstractButtonPrivate::emitClicked (this=0x1acf950) at widgets/qabstractbutton.cpp:546 #28 0x00007fbe2604d96f in QAbstractButton::click (this=0x1ec6580) at widgets/qabstractbutton.cpp:983 #29 0x00007fbe26161d88 in QDialog::keyPressEvent (this=<value optimized out>, e=<value optimized out>) at dialogs/qdialog.cpp:683 #30 0x00007fbe25cee22e in QWidget::event (this=0x1ddb200, event=0x7fff6f02a300) at kernel/qwidget.cpp:8033 #31 0x00007fbe25c9822c in QApplicationPrivate::notify_helper (this=0x12f2db0, receiver=0x1ddb200, e=0x7fff6f02a300) at kernel/qapplication.cpp:4300 #32 0x00007fbe25c9fec5 in QApplication::notify (this=<value optimized out>, receiver=0x1ddb200, e=0x7fff6f02a300) at kernel/qapplication.cpp:3763 #33 0x00007fbe27174536 in KApplication::notify (this=0x7fff6f02cb50, receiver=0x1eb7a80, event=0x7fff6f02a300) at ../../kdeui/kernel/kapplication.cpp:302 #34 0x00007fbe250ab06c in QCoreApplication::notifyInternal (this=0x7fff6f02cb50, receiver=0x1eb7a80, event=0x7fff6f02a300) at kernel/qcoreapplication.cpp:704 #35 0x00007fbe25d4316a in QKeyMapper::sendKeyEvent (keyWidget=0x1eb7a80, grab=<value optimized out>, type=QEvent::KeyPress, code=16777220, modifiers=<value optimized out>, text=..., autorepeat=false, count=1, nativeScanCode=36, nativeVirtualKey=65293, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1861 #36 0x00007fbe25d456f0 in QKeyMapperPrivate::translateKeyEvent (this=0x1335bf0, keyWidget=0x1eb7a80, event=<value optimized out>, grab=120) at kernel/qkeymapper_x11.cpp:1831 #37 0x00007fbe25d1c904 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff6f02aed0) at kernel/qapplication_x11.cpp:3394 #38 0x00007fbe25d48882 in x11EventSourceDispatch (s=0x12f6bf0, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #39 0x00007fbe21e338c2 in g_main_dispatch (context=0x12f5930) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:1960 #40 IA__g_main_context_dispatch (context=0x12f5930) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2513 #41 0x00007fbe21e37748 in g_main_context_iterate (context=0x12f5930, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2591 #42 0x00007fbe21e378fc in IA__g_main_context_iteration (context=0x12f5930, may_block=1) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2654 #43 0x00007fbe250d4513 in QEventDispatcherGlib::processEvents (this=0x12dc3a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #44 0x00007fbe25d4846e in QGuiEventDispatcherGlib::processEvents (this=0x7fff6f0241f0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #45 0x00007fbe250a9992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #46 0x00007fbe250a9d6c in QEventLoop::exec (this=0x7fff6f02b200, flags=) at kernel/qeventloop.cpp:201 #47 0x00007fbe2616209e in QDialog::exec (this=0x1ddb200) at dialogs/qdialog.cpp:546 #48 0x000000000043c9a7 in Palapeli::MainWindow::createPuzzle (this=0x13fa3c0) at /build/buildd/kdegames-4.4.3/palapeli/src/window/mainwindow.cpp:145 #49 0x000000000043d52c in Palapeli::MainWindow::qt_metacall (this=0x13fa3c0, _c=QMetaObject::InvokeMetaMethod, _id=54626992, _a=0x7fff6f02b380) at /build/buildd/kdegames-4.4.3/obj-x86_64-linux-gnu/palapeli/src/mainwindow.moc:79 #50 0x00007fbe250bde3f in QMetaObject::activate (sender=0x13edba0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293 #51 0x000000000043b03c in Palapeli::CollectionWidget::qt_metacall (this=0x13edba0, _c=QMetaObject::InvokeMetaMethod, _id=54626992, _a=0x7fff6f02b4f0) at /build/buildd/kdegames-4.4.3/obj-x86_64-linux-gnu/palapeli/src/collectionwidget.moc:84 #52 0x00007fbe250bde3f in QMetaObject::activate (sender=0x1498b60, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293 #53 0x00007fbe25c92032 in QAction::triggered (this=0x7fff6f0241f0, _t1=false) at .moc/release-shared/moc_qaction.cpp:263 #54 0x00007fbe25c940ab in QAction::activate (this=0x1498b60, event=<value optimized out>) at kernel/qaction.cpp:1255 #55 0x00007fbe2604e6ca in QAbstractButtonPrivate::click (this=0x14acab0) at widgets/qabstractbutton.cpp:528 #56 0x00007fbe2604e97c in QAbstractButton::mouseReleaseEvent (this=0x14ac340, e=0x7fff6f02be50) at widgets/qabstractbutton.cpp:1121 #57 0x00007fbe2611a8ca in QToolButton::mouseReleaseEvent (this=0x7fff6f0241f0, e=0x78) at widgets/qtoolbutton.cpp:721 #58 0x00007fbe25cee582 in QWidget::event (this=0x14ac340, event=0x7fff6f02be50) at kernel/qwidget.cpp:7998 #59 0x00007fbe25c9822c in QApplicationPrivate::notify_helper (this=0x12f2db0, receiver=0x14ac340, e=0x7fff6f02be50) at kernel/qapplication.cpp:4300 #60 0x00007fbe25c9eecb in QApplication::notify (this=0x7fff6f02cb50, receiver=0x14ac340, e=0x7fff6f02be50) at kernel/qapplication.cpp:3865 #61 0x00007fbe27174536 in KApplication::notify (this=0x7fff6f02cb50, receiver=0x14ac340, event=0x7fff6f02be50) at ../../kdeui/kernel/kapplication.cpp:302 #62 0x00007fbe250ab06c in QCoreApplication::notifyInternal (this=0x7fff6f02cb50, receiver=0x14ac340, event=0x7fff6f02be50) at kernel/qcoreapplication.cpp:704 #63 0x00007fbe25c9e0ae in QCoreApplication::sendEvent (receiver=0x14ac340, event=0x7fff6f02be50, alienWidget=0x14ac340, nativeWidget=0x13edba0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #64 QApplicationPrivate::sendMouseEvent (receiver=0x14ac340, event=0x7fff6f02be50, alienWidget=0x14ac340, nativeWidget=0x13edba0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:2965 #65 0x00007fbe25d1df65 in QETWidget::translateMouseEvent (this=0x13edba0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4368 #66 0x00007fbe25d1c8ac in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff6f02c770) at kernel/qapplication_x11.cpp:3501 #67 0x00007fbe25d48882 in x11EventSourceDispatch (s=0x12f6bf0, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #68 0x00007fbe21e338c2 in g_main_dispatch (context=0x12f5930) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:1960 #69 IA__g_main_context_dispatch (context=0x12f5930) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2513 #70 0x00007fbe21e37748 in g_main_context_iterate (context=0x12f5930, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2591 #71 0x00007fbe21e378fc in IA__g_main_context_iteration (context=0x12f5930, may_block=1) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2654 #72 0x00007fbe250d4513 in QEventDispatcherGlib::processEvents (this=0x12dc3a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #73 0x00007fbe25d4846e in QGuiEventDispatcherGlib::processEvents (this=0x7fff6f0241f0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #74 0x00007fbe250a9992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #75 0x00007fbe250a9d6c in QEventLoop::exec (this=0x7fff6f02caa0, flags=) at kernel/qeventloop.cpp:201 #76 0x00007fbe250adaab in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #77 0x000000000043a58b in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kdegames-4.4.3/palapeli/src/main.cpp:54 Reported using DrKonqi
I think I figured a condition that makes Palapeli crash with some images but not others. Each time I try to create a puzzle from an image stored as grayscale, Palapeli crash. With the same images converted to be stored as RGB, there is no crash.
Palapeli version 1.1 running on KDE 4.5 (Kubuntu Maverick packages) still segfaults when creating a puzzle from a grayscale image.
[Comment from a bug triager] Testcase JPEG file that causes the crash: https://bugs.kde.org/attachment.cgi?id=55996 (from bug 263003)
*** Bug 263003 has been marked as a duplicate of this bug. ***
Created attachment 62161 [details] New crash information added by DrKonqi palapeli (1.2) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.0 - What I was doing when the application crashed: Trying to create a puzzle (230 pieces) on a BW image (jpg). Previous bug report mentioned grayscale... well, that's BW.... it doesn't crash on color pictures. This was the first BW photo I tried it on. Crashed x2 in a row. -- Backtrace (Reduced): #10 0x00007f090d036974 in fillRect_normalized (r=<value optimized out>, data=0x2c09958, pe=<value optimized out>) at painting/qpaintengine_raster.cpp:1495 #11 0x00007f090d038a54 in QRasterPaintEngine::drawImage (this=<value optimized out>, p=<value optimized out>, img=<value optimized out>) at painting/qpaintengine_raster.cpp:2516 #12 0x00007f090cfc004f in QPainter::drawImage (this=0x7fff029fe490, p=..., image=...) at painting/qpainter.cpp:5555 #13 0x00007f08fa3de5a1 in drawImage (this=0x7fff029feb70, piece_id=<value optimized out>, path=<value optimized out>) at /usr/include/qt4/QtGui/qpainter.h:918 #14 GoldbergEngine::makePieceFromPath (this=0x7fff029feb70, piece_id=<value optimized out>, path=<value optimized out>) at ../../../palapeli/slicers/goldberg/goldberg-engine.cpp:227
Created attachment 62762 [details] Indexed Colour image causes palapeli crash Using Goldberg slicer creating puzzle crashes. Convert with gimp Image->Mode->RGB and save fixes the problem
*** Bug 304308 has been marked as a duplicate of this bug. ***
Created attachment 74072 [details] Proposed patch
https://git.reviewboard.kde.org/r/106678/
Git commit fa3a58e6184423805891ae7dea37c9adc212eb88 by Christoph Feck. Committed on 18/10/2012 at 15:10. Pushed by cfeck into branch 'master'. Fix crash with grayscale images REVIEW: 106678 M +1 -1 src/creator/puzzlecreator.cpp http://commits.kde.org/palapeli/fa3a58e6184423805891ae7dea37c9adc212eb88
Git commit 89507fe6fa44e085a13823918aac5e755df643ea by Christoph Feck. Committed on 18/10/2012 at 15:10. Pushed by cfeck into branch 'KDE/4.9'. Fix crash with grayscale images FIXED-IN: 4.9.3 REVIEW: 106678 (cherry picked from commit fa3a58e6184423805891ae7dea37c9adc212eb88) M +1 -1 src/creator/puzzlecreator.cpp http://commits.kde.org/palapeli/89507fe6fa44e085a13823918aac5e755df643ea
*** Bug 318783 has been marked as a duplicate of this bug. ***
FWIW I was able to create a greyscale puzzle from this image using 100 rectangular pieces. When I selected normal piece-slicing, Palapeli vanished without any crash or backtrace. This was on an Apple Macbook using a Macports port of Palapeli 1.2 for KDE 4.10.1. Solving the puzzle worked well and finished correctly. It looks as though some slicers are working with greyscale but not others.
Previous fix is wrong. I did not see that "image" was used before assigning it to the creationContext. New patch on the way.
Ian, I basically moved the convertToFormat from previous patch to the line before the SlicerJob is created. Do you need a review request? No crash here with image from duplicate bug. diff --git a/src/creator/puzzlecreator.cpp b/src/creator/puzzlecreator.cpp index 655ed0d..28cca94 100644 --- a/src/creator/puzzlecreator.cpp +++ b/src/creator/puzzlecreator.cpp @@ -122,6 +122,7 @@ void Palapeli::PuzzleCreatorDialog::createPuzzle() KMessageBox::sorry(this, i18n("Puzzle cannot be created: The file you selected is not an image.")); return; } + image = image.convertToFormat(image.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32); Pala::SlicerJob job(image, slicerArgs); job.setMode(selection.mode); if (!const_cast<Pala::Slicer*>(slicer)->process(&job)) //BIC: make Pala::Slicer::process() and run() const @@ -135,7 +136,7 @@ void Palapeli::PuzzleCreatorDialog::createPuzzle() creationContext.comment = m_commentEdit->text(); creationContext.author = m_authorEdit->text(); creationContext.pieceCount = job.pieces().count(); - creationContext.image = image.convertToFormat(image.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32); + creationContext.image = image; creationContext.thumbnail = image.scaled(Palapeli::PuzzleMetadata::ThumbnailBaseSize, Qt::KeepAspectRatio); creationContext.modifyProtection = false; //only enabled for default puzzles creationContext.slicer = selection.slicerPluginName;
No review required from me. Maybe Albert would like to have a look at your patch. Did you test some colored cases as well as greyscale? No regressions I hope.
Git commit eff4a73ee36397885832e6e4f8dc8b622f5b2d5b by Christoph Feck. Committed on 07/05/2013 at 02:18. Pushed by cfeck into branch 'KDE/4.10'. Fix conversion to RGB format The previous fix was at the wrong place. FIXED-IN: 4.10.4 M +2 -1 src/creator/puzzlecreator.cpp http://commits.kde.org/palapeli/eff4a73ee36397885832e6e4f8dc8b622f5b2d5b
Removing jessearrondavidjones@yahoo.com per abuse complaint.