Bug 183850 - Kolourpaint crashes on startup or selecting a tool when using Qt4.5 and -native(default) or -opengl graphicssystem ( QX11PaintEngine::drawPixmap, kpPixmapFX::ensureNoAlphaChannel ) (works OK with raster)
Summary: Kolourpaint crashes on startup or selecting a tool when using Qt4.5 and -nati...
Status: RESOLVED WORKSFORME
Alias: None
Product: kolourpaint
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kolourpaint-support
URL:
Keywords:
: 185693 185703 186026 186538 187184 187759 188306 189244 189506 189860 190190 190505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-09 23:10 UTC by Öyvind Saether
Modified: 2009-07-26 18:22 UTC (History)
24 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Valgrind output for kolourpaint (53.27 KB, text/plain)
2009-04-03 17:21 UTC, Ben Boeckel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Öyvind Saether 2009-02-09 23:10:36 UTC
Version:            (using Devel)
Compiler:          gcc (Gentoo 4.3.2-r2 p1.5, pie-10.1.5) 4.3.2 
OS:                Linux
Installed from:    Compiled sources

QT 4.5.0_rc1
Kolourpaint Version 4.2.62 (KDE 4.2.62 (KDE 4.3 >= 20090204))
Using KDE 4.2.62 (KDE 4.2.62 (KDE 4.3 >= 20090204))

Kolourpaint crashes when selecting most tools, which makes the program quite useless.

Here is a backtrace when selecting the brush tool:

Application: KolourPaint (kolourpaint), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]

Thread 1 (Thread 0xb5fd76d0 (LWP 16461)):
[KCrash Handler]
#6  0x00000100 in ?? ()
#7  0xb6c9120a in QX11PaintEngine::drawPixmap (this=0x8730be8, r=@0xbfa72620, px=@0xbfa72718, _sr=@0xbfa72600) at painting/qpaintengine_x11.cpp:1865
#8  0xb6bce56b in QPainter::drawPixmap (this=0xbfa72724, p=@0xbfa726e0, pm=@0xbfa72718) at painting/qpainter.cpp:5227
#9  0x080c0e45 in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbfa72768) at /usr/include/qt4/QtGui/qpainter.h:799
#10 0x080bf6d1 in kpPixmapFX::convertToPixmap (image=@0xbfa727d0, pretty=false, wali=@0xbfa727ac)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#11 0x0808a8cb in kpEffectInvert::applyEffect (destPixmapPtr=0xbfa72878, channels=7) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#12 0x080f37ab in kpToolWidgetBase::paintEvent (this=0x84f00c8, e=0xbfa72d64)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#13 0xb6b085ae in QWidget::event (this=0x84f00c8, event=0xbfa72d64) at kernel/qwidget.cpp:7649
#14 0x080f2df3 in kpToolWidgetBase::event (this=0x84f00c8, e=0xbfa72d64) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#15 0xb6ab6bc4 in QApplicationPrivate::notify_helper (this=0x812ef38, receiver=0x84f00c8, e=0xbfa72d64) at kernel/qapplication.cpp:4051
#16 0xb6abe70a in QApplication::notify (this=0xbfa74964, receiver=0x84f00c8, e=0xbfa72d64) at kernel/qapplication.cpp:4016
#17 0xb792365d in KApplication::notify (this=0xbfa74964, receiver=0x84f00c8, event=0xbfa72d64) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#18 0xb73f662a in QCoreApplication::notifyInternal (this=0xbfa74964, receiver=0x84f00c8, event=0xbfa72d64) at kernel/qcoreapplication.cpp:590
#19 0xb6ac096e in QCoreApplication::sendSpontaneousEvent (receiver=0x84f00c8, event=0x8759aa0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:211
#20 0xb6b0baf0 in QWidgetPrivate::drawWidget (this=0x84eeba8, pdev=0x820457c, rgn=@0xbfa72ec4, offset=@0xbfa72ebc, flags=4, sharedPainter=0x0, backingStore=0x8204548) at kernel/qwidget.cpp:5041
#21 0xb6b0c227 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=0, rgn=@0xbfa72f54, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5151
#22 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=7, rgn=@0xbfa72fe4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#23 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=8, rgn=@0xbfa73074, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#24 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=9, rgn=@0xbfa73104, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#25 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=10, rgn=@0xbfa73194, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#26 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=11, rgn=@0xbfa73224, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#27 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=12, rgn=@0xbfa732b4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#28 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=13, rgn=@0xbfa73344, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#29 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=14, rgn=@0xbfa733d4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#30 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=15, rgn=@0xbfa73464, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#31 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=16, rgn=@0xbfa734f4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#32 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=17, rgn=@0xbfa73584, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#33 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=18, rgn=@0xbfa73614, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#34 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=19, rgn=@0xbfa736a4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#35 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=20, rgn=@0xbfa73734, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#36 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=21, rgn=@0xbfa737c4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#37 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=22, rgn=@0xbfa73854, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#38 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=23, rgn=@0xbfa738e4, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#39 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=24, rgn=@0xbfa73974, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#40 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84eea88, pdev=0x820457c, siblings=@0x84eea94, index=25, rgn=@0xbfa73b74, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#41 0xb6b0b708 in QWidgetPrivate::drawWidget (this=0x84eea88, pdev=0x820457c, rgn=@0xbfa73b74, offset=@0xbfa73b6c, flags=4, sharedPainter=0x0, backingStore=0x8204548) at kernel/qwidget.cpp:5090
#42 0xb6b0c227 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ed968, pdev=0x820457c, siblings=@0x84ed974, index=6, rgn=@0xbfa73d74, offset=@0xbfa73d6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5151
#43 0xb6b0b708 in QWidgetPrivate::drawWidget (this=0x84ed968, pdev=0x820457c, rgn=@0xbfa73d74, offset=@0xbfa73d6c, flags=4, sharedPainter=0x0, backingStore=0x8204548) at kernel/qwidget.cpp:5090
#44 0xb6b0c227 in QWidgetPrivate::paintSiblingsRecursive (this=0x82027a0, pdev=0x820457c, siblings=@0x82027ac, index=42, rgn=@0xbfa73e04, offset=@0x820456c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5151
#45 0xb6b0c154 in QWidgetPrivate::paintSiblingsRecursive (this=0x82027a0, pdev=0x820457c, siblings=@0x82027ac, index=43, rgn=@0xbfa74160, offset=@0x820456c, flags=4, sharedPainter=0x0, 
    backingStore=0x8204548) at kernel/qwidget.cpp:5142
#46 0xb6b0b708 in QWidgetPrivate::drawWidget (this=0x82027a0, pdev=0x820457c, rgn=@0xbfa74160, offset=@0x820456c, flags=4, sharedPainter=0x0, backingStore=0x8204548) at kernel/qwidget.cpp:5090
#47 0xb6ca32a2 in QWidgetBackingStore::sync (this=0x8204548) at painting/qbackingstore.cpp:1267
#48 0xb6afd117 in QWidgetPrivate::syncBackingStore (this=0x82027a0) at kernel/qwidget.cpp:1598
#49 0xb6b08b9e in QWidget::event (this=0x8201bf0, event=0x8554790) at kernel/qwidget.cpp:7789
#50 0xb6e9d117 in QMainWindow::event (this=0x8201bf0, event=0x8554790) at widgets/qmainwindow.cpp:1391
#51 0xb7a04a57 in KMainWindow::event (this=0x8201bf0, ev=0x8554790) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/widgets/kmainwindow.cpp:1094
#52 0xb7a492dc in KXmlGuiWindow::event (this=0x8201bf0, ev=0x8554790) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/xmlgui/kxmlguiwindow.cpp:131
#53 0xb6ab6bc4 in QApplicationPrivate::notify_helper (this=0x812ef38, receiver=0x8201bf0, e=0x8554790) at kernel/qapplication.cpp:4051
#54 0xb6abe70a in QApplication::notify (this=0xbfa74964, receiver=0x8201bf0, e=0x8554790) at kernel/qapplication.cpp:4016
#55 0xb792365d in KApplication::notify (this=0xbfa74964, receiver=0x8201bf0, event=0x8554790) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#56 0xb73f662a in QCoreApplication::notifyInternal (this=0xbfa74964, receiver=0x8201bf0, event=0x8554790) at kernel/qcoreapplication.cpp:590
#57 0xb73f6f3a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x81172c0) at kernel/qcoreapplication.h:208
#58 0xb73f70dd in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1124
#59 0xb741e1ef in postEventSourceDispatch (s=0x8131320) at kernel/qcoreapplication.h:213
#60 0xb6200340 in IA__g_main_context_dispatch (context=0x81312a0) at gmain.c:2144
#61 0xb6203a13 in g_main_context_iterate (context=0x81312a0, block=1, dispatch=1, self=0x812f110) at gmain.c:2778
#62 0xb6203bd1 in IA__g_main_context_iteration (context=0x81312a0, may_block=1) at gmain.c:2841
#63 0xb741de38 in QEventDispatcherGlib::processEvents (this=0x8126da0, flags={i = -1079556008}) at kernel/qeventdispatcher_glib.cpp:318
#64 0xb6b45875 in QGuiEventDispatcherGlib::processEvents (this=0x8126da0, flags={i = -1079555960}) at kernel/qguieventdispatcher_glib.cpp:197
#65 0xb73f4dfa in QEventLoop::processEvents (this=0xbfa748f0, flags={i = -1079555896}) at kernel/qeventloop.cpp:144
#66 0xb73f4fb2 in QEventLoop::exec (this=0xbfa748f0, flags={i = -1079555848}) at kernel/qeventloop.cpp:191
#67 0xb73f71a1 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:872
#68 0xb6ab6a37 in QApplication::exec () at kernel/qapplication.cpp:3526
#69 0x08095e7d in main (argc=1, argv=0xbfa74b14) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/kolourpaint.cpp:125


Clicking the rectangle tool:

Application: KolourPaint (kolourpaint), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]

Thread 1 (Thread 0xb5fde6d0 (LWP 3200)):
[KCrash Handler]
#6  0x00000100 in ?? ()
#7  0xb6c9820a in QX11PaintEngine::drawPixmap (this=0x8765148, r=@0xbf879390, px=@0xbf879488, _sr=@0xbf879370) at painting/qpaintengine_x11.cpp:1865
#8  0xb6bd556b in QPainter::drawPixmap (this=0xbf879494, p=@0xbf879450, pm=@0xbf879488) at painting/qpainter.cpp:5227
#9  0x080c0e45 in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbf8794d8) at /usr/include/qt4/QtGui/qpainter.h:799
#10 0x080bf6d1 in kpPixmapFX::convertToPixmap (image=@0xbf879540, pretty=false, wali=@0xbf87951c)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#11 0x0808a8cb in kpEffectInvert::applyEffect (destPixmapPtr=0xbf8795e8, channels=7) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#12 0x080f37ab in kpToolWidgetBase::paintEvent (this=0x84ffe28, e=0xbf879ad4)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#13 0xb6b0f5ae in QWidget::event (this=0x84ffe28, event=0xbf879ad4) at kernel/qwidget.cpp:7649
#14 0x080f2df3 in kpToolWidgetBase::event (this=0x84ffe28, e=0xbf879ad4) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#15 0xb6abdbc4 in QApplicationPrivate::notify_helper (this=0x812ef38, receiver=0x84ffe28, e=0xbf879ad4) at kernel/qapplication.cpp:4051
#16 0xb6ac570a in QApplication::notify (this=0xbf87b764, receiver=0x84ffe28, e=0xbf879ad4) at kernel/qapplication.cpp:4016
#17 0xb792a65d in KApplication::notify (this=0xbf87b764, receiver=0x84ffe28, event=0xbf879ad4) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#18 0xb73fd62a in QCoreApplication::notifyInternal (this=0xbf87b764, receiver=0x84ffe28, event=0xbf879ad4) at kernel/qcoreapplication.cpp:590
#19 0xb6ac796e in QCoreApplication::sendSpontaneousEvent (receiver=0x84ffe28, event=0x87650e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:211
#20 0xb6b12af0 in QWidgetPrivate::drawWidget (this=0x8500a68, pdev=0x8203754, rgn=@0xbf879c34, offset=@0xbf879c2c, flags=4, sharedPainter=0x0, backingStore=0x8203720) at kernel/qwidget.cpp:5041
#21 0xb6b13227 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=2, rgn=@0xbf879cc4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5151
#22 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=3, rgn=@0xbf879d54, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#23 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=7, rgn=@0xbf879de4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#24 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=8, rgn=@0xbf879e74, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#25 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=9, rgn=@0xbf879f04, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#26 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=10, rgn=@0xbf879f94, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#27 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=11, rgn=@0xbf87a024, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#28 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=12, rgn=@0xbf87a0b4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#29 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=13, rgn=@0xbf87a144, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#30 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=14, rgn=@0xbf87a1d4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#31 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=15, rgn=@0xbf87a264, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#32 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=16, rgn=@0xbf87a2f4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#33 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=17, rgn=@0xbf87a384, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#34 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=18, rgn=@0xbf87a414, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#35 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=19, rgn=@0xbf87a4a4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#36 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=20, rgn=@0xbf87a534, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#37 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=21, rgn=@0xbf87a5c4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#38 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=22, rgn=@0xbf87a654, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#39 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=23, rgn=@0xbf87a6e4, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#40 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=24, rgn=@0xbf87a774, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#41 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ec5f0, pdev=0x8203754, siblings=@0x84ec5fc, index=25, rgn=@0xbf87a974, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#42 0xb6b12708 in QWidgetPrivate::drawWidget (this=0x84ec5f0, pdev=0x8203754, rgn=@0xbf87a974, offset=@0xbf87a96c, flags=4, sharedPainter=0x0, backingStore=0x8203720) at kernel/qwidget.cpp:5090
#43 0xb6b13227 in QWidgetPrivate::paintSiblingsRecursive (this=0x84edd60, pdev=0x8203754, siblings=@0x84edd6c, index=6, rgn=@0xbf87ab74, offset=@0xbf87ab6c, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5151
#44 0xb6b12708 in QWidgetPrivate::drawWidget (this=0x84edd60, pdev=0x8203754, rgn=@0xbf87ab74, offset=@0xbf87ab6c, flags=4, sharedPainter=0x0, backingStore=0x8203720) at kernel/qwidget.cpp:5090
#45 0xb6b13227 in QWidgetPrivate::paintSiblingsRecursive (this=0x8201ce0, pdev=0x8203754, siblings=@0x8201cec, index=42, rgn=@0xbf87ac04, offset=@0x8203744, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5151
#46 0xb6b13154 in QWidgetPrivate::paintSiblingsRecursive (this=0x8201ce0, pdev=0x8203754, siblings=@0x8201cec, index=43, rgn=@0xbf87af60, offset=@0x8203744, flags=4, sharedPainter=0x0, 
    backingStore=0x8203720) at kernel/qwidget.cpp:5142
#47 0xb6b12708 in QWidgetPrivate::drawWidget (this=0x8201ce0, pdev=0x8203754, rgn=@0xbf87af60, offset=@0x8203744, flags=4, sharedPainter=0x0, backingStore=0x8203720) at kernel/qwidget.cpp:5090
#48 0xb6caa2a2 in QWidgetBackingStore::sync (this=0x8203720) at painting/qbackingstore.cpp:1267
#49 0xb6b04117 in QWidgetPrivate::syncBackingStore (this=0x8201ce0) at kernel/qwidget.cpp:1598
#50 0xb6b0fb9e in QWidget::event (this=0x8213a40, event=0x84e90e0) at kernel/qwidget.cpp:7789
#51 0xb6ea4117 in QMainWindow::event (this=0x8213a40, event=0x84e90e0) at widgets/qmainwindow.cpp:1391
#52 0xb7a0ba57 in KMainWindow::event (this=0x8213a40, ev=0x84e90e0) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/widgets/kmainwindow.cpp:1094
#53 0xb7a502dc in KXmlGuiWindow::event (this=0x8213a40, ev=0x84e90e0) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/xmlgui/kxmlguiwindow.cpp:131
#54 0xb6abdbc4 in QApplicationPrivate::notify_helper (this=0x812ef38, receiver=0x8213a40, e=0x84e90e0) at kernel/qapplication.cpp:4051
#55 0xb6ac570a in QApplication::notify (this=0xbf87b764, receiver=0x8213a40, e=0x84e90e0) at kernel/qapplication.cpp:4016
#56 0xb792a65d in KApplication::notify (this=0xbf87b764, receiver=0x8213a40, event=0x84e90e0) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#57 0xb73fd62a in QCoreApplication::notifyInternal (this=0xbf87b764, receiver=0x8213a40, event=0x84e90e0) at kernel/qcoreapplication.cpp:590
#58 0xb73fdf3a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x81172c0) at kernel/qcoreapplication.h:208
#59 0xb73fe0dd in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1124
#60 0xb74251ef in postEventSourceDispatch (s=0x8131320) at kernel/qcoreapplication.h:213
#61 0xb6207340 in IA__g_main_context_dispatch (context=0x81312a0) at gmain.c:2144
#62 0xb620aa13 in g_main_context_iterate (context=0x81312a0, block=1, dispatch=1, self=0x812f110) at gmain.c:2778
#63 0xb620abd1 in IA__g_main_context_iteration (context=0x81312a0, may_block=1) at gmain.c:2841
#64 0xb7424e38 in QEventDispatcherGlib::processEvents (this=0x8126da0, flags={i = -1081625000}) at kernel/qeventdispatcher_glib.cpp:318
#65 0xb6b4c875 in QGuiEventDispatcherGlib::processEvents (this=0x8126da0, flags={i = -1081624952}) at kernel/qguieventdispatcher_glib.cpp:197
#66 0xb73fbdfa in QEventLoop::processEvents (this=0xbf87b6f0, flags={i = -1081624888}) at kernel/qeventloop.cpp:144
#67 0xb73fbfb2 in QEventLoop::exec (this=0xbf87b6f0, flags={i = -1081624840}) at kernel/qeventloop.cpp:191
#68 0xb73fe1a1 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:872
#69 0xb6abda37 in QApplication::exec () at kernel/qapplication.cpp:3526
#70 0x08095e7d in main (argc=1, argv=0xbf87b914) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/kolourpaint.cpp:125
Comment 1 Dan Coats 2009-02-23 20:54:31 UTC
same here, crashes at random times during use
Comment 2 Dario Andres 2009-02-27 12:44:18 UTC
*** Bug 185693 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2009-02-27 12:45:57 UTC
If you run kolourpaint as "kolourpaint -graphicssystem native" (from Konsole) does the application crashes too ? This may be related to the new Qt4.5 graphics system (raster engine enabled by default in some distribution packages)
Comment 4 Nadav Kavalerchik 2009-02-27 14:09:33 UTC
yes

laptop:~# kolourpaint -graphicssystem native
Starting KolourPaint on a 24-bit screen...
KCrash: Application 'kolourpaint' crashing...
sock_file=/root/.kde4/socket-laptop/kdeinit4__0
laptop:~#
Comment 5 Nadav Kavalerchik 2009-02-27 14:43:28 UTC
 --graphicssystem <system> use a different graphics system instead of the default one, options are raster and opengl (experimental)


laptop:~# kolourpaint -graphicssystem opengl
using visual class 4, id 2d
Starting KolourPaint on a 24-bit screen...
using visual class 4, id 2d
kolourpaint(6282): Pixmap has alpha channel.  See the .h doc for kpPixmapFX::ensureNoAlphaChannel() to fix this.
kolourpaint(6282): Pixmap has alpha channel.  See the .h doc for kpPixmapFX::ensureNoAlphaChannel() to fix this.
ASSERT: "QPixmap (1, 1).depth () == QPixmap::defaultDepth ()" in file ../../kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp, line 189
KCrash: Application 'kolourpaint' crashing...
sock_file=/root/.kde4/socket-laptop/kdeinit4__0
laptop:~# kolourpaint -graphicssystem raster
Starting KolourPaint on a 24-bit screen...
ASSERT: "QPixmap (1, 1).depth () == QPixmap::defaultDepth ()" in file ../../kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp, line 189
KCrash: Application 'kolourpaint' crashing...
sock_file=/root/.kde4/socket-laptop/kdeinit4__0
laptop:~#
Comment 6 Dan Coats 2009-02-27 14:50:45 UTC
opengl is known not to work correctly yet, its native or raster. and qt built without raster support here still kolourpaint crashes.
Comment 7 Öyvind Saether 2009-02-28 04:47:04 UTC
The -graphicssystem apperas to be irrellevant. All FAiL

$ kolourpaint -graphicssystem native
Starting KolourPaint on a 24-bit screen...
kolourpaint(4836) KStyle::standardIconImplementation: ################### 26
kolourpaint(4836) KStyle::standardIconImplementation: ################### 26
kolourpaint(4836) KStyle::standardIconImplementation: ################### 26
kolourpaint(4836) KStyle::standardIconImplementation: ################### 26
pure virtual method called
terminate called without an active exception
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kolourpaint path = <unknown> pid = 4836
sock_file=/home/oyvinds//.kdelive/socket-deadbabecafe/kdeinit4__0


$ kolourpaint -graphicssystem raster
Starting KolourPaint on a 24-bit screen...
ASSERT: "QPixmap (1, 1).depth () == QPixmap::defaultDepth ()" in file /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp, line 189
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kolourpaint path = <unknown> pid = 4983
sock_file=/home/oyvinds//.kdelive/socket-deadbabecafe/kdeinit4__0


$ kolourpaint -graphicssystem opengl
Unable to load graphicssystem "opengl"
Starting KolourPaint on a 24-bit screen...
Unable to load graphicssystem "opengl"
kolourpaint(5083) KStyle::standardIconImplementation: ################### 26
kolourpaint(5083) KStyle::standardIconImplementation: ################### 26
kolourpaint(5083) KStyle::standardIconImplementation: ################### 26
kolourpaint(5083) KStyle::standardIconImplementation: ################### 26
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kolourpaint path = <unknown> pid = 5083
sock_file=/home/oyvinds//.kdelive/socket-deadbabecafe/kdeinit4__0


I can add the backtraces of each crash if those would somehow be helpfull.
Comment 8 Dario Andres 2009-03-06 13:44:03 UTC
*** Bug 186026 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2009-03-06 13:44:12 UTC
*** Bug 185703 has been marked as a duplicate of this bug. ***
Comment 10 Öyvind Saether 2009-03-06 17:26:18 UTC
KolourPaint
Version 4.2.65 (KDE 4.2.65 (KDE 4.3 >= 20090226))
Using KDE 4.2.65 (KDE 4.2.65 (KDE 4.3 >= 20090226))

QT 4.5.0.

"kolourpaint -graphicssystem raster" no longer crashes.

-graphicssystem native and -graphicssystem raster and opengl still crash.
Comment 11 Nadav Kavalerchik 2009-03-06 18:29:11 UTC
is it possible to get kde ver 4.2.65 binaries for debian ?
Comment 12 Dario Andres 2009-03-06 18:34:02 UTC
I can confirm that it crashed when using the default graphics system here using Qt4.5.0 + KDE4.3trunk(today-build). However it doesn't crash with "raster" graphics system.
Comment 13 Nadav Kavalerchik 2009-03-08 13:06:34 UTC
i confirm that :
kolourpaint -graphicssystem raster
no longer crashes
with qt 4.5 and kde 4.2.1 (debian experimental)

it also works (very slow) with opengl option.
but not with the default (what every it is)

here is a new crash log from the updated system packages
(when starting in default mode)

Application: KolourPaint (kolourpaint), signal SIGSEGV
0x00007f8f6b8cc8a0 in __nanosleep_nocancel () from /lib/libc.so.6
Current language:  auto; currently c
[Current thread is 1 (Thread 0x7f8f6efdc700 (LWP 5722))]

Thread 1 (Thread 0x7f8f6efdc700 (LWP 5722)):
[KCrash Handler]
#5  0x0000000000000000 in ?? ()
#6  0x00007f8f6c4cc1a0 in QX11PaintEngine::drawPixmap (this=<value optimized out>, r=<value optimized out>, px=<value optimized out>, _sr=<value optimized out>) at painting/qpaintengine_x11.cpp:1886
#7  0x00007f8f6c40b3a8 in QPainter::drawPixmap (this=0x7fff77113bf0, r=@0x7fff77113b30, pm=@0x7fff77113bd0, sr=@0x7fff77113b50) at painting/qpainter.cpp:5354
#8  0x000000000047c687 in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0x7fff77113c70) at /usr/include/qt4/QtGui/qpainter.h:745
#9  0x000000000047ae33 in kpPixmapFX::convertToPixmap (image=@0x7fff77113d30, pretty=80, wali=@0x7fff77113ce0) at ../../kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#10 0x0000000000447618 in kpEffectInvert::applyEffect (destPixmapPtr=0x7fff77113e00, channels=<value optimized out>) at ../../kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#11 0x00000000004ad56f in kpToolWidgetBase::paintEvent (this=0x1b2cf40, e=<value optimized out>) at ../../kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#12 0x00007f8f6c337526 in QWidget::event (this=0x1b2cf40, event=0x7fff77114590) at kernel/qwidget.cpp:7654
#13 0x00000000004ace07 in kpToolWidgetBase::event (this=0x1b2cf40, e=0x7fff77114590) at ../../kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#14 0x00007f8f6c2e65bd in QApplicationPrivate::notify_helper (this=0x178a7a0, receiver=0x1b2cf40, e=0x7fff77114590) at kernel/qapplication.cpp:4084
#15 0x00007f8f6c2ee7aa in QApplication::notify (this=0x7fff771174d0, receiver=0x1b2cf40, e=0x7fff77114590) at kernel/qapplication.cpp:4049
#16 0x00007f8f6da9d11b in KApplication::notify (this=0x7fff771174d0, receiver=0x1b2cf40, event=0x7fff77114590) at ../../kdeui/kernel/kapplication.cpp:307
#17 0x00007f8f6cea0c4c in QCoreApplication::notifyInternal (this=0x7fff771174d0, receiver=0x1b2cf40, event=0x7fff77114590) at kernel/qcoreapplication.cpp:602
#18 0x00007f8f6c33e7e5 in QWidgetPrivate::drawWidget (this=0x1b33a30, pdev=0x18217d8, rgn=@0x7fff771147c0, offset=@0x7fff771147b0, flags=4, sharedPainter=0x0, backingStore=0x182f310)
    at kernel/qwidget.cpp:5046
#19 0x00007f8f6c33ef57 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=0, rgn=@0x7fff771148b0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5156
#20 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=7, rgn=@0x7fff771149a0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#21 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=8, rgn=@0x7fff77114a90, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#22 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=9, rgn=@0x7fff77114b80, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#23 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=10, rgn=@0x7fff77114c70, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#24 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=11, rgn=@0x7fff77114d60, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#25 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=12, rgn=@0x7fff77114e50, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#26 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=13, rgn=@0x7fff77114f40, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#27 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=14, rgn=@0x7fff77115030, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#28 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=15, rgn=@0x7fff77115120, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#29 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=16, rgn=@0x7fff77115210, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#30 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=17, rgn=@0x7fff77115300, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#31 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=18, rgn=@0x7fff771153f0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#32 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=19, rgn=@0x7fff771154e0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#33 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=20, rgn=@0x7fff771155d0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#34 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=21, rgn=@0x7fff771156c0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#35 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=22, rgn=@0x7fff771157b0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#36 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=23, rgn=@0x7fff771158a0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#37 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=24, rgn=@0x7fff77115990, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#38 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ca50, pdev=0x18217d8, siblings=@0x1b2ca68, index=25, rgn=@0x7fff77115ca0, offset=@0x7fff77115c90, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5147
#39 0x00007f8f6c33e457 in QWidgetPrivate::drawWidget (this=0x1b2ca50, pdev=0x18217d8, rgn=@0x7fff77115ca0, offset=@0x7fff77115c90, flags=4, sharedPainter=0x0, backingStore=0x182f310)
    at kernel/qwidget.cpp:5095
#40 0x00007f8f6c33ef57 in QWidgetPrivate::paintSiblingsRecursive (this=0x1b2ddb0, pdev=0x18217d8, siblings=@0x1b2ddc8, index=6, rgn=@0x7fff77115fb0, offset=@0x7fff77115fa0, flags=4, sharedPainter=
    0x0, backingStore=0x182f310) at kernel/qwidget.cpp:5156
#41 0x00007f8f6c33e457 in QWidgetPrivate::drawWidget (this=0x1b2ddb0, pdev=0x18217d8, rgn=@0x7fff77115fb0, offset=@0x7fff77115fa0, flags=4, sharedPainter=0x0, backingStore=0x182f310)
    at kernel/qwidget.cpp:5095
#42 0x00007f8f6c33ef57 in QWidgetPrivate::paintSiblingsRecursive (this=0x1820c00, pdev=0x18217d8, siblings=@0x1820c18, index=42, rgn=@0x7fff771160a0, offset=@0x182f354, flags=4, sharedPainter=0x0, 
    backingStore=0x182f310) at kernel/qwidget.cpp:5156
#43 0x00007f8f6c33ee66 in QWidgetPrivate::paintSiblingsRecursive (this=0x1820c00, pdev=0x18217d8, siblings=@0x1820c18, index=43, rgn=@0x7fff77116630, offset=@0x182f354, flags=4, sharedPainter=0x0, 
    backingStore=0x182f310) at kernel/qwidget.cpp:5147
#44 0x00007f8f6c33e457 in QWidgetPrivate::drawWidget (this=0x1820c00, pdev=0x18217d8, rgn=@0x7fff77116630, offset=@0x182f354, flags=4, sharedPainter=0x0, backingStore=0x182f310)
    at kernel/qwidget.cpp:5095
#45 0x00007f8f6c4e140a in QWidgetBackingStore::sync (this=0x182f310) at painting/qbackingstore.cpp:1266
#46 0x00007f8f6c4e1712 in QWidgetBackingStore::sync (this=0x182f310, exposedWidget=0x1837880, exposedRegion=@0x7fff771168a0) at painting/qbackingstore.cpp:1073
#47 0x00007f8f6c3464fa in QETWidget::translatePaintEvent (this=0x1837880, event=<value optimized out>) at kernel/qapplication_x11.cpp:5125
#48 0x00007f8f6c3569a3 in QApplication::x11ProcessEvent (this=0x7fff771174d0, event=0x7fff77117110) at kernel/qapplication_x11.cpp:3443
#49 0x00007f8f6c37eee4 in x11EventSourceDispatch (s=0x178e020, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#50 0x00007f8f6849faab in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#51 0x00007f8f684a326d in ?? () from /usr/lib/libglib-2.0.so.0
#52 0x00007f8f684a342b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#53 0x00007f8f6ceca29f in QEventDispatcherGlib::processEvents (this=0x1787390, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:323
#54 0x00007f8f6c37e68f in QGuiEventDispatcherGlib::processEvents (this=0x1b91e30, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#55 0x00007f8f6ce9f4f2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 1997632512}) at kernel/qeventloop.cpp:149
#56 0x00007f8f6ce9f8bd in QEventLoop::exec (this=0x7fff77117440, flags={i = 1997632592}) at kernel/qeventloop.cpp:200
#57 0x00007f8f6cea1b84 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#58 0x000000000045248d in main (argc=1, argv=0x7fff771179c8) at ../../kolourpaint/kolourpaint.cpp:125
Comment 14 Dario Andres 2009-03-08 15:21:19 UTC
*** Bug 186538 has been marked as a duplicate of this bug. ***
Comment 15 Ruchir Brahmbhatt 2009-03-12 08:05:05 UTC
It still crashes in kde 4.2.1. I maximized kolourpaint and got following backtrace after crash.

Application: KolourPaint (kolourpaint), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]
[Current thread is 1 (Thread 0xb5bcd700 (LWP 13313))]

Thread 1 (Thread 0xb5bcd700 (LWP 13313)):
[KCrash Handler]
#6  0xffff0100 in ?? ()
#7  0xb6912796 in QX11PaintEngine::drawPixmap (this=0x8386910, r=@0xbfb2a050, px=@0xbfb2a1c8, _sr=@0xbfb2a030) at painting/qpaintengine_x11.cpp:1886
#8  0xb6846966 in QPainter::drawPixmap (this=0xbfb2a1d4, r=@0xbfb2a160, pm=@0xbfb2a1c8, sr=@0xbfb2a180) at painting/qpainter.cpp:5354
#9  0x080c006b in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbfb2a218) at /usr/include/QtGui/qpainter.h:745
#10 0x080be8b1 in kpPixmapFX::convertToPixmap (image=@0xbfb2a280, pretty=false, wali=@0xbfb2a25c) at /usr/src/debug/kdegraphics-4.2.1/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#11 0x0808a44b in kpEffectInvert::applyEffect (destPixmapPtr=0xbfb2a354, channels=7) at /usr/src/debug/kdegraphics-4.2.1/kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#12 0x080f2f69 in kpToolWidgetBase::paintEvent (this=0x836f9a8, e=0xbfb2a864) at /usr/src/debug/kdegraphics-4.2.1/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#13 0xb67658ce in QWidget::event (this=0x836f9a8, event=0xbfb2a864) at kernel/qwidget.cpp:7654
#14 0x080f2866 in kpToolWidgetBase::event (this=0x836f9a8, e=0xbfb2a864) at /usr/src/debug/kdegraphics-4.2.1/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#15 0xb670eeec in QApplicationPrivate::notify_helper (this=0x813aea8, receiver=0x836f9a8, e=0xbfb2a864) at kernel/qapplication.cpp:4084
#16 0xb6717292 in QApplication::notify (this=0xbfb2c6b4, receiver=0x836f9a8, e=0xbfb2a864) at kernel/qapplication.cpp:4049
#17 0xb781aa3d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#18 0xb725e9db in QCoreApplication::notifyInternal (this=0xbfb2c6b4, receiver=0x836f9a8, event=0xbfb2a864) at kernel/qcoreapplication.cpp:602
#19 0xb6719ffe in QCoreApplication::sendSpontaneousEvent (receiver=0x836f9a8, event=0x83bef48) at ../../src/corelib/kernel/qcoreapplication.h:216
#20 0xb676d699 in QWidgetPrivate::drawWidget (this=0x8370728, pdev=0x81dade4, rgn=@0xbfb2a9c4, offset=@0xbfb2a9bc, flags=4, sharedPainter=0x0, backingStore=0x8205a10) at kernel/qwidget.cpp:5046
#21 0xb676de3e in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=5, rgn=@0xbfb2aa54, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5156
#22 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=7, rgn=@0xbfb2aae4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#23 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=8, rgn=@0xbfb2ab74, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#24 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=9, rgn=@0xbfb2ac04, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#25 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=10, rgn=@0xbfb2ac94, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#26 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=11, rgn=@0xbfb2ad24, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#27 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=12, rgn=@0xbfb2adb4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#28 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=13, rgn=@0xbfb2ae44, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#29 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=14, rgn=@0xbfb2aed4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#30 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=15, rgn=@0xbfb2af64, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#31 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=16, rgn=@0xbfb2aff4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#32 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=17, rgn=@0xbfb2b084, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#33 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=18, rgn=@0xbfb2b114, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#34 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=19, rgn=@0xbfb2b1a4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#35 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=20, rgn=@0xbfb2b234, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#36 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=21, rgn=@0xbfb2b2c4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#37 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=22, rgn=@0xbfb2b354, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#38 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=23, rgn=@0xbfb2b3e4, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#39 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=24, rgn=@0xbfb2b474, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#40 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8359dc0, pdev=0x81dade4, siblings=@0x8359dcc, index=25, rgn=@0xbfb2b654, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#41 0xb676d28a in QWidgetPrivate::drawWidget (this=0x8359dc0, pdev=0x81dade4, rgn=@0xbfb2b654, offset=@0xbfb2b64c, flags=4, sharedPainter=0x0, backingStore=0x8205a10) at kernel/qwidget.cpp:5095
#42 0xb676de3e in QWidgetPrivate::paintSiblingsRecursive (this=0x83590c8, pdev=0x81dade4, siblings=@0x83590d4, index=6, rgn=@0xbfb2b834, offset=@0xbfb2b82c, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5156
#43 0xb676d28a in QWidgetPrivate::drawWidget (this=0x83590c8, pdev=0x81dade4, rgn=@0xbfb2b834, offset=@0xbfb2b82c, flags=4, sharedPainter=0x0, backingStore=0x8205a10) at kernel/qwidget.cpp:5095
#44 0xb676de3e in QWidgetPrivate::paintSiblingsRecursive (this=0x8204680, pdev=0x81dade4, siblings=@0x820468c, index=42, rgn=@0xbfb2b8c4, offset=@0x8205a34, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5156
#45 0xb676dd54 in QWidgetPrivate::paintSiblingsRecursive (this=0x8204680, pdev=0x81dade4, siblings=@0x820468c, index=43, rgn=@0xbfb2bb78, offset=@0x8205a34, flags=4, sharedPainter=0x0, 
    backingStore=0x8205a10) at kernel/qwidget.cpp:5147
#46 0xb676d28a in QWidgetPrivate::drawWidget (this=0x8204680, pdev=0x81dade4, rgn=@0xbfb2bb78, offset=@0x8205a34, flags=4, sharedPainter=0x0, backingStore=0x8205a10) at kernel/qwidget.cpp:5095
#47 0xb692923a in QWidgetBackingStore::sync (this=0x8205a10) at painting/qbackingstore.cpp:1266
#48 0xb675db76 in QWidgetPrivate::syncBackingStore (this=0x8204680) at kernel/qwidget.cpp:1603
#49 0xb67770de in QETWidget::translateConfigEvent (this=0x8203870, event=0xbfb2c3dc) at kernel/qapplication_x11.cpp:5289
#50 0xb6785198 in QApplication::x11ProcessEvent (this=0xbfb2c6b4, event=0xbfb2c3dc) at kernel/qapplication_x11.cpp:3446
#51 0xb67af3ca in x11EventSourceDispatch (s=0x813dc98, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#52 0xb5e569a8 in IA__g_main_context_dispatch (context=0x813c8a0) at gmain.c:2144
#53 0xb5e5a063 in g_main_context_iterate (context=0x813c8a0, block=1, dispatch=1, self=0x8138e80) at gmain.c:2778
#54 0xb5e5a221 in IA__g_main_context_iteration (context=0x813c8a0, may_block=1) at gmain.c:2841
#55 0xb728a428 in QEventDispatcherGlib::processEvents (this=0x813ae88, flags={i = -1078803048}) at kernel/qeventdispatcher_glib.cpp:323
#56 0xb67aeac5 in QGuiEventDispatcherGlib::processEvents (this=0x813ae88, flags={i = -1078803000}) at kernel/qguieventdispatcher_glib.cpp:202
#57 0xb725cffa in QEventLoop::processEvents (this=0xbfb2c640, flags={i = -1078802936}) at kernel/qeventloop.cpp:149
#58 0xb725d43a in QEventLoop::exec (this=0xbfb2c640, flags={i = -1078802872}) at kernel/qeventloop.cpp:200
#59 0xb725f8e9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#60 0xb670ed67 in QApplication::exec () at kernel/qapplication.cpp:3553
#61 0x0809518f in main (argc=1, argv=0xbfb2c864) at /usr/src/debug/kdegraphics-4.2.1/kolourpaint/kolourpaint.cpp:125
Comment 16 Dario Andres 2009-03-15 00:36:24 UTC
*** Bug 187184 has been marked as a duplicate of this bug. ***
Comment 17 Ronan Arraes Jardim Chagas 2009-03-17 15:58:38 UTC
I can also confirm this bug and with -graphicssystem raster option I wasn't able to see any more crashed.

My system:
KDE 4.2.1
QT 4.5.0
Comment 18 Jimage 2009-03-18 02:46:54 UTC
Encountered the same bug here. -graphicssystem raster fixed it for me also.

The crash only occurs if:
1) the window's height is >= 320 (horizontal size appears irrelevant), and
2) a drawing tool is selected (i.e. not select or colour picker).

KDE/KolourPaint 4.2.1
Qt 4.5.0-3
Comment 19 Dario Andres 2009-03-22 00:58:31 UTC
*** Bug 187759 has been marked as a duplicate of this bug. ***
Comment 20 Öyvind Saether 2009-03-22 16:06:37 UTC
1) It about time to change this bug from "UNCONFIRMED" to "NEW" or perhaps "ASSIGNED"?
2) The next 4.2.x and KDE SVN could use kolourpaint -graphicssystem raster as default. That would not fix the bug, but it would be an acceptable workaround until the bug is fixed.

I now use this in my .bashrc: alias kolourpaint='kolourpaint -graphicssystem raster'

Without this alias, using Version 4.2.66 (KDE 4.2.66 (KDE 4.3 >= 20090310)) compiled 2009-03-18:

Application: KolourPaint (kolourpaint), signal SIGSEGV

Thread 1 (Thread 0xb60016d0 (LWP 11864)):
[KCrash Handler]
#6  0x00000100 in ?? ()
#7  0xb6cc098a in QX11PaintEngine::drawPixmap (this=0x81bf988, r=@0xbfcb4710, px=@0xbfcb4808, _sr=@0xbfcb46f0) at painting/qpaintengine_x11.cpp:1886
#8  0xb6bfe14b in QPainter::drawPixmap (this=0xbfcb4814, p=@0xbfcb47d0, pm=@0xbfcb4808) at painting/qpainter.cpp:5235
#9  0x080c0e45 in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbfcb4858) at /usr/include/qt4/QtGui/qpainter.h:804
#10 0x080bf6d1 in kpPixmapFX::convertToPixmap (image=@0xbfcb48c0, pretty=false, wali=@0xbfcb489c)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#11 0x0808a8cb in kpEffectInvert::applyEffect (destPixmapPtr=0xbfcb4968, channels=7) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#12 0x080f37ab in kpToolWidgetBase::paintEvent (this=0x84e0330, e=0xbfcb4e54)
    at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#13 0xb6b37e8e in QWidget::event (this=0x84e0330, event=0xbfcb4e54) at kernel/qwidget.cpp:7654
#14 0x080f2df3 in kpToolWidgetBase::event (this=0x84e0330, e=0xbfcb4e54) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#15 0xb6ae6494 in QApplicationPrivate::notify_helper (this=0x812ebb8, receiver=0x84e0330, e=0xbfcb4e54) at kernel/qapplication.cpp:4084
#16 0xb6aedfb2 in QApplication::notify (this=0xbfcb6c04, receiver=0x84e0330, e=0xbfcb4e54) at kernel/qapplication.cpp:4049
#17 0xb795e05d in KApplication::notify (this=0xbfcb6c04, receiver=0x84e0330, event=0xbfcb4e54) at /tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/kdeui/kernel/kapplication.cpp:307
#18 0xb742770a in QCoreApplication::notifyInternal (this=0xbfcb6c04, receiver=0x84e0330, event=0xbfcb4e54) at kernel/qcoreapplication.cpp:598
#19 0xb6af025e in QCoreApplication::sendSpontaneousEvent (receiver=0x84e0330, event=0x85277b8) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#20 0xb6b3b3d0 in QWidgetPrivate::drawWidget (this=0x84e1fa8, pdev=0x81a8d3c, rgn=@0xbfcb4fb4, offset=@0xbfcb4fac, flags=4, sharedPainter=0x0, backingStore=0x81a8d08) at kernel/qwidget.cpp:5046
#21 0xb6b3bb07 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=2, rgn=@0xbfcb5044, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5156
#22 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=3, rgn=@0xbfcb50d4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#23 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=7, rgn=@0xbfcb5164, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#24 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=8, rgn=@0xbfcb51f4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#25 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=9, rgn=@0xbfcb5284, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#26 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=10, rgn=@0xbfcb5314, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#27 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=11, rgn=@0xbfcb53a4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#28 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=12, rgn=@0xbfcb5434, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#29 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=13, rgn=@0xbfcb54c4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#30 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=14, rgn=@0xbfcb5554, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#31 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=15, rgn=@0xbfcb55e4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#32 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=16, rgn=@0xbfcb5674, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#33 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=17, rgn=@0xbfcb5704, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#34 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=18, rgn=@0xbfcb5794, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#35 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=19, rgn=@0xbfcb5824, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#36 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=20, rgn=@0xbfcb58b4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#37 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=21, rgn=@0xbfcb5944, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#38 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=22, rgn=@0xbfcb59d4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#39 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=23, rgn=@0xbfcb5a64, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#40 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=24, rgn=@0xbfcb5af4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#41 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce008, pdev=0x81a8d3c, siblings=@0x84ce014, index=25, rgn=@0xbfcb5cf4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#42 0xb6b3afe8 in QWidgetPrivate::drawWidget (this=0x84ce008, pdev=0x81a8d3c, rgn=@0xbfcb5cf4, offset=@0xbfcb5cec, flags=4, sharedPainter=0x0, backingStore=0x81a8d08) at kernel/qwidget.cpp:5095
#43 0xb6b3bb07 in QWidgetPrivate::paintSiblingsRecursive (this=0x84ce1d0, pdev=0x81a8d3c, siblings=@0x84ce1dc, index=6, rgn=@0xbfcb5ef4, offset=@0xbfcb5eec, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5156
#44 0xb6b3afe8 in QWidgetPrivate::drawWidget (this=0x84ce1d0, pdev=0x81a8d3c, rgn=@0xbfcb5ef4, offset=@0xbfcb5eec, flags=4, sharedPainter=0x0, backingStore=0x81a8d08) at kernel/qwidget.cpp:5095
#45 0xb6b3bb07 in QWidgetPrivate::paintSiblingsRecursive (this=0x81a76b8, pdev=0x81a8d3c, siblings=@0x81a76c4, index=42, rgn=@0xbfcb5f84, offset=@0x81a8d2c, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5156
#46 0xb6b3ba34 in QWidgetPrivate::paintSiblingsRecursive (this=0x81a76b8, pdev=0x81a8d3c, siblings=@0x81a76c4, index=43, rgn=@0xbfcb62e0, offset=@0x81a8d2c, flags=4, sharedPainter=0x0, 
    backingStore=0x81a8d08) at kernel/qwidget.cpp:5147
#47 0xb6b3afe8 in QWidgetPrivate::drawWidget (this=0x81a76b8, pdev=0x81a8d3c, rgn=@0xbfcb62e0, offset=@0x81a8d2c, flags=4, sharedPainter=0x0, backingStore=0x81a8d08) at kernel/qwidget.cpp:5095
#48 0xb6cd2b52 in QWidgetBackingStore::sync (this=0x81a8d08) at painting/qbackingstore.cpp:1266
#49 0xb6cd2dfd in QWidgetBackingStore::sync (this=0x81a8d08, exposedWidget=0x8164078, exposedRegion=@0xbfcb6494) at painting/qbackingstore.cpp:1073
#50 0xb6b2c972 in QWidgetPrivate::syncBackingStore (this=0x81a76b8, region=@0xbfcb6494) at kernel/qwidget.cpp:1612
#51 0xb6b4302b in QETWidget::translatePaintEvent (this=0x8164078, event=0xbfcb693c) at kernel/qapplication_x11.cpp:5125
#52 0xb6b4d90d in QApplication::x11ProcessEvent (this=0xbfcb6c04, event=0xbfcb693c) at kernel/qapplication_x11.cpp:3443
#53 0xb6b75982 in x11EventSourceDispatch (s=0x8131d68, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#54 0xb622a7d0 in IA__g_main_context_dispatch (context=0x8130ea0) at gmain.c:1814
#55 0xb622dd6b in g_main_context_iterate (context=0x8130ea0, block=1, dispatch=1, self=0x812eda0) at gmain.c:2448
#56 0xb622dee8 in IA__g_main_context_iteration (context=0x8130ea0, may_block=1) at gmain.c:2511
#57 0xb744ef58 in QEventDispatcherGlib::processEvents (this=0x812eb78, flags={i = -1077187848}) at kernel/qeventdispatcher_glib.cpp:323
#58 0xb6b75175 in QGuiEventDispatcherGlib::processEvents (this=0x812eb78, flags={i = -1077187800}) at kernel/qguieventdispatcher_glib.cpp:202
#59 0xb7425eda in QEventLoop::processEvents (this=0xbfcb6b90, flags={i = -1077187736}) at kernel/qeventloop.cpp:149
#60 0xb7426092 in QEventLoop::exec (this=0xbfcb6b90, flags={i = -1077187688}) at kernel/qeventloop.cpp:196
#61 0xb7428281 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#62 0xb6ae6307 in QApplication::exec () at kernel/qapplication.cpp:3553
#63 0x08095e7d in main (argc=1, argv=0xbfcb6db4) at /tmp/portage/kde-base/kolourpaint-9999/work/kolourpaint-9999/kolourpaint/kolourpaint.cpp:125
Comment 21 Hugo Lobo 2009-03-23 17:33:55 UTC
The "-graphicssystem raster" argument still crashes kolourpaint on launch.

OS: Arch Linux
QT: 4.5
KDE4: 4.2.1 (from KDEMOD)
KolourPaint: 4.2.1


kolourpaint -graphicssystem raster
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Starting KolourPaint on a 24-bit screen...
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
ASSERT: "QPixmap (1, 1).depth () == QPixmap::defaultDepth ()" in file /home/jan/ScratchPad/kdemod-new-makepkg/work/core/kdegraphics/src/kdegraphics-4.2.1/kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp, line 189
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kolourpaint path = <unknown> pid = 8550
sock_file=/home/hugo/.kde4/socket-ArchLinuxPC/kdeinit4__0
Comment 22 Clemens Eisserer 2009-03-25 10:44:32 UTC
I see this problem too, please at least assign this bug.
Would be great if it could be fixed in kde-4.2.2, after slipping into kde-4.2.
Comment 23 Ruchir Brahmbhatt 2009-03-25 10:48:45 UTC
Today it crashed in other way. I started from command "kolourpaint -graphicssystem raster". Pressed ctrl+o to open file and it crashed with following backtrace.

Application: KolourPaint (kolourpaint), signal SIGSEGV
[Current thread is 1 (Thread 0xb5c87700 (LWP 18051))]

Thread 1 (Thread 0xb5c87700 (LWP 18051)):
[KCrash Handler]
#6  0xb67c1af1 in comp_func_Source<QSSEIntrinsics> (dest=0x8618b50, src=0xb3b6a000, length=96, const_alpha=4294967295) at /usr/lib/gcc/i586-suse-linux/4.3/include/mmintrin.h:63
#7  0xb67c1b9e in qt_blend_rgb32_on_rgb32_sse (destPixels=0x8618b50 "", dbpl=384, srcPixels=0xb3b6a000 <Address 0xb3b6a000 out of bounds>, sbpl=384, w=96, h=68, const_alpha=0)
    at painting/qdrawhelper_sse.cpp:139
#8  0xb6961052 in QRasterPaintEnginePrivate::drawImage (this=0x8500e18, pt=@0xbf8e66c8, img=@0xbf8e680c, 
    func=0xb67c1b60 <qt_blend_rgb32_on_rgb32_sse(unsigned char*, int, unsigned char const*, int, int, int, int)>, clip=@0x8500f7c, alpha=0, sr=@0xbf8e66b8) at painting/qpaintengine_raster.cpp:1079
#9  0xb696a906 in QRasterPaintEngine::drawImage (this=0x85fe788, r=@0xbf8e6970, img=@0xbf8e680c, sr=@0xbf8e6950) at painting/qpaintengine_raster.cpp:2573
#10 0xb6971657 in QRasterPaintEngine::drawPixmap (this=0x85fe788, r=@0xbf8e6970, pixmap=@0x84a8490, sr=@0xbf8e6950) at painting/qpaintengine_raster.cpp:2399
#11 0xb690044f in QPainter::drawPixmap (this=0xbf8e6adc, r=@0xbf8e6a38, pm=@0x84a8490, sr=@0xbf8e6a58) at painting/qpainter.cpp:5311
#12 0xb7fe3b5b in KImageFilePreview::KImageFilePreviewPrivate::_k_slotStepAnimation(int) () from /usr/lib/libkio.so.5
#13 0xb7fe3bf7 in KImageFilePreview::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#14 0xb732ec88 in QMetaObject::activate (sender=0x84a6e48, from_signal_index=5, to_signal_index=5, argv=0xbf8e6bec) at kernel/qobject.cpp:3069
#15 0xb7330412 in QMetaObject::activate (sender=0x84a6e48, m=0xb740ef14, local_signal_index=1, argv=0xbf8e6bec) at kernel/qobject.cpp:3143
#16 0xb7368553 in QTimeLine::frameChanged (this=0x84a6e48, _t1=20) at .moc/release-shared/moc_qtimeline.cpp:158
#17 0xb727a887 in QTimeLinePrivate::setCurrentTime (this=0x84a8570, msecs=42) at tools/qtimeline.cpp:171
#18 0xb732912f in QObject::event (this=0x84a6e48, e=0xbf8e7080) at kernel/qobject.cpp:1082
#19 0xb67c8eec in QApplicationPrivate::notify_helper (this=0x813b100, receiver=0x84a6e48, e=0xbf8e7080) at kernel/qapplication.cpp:4084
#20 0xb67d11ae in QApplication::notify (this=0xbf8e8754, receiver=0x84a6e48, e=0xbf8e7080) at kernel/qapplication.cpp:3631
#21 0xb78d4a3d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0xb73189db in QCoreApplication::notifyInternal (this=0xbf8e8754, receiver=0x84a6e48, event=0xbf8e7080) at kernel/qcoreapplication.cpp:602
#23 0xb7348026 in QTimerInfoList::activateTimers (this=0x813e134) at kernel/qcoreapplication.h:213
#24 0xb73444d0 in timerSourceDispatch (source=0x813e100) at kernel/qeventdispatcher_glib.cpp:164
#25 0xb5f10d88 in IA__g_main_context_dispatch (context=0x813d288) at gmain.c:1814
#26 0xb5f142fb in g_main_context_iterate (context=0x813d288, block=1, dispatch=1, self=0x813adf8) at gmain.c:2448
#27 0xb5f14478 in IA__g_main_context_iteration (context=0x813d288, may_block=1) at gmain.c:2511
#28 0xb7344428 in QEventDispatcherGlib::processEvents (this=0x813b0e0, flags={i = -1081183704}) at kernel/qeventdispatcher_glib.cpp:323
#29 0xb6868ac5 in QGuiEventDispatcherGlib::processEvents (this=0x813b0e0, flags={i = -1081183656}) at kernel/qguieventdispatcher_glib.cpp:202
#30 0xb7316ffa in QEventLoop::processEvents (this=0xbf8e72cc, flags={i = -1081183592}) at kernel/qeventloop.cpp:149
#31 0xb731743a in QEventLoop::exec (this=0xbf8e72cc, flags={i = -1081183532}) at kernel/qeventloop.cpp:200
#32 0xb6cc5be3 in QDialog::exec (this=0xbf8e7318) at dialogs/qdialog.cpp:498
#33 0x080aa9f1 in _start ()
Comment 24 Clemens Eisserer 2009-03-25 10:59:35 UTC
Hi Ruchir, 

I experienced the same and filed https://bugs.kde.org/show_bug.cgi?id=188063 about that issue.

- Clemens
Comment 25 Das 2009-03-26 05:57:27 UTC
I am also on Gentoo and kolourpaint 4.2.1 and I observed this issue with qt-4.5.0 that when I select transparent (alpha) bucket fill background and then draw a solid object, it crashes. Other tools seemed fine. At that time, Kubuntu 9.04 alpha had the same issue, but Ubuntu 8.10 with backported kde 4.2.1 was fine. Downgrading to qt-4.4.2 in Gentoo had solved it. Today I tried again on Ubuntu alpha6 and the entire kolourpaint is crashy. Worst is, as mentioned, kolourpaintrc has to be deleted to even launch kolourpaint again.
Comment 26 Thurston Dang 2009-03-26 14:20:21 UTC
In the function void kpPixmapFX::ensureNoAlphaChannel (QPixmap *destPixmapPtr) [kolourpaint/pixmapfx/kpPixmapFX_MaskOps.cpp], changing the line:
    p.drawPixmap (QPoint (0, 0), oldPixmap);
to:
    QRectF* pixmapRect = new QRectF (0, 0, destPixmapPtr->width (), destPixmapPtr->height ());
    p.drawImage (*pixmapRect, oldPixmap.toImage (), *pixmapRect);
appears to fix it.

In case I've broken something else, or it's an idiosyncratic fix for my machine, could someone else please verify whether it works?

Thanks!
Comment 27 Sergio PR 2009-03-27 19:43:51 UTC
Same error here.
When I select Line tool, for example, it simply crashes. It's very annoying, and I'm not able to run Kolourpaint again, it crashes as it loads :-\

I had to go back to Qt 4.4.3 :(

BTW, why people suscribes to this bug but they don't vote it? 16 users, only 2 votes. I suppose they don't have free votes enough :S
Comment 28 Dario Andres 2009-03-28 19:47:49 UTC
*** Bug 188306 has been marked as a duplicate of this bug. ***
Comment 29 Dario Andres 2009-03-28 19:57:15 UTC
@Thurston Dang: the fix seems to solve the crash. However I don't know if it affects other things.
A simpler approach is using: p.drawImage (QPoint (0, 0), oldPixmap.toImage()); (avoiding the QRects)
Comment 30 Thurston Dang 2009-03-29 13:28:01 UTC
@Darío Andrés: Oops, don't know how I overlooked that approach :-).

The bug when using drawPixmap appears to be Qt accessing free'd memory.
(Accordingly, another "fix", which does not require modifying the KolourPaint code, is to remove 'deref();' call from QPixmap::~QPixmap(). Unfortunately there's then a large and growing memory leak which makes this impractical, but it does support this account.)

In particular, in Qt 4.5.0, the following happens:
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
        ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
qpaintengine_x11.cpp:1860 is 'QPixmap pixmap = qt_toX11Pixmap(px);'
qpixmap_x11.cpp:96 is 'if (QPixmap(pixmap).data_ptr()->classId() == QPixmapData::X11Class)', which therefore sets the destruction in motion.

Eventually, the free'd memory is presumably overwritten, and then read again ...
    ==17281== Invalid read of size 4
    ==17281==    at 0x51A4585: QPixmapData::depth() const (qpixmapdata_p.h:113)
    ==17281==    by 0x51A1BEF: QPixmap::depth() const (qpixmap.cpp:570)
    ==17281==    by 0x52EDE9B: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1886)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
... providing the wrong value, whereupon the earth explodes.

'QPixmap pixmap = qt_toX11Pixmap(px);' is, as expected, new to Qt 4.5.0 (http://websvn.kde.org/*checkout*/trunk/qt-copy/src/gui/painting/qpaintengine_x11.cpp?revision=865977&content-type=text%2Fplain) (though omitting this step doesn't solve the problem entirely, presumably because there are other changes to Qt that require the pixmap to have been converted into an X11Pixmap via qt_toX11Pixmap, and/or because incorrect free'ing still occurs).

All of this is a long-winded way of saying: I don't see an inherent flaw with what KolourPaint is doing, so I think the change to drawImage (with corresponding .toImage()) should be safe, rather than simply covering up a bug in KolourPaint. (Besides, the QPainter Class Reference claims that "drawPixmap() and drawImage() produce the same result [excepting different performance characteristics]"; of course, if that were entirely true, then it shouldn't crash only for drawPixmap.)


valgrind output:
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x4376E80: QBasicAtomicInt::ref() (in /home/kdevel/qt-copy/lib/libQt3Support.so.4.5.0)
    ==17281==    by 0x51A3807: QPixmap::QPixmap(QPixmap const&) (qpixmap.cpp:288)
    ==17281==    by 0x51B8579: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:97)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==  Address 0x7EE505C is 4 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x51A42C4: QPixmapData::classId() const (qpixmapdata_p.h:97)
    ==17281==    by 0x51B16EF: QPixmap::x11Info() const (qpixmap_x11.cpp:2044)
    ==17281==    by 0x52EDC5A: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1862)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==  Address 0x7EE5068 is 16 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x516E7B9: QX11Info::screen() const (qx11info_x11.cpp:475)
    ==17281==    by 0x52EDC62: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1862)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==    by 0x4773C69: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:307)
    ==17281==  Address 0x7EE5084 is 44 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x51A42C4: QPixmapData::classId() const (qpixmapdata_p.h:97)
    ==17281==    by 0x51B16EF: QPixmap::x11Info() const (qpixmap_x11.cpp:2044)
    ==17281==    by 0x52EDC74: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1862)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==  Address 0x7EE5068 is 16 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x516E7B9: QX11Info::screen() const (qx11info_x11.cpp:475)
    ==17281==    by 0x52EDC7C: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1862)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==    by 0x4773C69: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:307)
    ==17281==  Address 0x7EE5084 is 44 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x51A42C4: QPixmapData::classId() const (qpixmapdata_p.h:97)
    ==17281==    by 0x51B16EF: QPixmap::x11Info() const (qpixmap_x11.cpp:2044)
    ==17281==    by 0x52EDD17: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1868)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==  Address 0x7EE5068 is 16 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x516E7B9: QX11Info::screen() const (qx11info_x11.cpp:475)
    ==17281==    by 0x52EDD1F: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1868)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==    by 0x4773C69: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:307)
    ==17281==  Address 0x7EE5084 is 44 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x52EDD2E: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1871)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==    by 0x4773C69: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:307)
    ==17281==    by 0x4D6E751: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:598)
    ==17281==  Address 0x7EE508C is 52 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    qpixmapdata_p.h::depth() - Returning metric(QPaintDevice::PdmDepth)
    qpixmapdata_p.h::depth() - 6
    qpixmapdata_p.h::depth() - ==17281==
    ==17281== Invalid read of size 4
    ==17281==    at 0x51A4585: QPixmapData::depth() const (qpixmapdata_p.h:113)
    ==17281==    by 0x51A1BEF: QPixmap::depth() const (qpixmap.cpp:570)
    ==17281==    by 0x52EDE9B: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1886)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    ==17281==    by 0x80F1B04: kpToolWidgetBase::event(QEvent*) (kpToolWidgetBase.cpp:607)
    ==17281==    by 0x50C0EB4: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4084)
    ==17281==    by 0x50C2EAB: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4049)
    ==17281==  Address 0x7EE5058 is 0 bytes inside a block of size 72 free'd
    ==17281==    at 0x4004CF1: operator delete(void*) (vg_replace_malloc.c:244)
    ==17281==    by 0x51B2E05: QX11PixmapData::~QX11PixmapData() (qpixmap_x11.cpp:1183)
    ==17281==    by 0x51A0B2E: QPixmap::deref() (qpixmap.cpp:1322)
    ==17281==    by 0x51A1D68: QPixmap::~QPixmap() (qpixmap.cpp:332)
    ==17281==    by 0x51B8561: qt_toX11Pixmap(QPixmap const&) (qpixmap_x11.cpp:96)
    ==17281==    by 0x52EDC29: QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (qpaintengine_x11.cpp:1860)
    ==17281==    by 0x520B034: QPainter::drawPixmap(QPointF const&, QPixmap const&) (qpainter.cpp:5235)
    ==17281==    by 0x80BEA65: kpPixmapFX::ensureNoAlphaChannel(QPixmap*) (qpainter.h:804)
    ==17281==    by 0x80BDC5A: kpPixmapFX::convertToPixmap(QImage const&, bool, kpPixmapFX::WarnAboutLossInfo const&) (kpPixmapFX_FormatConversion.cpp:255)
    ==17281==    by 0x80873BA: kpEffectInvert::applyEffect(QPixmap*, int) (kpEffectInvert.cpp:47)
    ==17281==    by 0x80F0C74: kpToolWidgetBase::paintEvent(QPaintEvent*) (kpToolWidgetBase.cpp:670)
    ==17281==    by 0x51253F0: QWidget::event(QEvent*) (qwidget.cpp:7654)
    pure virtual method called
    terminate called without an active exception
    KCrash: Application 'kolourpaint' crashing...
    sock_file=/home/kdevel/.kde4/socket-kfree.raisinbun/kdeinit4_localhost_10
    Warning: connect() failed: : No such file or directory
Comment 31 Jimage 2009-03-29 14:41:28 UTC
*** This bug has been confirmed by popular vote. ***
Comment 32 Dario Andres 2009-04-01 21:07:23 UTC
@Thurston: thanks for the great analysis. However I lack the needed knowledge about Qt/X11 to evaluate this.
Comment 33 Ben Boeckel 2009-04-03 11:01:39 UTC
This still occurs in KDE 4.2.2 on Fedora with Qt 4.5.0. Kevin Kofler fixed a bug in QAtomic with inlined ASM (he can explain more, I'll get him to post here), but that also failed to fix this bug. It works with -graphicssystem raster here.
Comment 34 Ruchir Brahmbhatt 2009-04-03 11:11:46 UTC
(In reply to comment #33)
> This still occurs in KDE 4.2.2 on Fedora with Qt 4.5.0. Kevin Kofler fixed a
> bug in QAtomic with inlined ASM (he can explain more, I'll get him to post
> here), but that also failed to fix this bug. It works with -graphicssystem
> raster here.

Same here on opensuse 11.1 with qt 4.5.

Application: KolourPaint (kolourpaint), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]
[Current thread is 1 (Thread 0xb5b40700 (LWP 10989))]

Thread 1 (Thread 0xb5b40700 (LWP 10989)):
[KCrash Handler]
#6  0x00000100 in ?? ()
#7  0xb6885796 in QX11PaintEngine::drawPixmap (this=0x83a10d8, r=@0xbf8a2eb0, px=@0xbf8a3028, _sr=@0xbf8a2e90) at painting/qpaintengine_x11.cpp:1886
#8  0xb67b9966 in QPainter::drawPixmap (this=0xbf8a3034, r=@0xbf8a2fc0, pm=@0xbf8a3028, sr=@0xbf8a2fe0) at painting/qpainter.cpp:5354
#9  0x080c006b in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbf8a3078) at /usr/include/QtGui/qpainter.h:745
#10 0x080be8b1 in kpPixmapFX::convertToPixmap (image=@0xbf8a30e0, pretty=false, wali=@0xbf8a30bc) at /usr/src/debug/kdegraphics-4.2.2/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:255
#11 0x0808a44b in kpEffectInvert::applyEffect (destPixmapPtr=0xbf8a31b4, channels=7) at /usr/src/debug/kdegraphics-4.2.2/kolourpaint/imagelib/effects/kpEffectInvert.cpp:47
#12 0x080f2f69 in kpToolWidgetBase::paintEvent (this=0x83695f0, e=0xbf8a36c4) at /usr/src/debug/kdegraphics-4.2.2/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:670
#13 0xb66d88ce in QWidget::event (this=0x83695f0, event=0xbf8a36c4) at kernel/qwidget.cpp:7654
#14 0x080f2866 in kpToolWidgetBase::event (this=0x83695f0, e=0xbf8a36c4) at /usr/src/debug/kdegraphics-4.2.2/kolourpaint/widgets/toolbars/options/kpToolWidgetBase.cpp:607
#15 0xb6681eec in QApplicationPrivate::notify_helper (this=0x813abb8, receiver=0x83695f0, e=0xbf8a36c4) at kernel/qapplication.cpp:4084
#16 0xb668a292 in QApplication::notify (this=0xbf8a53e4, receiver=0x83695f0, e=0xbf8a36c4) at kernel/qapplication.cpp:4049
#17 0xb778ebcd in KApplication::notify (this=0xbf8a53e4, receiver=0x83695f0, event=0xbf8a36c4) at /usr/src/debug/kdelibs-4.2.2/kdeui/kernel/kapplication.cpp:307
#18 0xb71d19db in QCoreApplication::notifyInternal (this=0xbf8a53e4, receiver=0x83695f0, event=0xbf8a36c4) at kernel/qcoreapplication.cpp:602
#19 0xb668cffe in QCoreApplication::sendSpontaneousEvent (receiver=0x83695f0, event=0x8388bd0) at ../../src/corelib/kernel/qcoreapplication.h:216
#20 0xb66e0699 in QWidgetPrivate::drawWidget (this=0x83795d0, pdev=0x81d766c, rgn=@0xbf8a3824, offset=@0xbf8a381c, flags=4, sharedPainter=0x0, backingStore=0x820bb30) at kernel/qwidget.cpp:5046
#21 0xb66e0e3e in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=5, rgn=@0xbf8a38b4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5156
#22 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=7, rgn=@0xbf8a3944, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#23 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=8, rgn=@0xbf8a39d4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#24 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=9, rgn=@0xbf8a3a64, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#25 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=10, rgn=@0xbf8a3af4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#26 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=11, rgn=@0xbf8a3b84, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#27 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=12, rgn=@0xbf8a3c14, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#28 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=13, rgn=@0xbf8a3ca4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#29 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=14, rgn=@0xbf8a3d34, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#30 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=15, rgn=@0xbf8a3dc4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#31 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=16, rgn=@0xbf8a3e54, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#32 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=17, rgn=@0xbf8a3ee4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#33 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=18, rgn=@0xbf8a3f74, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#34 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=19, rgn=@0xbf8a4004, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#35 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=20, rgn=@0xbf8a4094, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#36 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=21, rgn=@0xbf8a4124, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#37 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=22, rgn=@0xbf8a41b4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#38 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=23, rgn=@0xbf8a4244, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#39 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=24, rgn=@0xbf8a42d4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#40 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x835f828, pdev=0x81d766c, siblings=@0x835f834, index=25, rgn=@0xbf8a44b4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#41 0xb66e028a in QWidgetPrivate::drawWidget (this=0x835f828, pdev=0x81d766c, rgn=@0xbf8a44b4, offset=@0xbf8a44ac, flags=4, sharedPainter=0x0, backingStore=0x820bb30) at kernel/qwidget.cpp:5095
#42 0xb66e0e3e in QWidgetPrivate::paintSiblingsRecursive (this=0x835f540, pdev=0x81d766c, siblings=@0x835f54c, index=6, rgn=@0xbf8a4694, offset=@0xbf8a468c, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5156
#43 0xb66e028a in QWidgetPrivate::drawWidget (this=0x835f540, pdev=0x81d766c, rgn=@0xbf8a4694, offset=@0xbf8a468c, flags=4, sharedPainter=0x0, backingStore=0x820bb30) at kernel/qwidget.cpp:5095
#44 0xb66e0e3e in QWidgetPrivate::paintSiblingsRecursive (this=0x820a038, pdev=0x81d766c, siblings=@0x820a044, index=42, rgn=@0xbf8a4724, offset=@0x820bb54, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5156
#45 0xb66e0d54 in QWidgetPrivate::paintSiblingsRecursive (this=0x820a038, pdev=0x81d766c, siblings=@0x820a044, index=43, rgn=@0xbf8a49d8, offset=@0x820bb54, flags=4, sharedPainter=0x0, 
    backingStore=0x820bb30) at kernel/qwidget.cpp:5147
#46 0xb66e028a in QWidgetPrivate::drawWidget (this=0x820a038, pdev=0x81d766c, rgn=@0xbf8a49d8, offset=@0x820bb54, flags=4, sharedPainter=0x0, backingStore=0x820bb30) at kernel/qwidget.cpp:5095
#47 0xb689c23a in QWidgetBackingStore::sync (this=0x820bb30) at painting/qbackingstore.cpp:1266
#48 0xb689c5ed in QWidgetBackingStore::sync (this=0x820bb30, exposedWidget=0x81e2d10, exposedRegion=@0xbf8a4bd0) at painting/qbackingstore.cpp:1073
#49 0xb66d0ab2 in QWidgetPrivate::syncBackingStore (this=0x820a038, region=@0xbf8a4bd0) at kernel/qwidget.cpp:1612
#50 0xb66e8bee in QETWidget::translatePaintEvent (this=0x81e2d10, event=0xbf8a510c) at kernel/qapplication_x11.cpp:5123
#51 0xb66f83ca in QApplication::x11ProcessEvent (this=0xbf8a53e4, event=0xbf8a510c) at kernel/qapplication_x11.cpp:3441
#52 0xb67223ca in x11EventSourceDispatch (s=0x813cf08, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#53 0xb5dc9d88 in IA__g_main_context_dispatch (context=0x813ce20) at gmain.c:1814
#54 0xb5dcd2fb in g_main_context_iterate (context=0x813ce20, block=1, dispatch=1, self=0x8139018) at gmain.c:2448
#55 0xb5dcd478 in IA__g_main_context_iteration (context=0x813ce20, may_block=1) at gmain.c:2511
#56 0xb71fd428 in QEventDispatcherGlib::processEvents (this=0x813ab98, flags={i = -1081453880}) at kernel/qeventdispatcher_glib.cpp:323
#57 0xb6721ac5 in QGuiEventDispatcherGlib::processEvents (this=0x813ab98, flags={i = -1081453832}) at kernel/qguieventdispatcher_glib.cpp:202
#58 0xb71cfffa in QEventLoop::processEvents (this=0xbf8a5370, flags={i = -1081453768}) at kernel/qeventloop.cpp:149
#59 0xb71d043a in QEventLoop::exec (this=0xbf8a5370, flags={i = -1081453704}) at kernel/qeventloop.cpp:200
#60 0xb71d28e9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#61 0xb6681d67 in QApplication::exec () at kernel/qapplication.cpp:3553
#62 0x0809518f in main (argc=1, argv=0xbf8a5594) at /usr/src/debug/kdegraphics-4.2.2/kolourpaint/kolourpaint.cpp:125
Comment 35 Kevin Kofler 2009-04-03 14:15:51 UTC
The assertion failure with -graphicssystem raster is apparently fixed by Qt 4.5.0 final.

I'm fairly sure the crash with the X11 graphicssystem is a Qt bug. Valgrind logs (Ben, can you please attach them here?) point to a very bizarre use-after-free (there's a line in Qt's internal qt_toX11Pixmap function which constructs a temporary QPixmap as a copy of the pixmap, the destructor destroying the temporary then somehow destroys the implicitly shared data even though it's still referenced) which made me suspect the reference counting assembly. But fixing the constraints so an input/output constraint is used instead of separate input and output constraints (which may in principle map to different locations, though it's unlikely (impossible?) to happen for memory operands):
http://cvs.fedoraproject.org/viewvc/rpms/qt/devel/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch?revision=1.1&view=markup
didn't help, and I can't see any other potential flaws with it.
Comment 36 Ben Boeckel 2009-04-03 17:21:25 UTC
Created attachment 32571 [details]
Valgrind output for kolourpaint

This is from when kolourpaint starts (it also crashes if there's a config file after a crash here), but it's the same bt as when using a tool.
Comment 37 Kevin Kofler 2009-04-04 00:50:08 UTC
The workaround from comment #29 is reported to work. Here is it formatted as a proper patch:
http://cvs.fedoraproject.org/viewvc/rpms/kdegraphics/devel/kdegraphics-4.2.2-kolourpaint-kde%23183850-workaround.patch?revision=1.1&view=markup

Should this be committed until we have a better solution (probably within Qt)?

And are the Qt developers aware of this bug yet?
Comment 38 Sjors Gielen 2009-04-04 19:53:33 UTC
I just had a chat with Qt developers, they are aware of the bug. I just came here to apply the same patch :P
The fix for Qt will be released in 4.5.1, they said. :-)
Comment 39 Sjors Gielen 2009-04-04 20:20:15 UTC
Of course, that had to be "to attach the same patch".
The patch is, however, just a hotfix. The real bug is in Qt, in the setMask() function; it decreases the refcount for the QPixmap, which it shouldn't. Therefore, in the drawPixmap(), the refcount is 0; so the pixmap is cleaned up; right after that it is re-used but already cleaned up, making for a crash.

The fix I was referring to is, as I said, in Qt 4.5.1.
Comment 40 Pino Toscano 2009-04-09 23:17:38 UTC
*** Bug 189244 has been marked as a duplicate of this bug. ***
Comment 41 Kevin Kofler 2009-04-09 23:20:31 UTC
Should we commit the workaround? Or can this be fixed in qt-copy? Right now kolourpaint needs distro patches to work at all with the latest stable Qt (which for trunk is also the minimum required Qt). That's certainly not an ideal solution.
Comment 42 Thurston Dang 2009-04-13 08:29:35 UTC
*** Bug 189506 has been marked as a duplicate of this bug. ***
Comment 43 Pino Toscano 2009-04-17 13:04:17 UTC
*** Bug 189860 has been marked as a duplicate of this bug. ***
Comment 44 Pino Toscano 2009-04-20 18:32:06 UTC
*** Bug 190190 has been marked as a duplicate of this bug. ***
Comment 45 Thurston Dang 2009-04-24 13:09:36 UTC
*** Bug 190505 has been marked as a duplicate of this bug. ***
Comment 46 Dario Andres 2009-04-29 14:42:14 UTC
Just to update the bug status:

Here using:

Qt: 4.5.1 (qt-copy  958974)
KDE: 4.2.71 (KDE 4.2.71 (KDE 4.3 >= 20090428))
kdelibs svn rev. 960693 / kdebase svn rev. 960693
kdegraphics svn rev. 960710
on ArchLinux i686 - Kernel 2.6.29.1

I can't reproduce the crash anymore even when using the native graphics system. So I guess this was fixed somewhere in Qt (as the patch doesn't seem to be applied on svn...)

Can anyone else confirm this ? or this is just random ?

Thanks
Comment 47 Ruchir Brahmbhatt 2009-04-29 15:54:29 UTC
Qt: 4.5.1
KDE: 4.2.70 (KDE 4.2.70 (KDE 4.3 >= 20090415))
kdelibs: r960298
kdebase: r960293

Can't reproduce here.
Comment 48 Clemens Eisserer 2009-07-25 23:58:09 UTC
QT-4.5.2, kde-4.2.95 - seems to be fixed :)