Bug 190505 - kolourpaint crashes while opening tiff file
Summary: kolourpaint crashes while opening tiff file
Status: RESOLVED DUPLICATE of bug 183850
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:
Depends on:
Blocks:
 
Reported: 2009-04-24 12:39 UTC by Ruchir Brahmbhatt
Modified: 2009-04-24 13:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Sample tiff file to reproduce the crash (151.38 KB, image/tiff)
2009-04-24 12:42 UTC, Ruchir Brahmbhatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruchir Brahmbhatt 2009-04-24 12:39:43 UTC
Version:           revision 958061 (using Devel)
OS:                Linux
Installed from:    Compiled sources

I opened a tiff file which opened in kolourpaint. I compared backtrace with bug 183850 but it is somewhat different and condition is also different so thought of reporting new bug. I'll attach sample tiff file which can reproduce the bug always.

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

Thread 1 (Thread 0xb5ea9700 (LWP 19475)):
[KCrash Handler]
#6  0xffff0100 in ?? ()
#7  0xb6c77e37 in QX11PaintEngine::drawPixmap (this=0x816f400, r=@0xbfff0780, px=@0xbfff0878, _sr=@0xbfff0760) at /home/kde-devel/src/kde4/qt-copy/src/gui/painting/qpaintengine_x11.cpp:1886
#8  0xb6bb9393 in QPainter::drawPixmap (this=0xbfff0884, p=@0xbfff0840, pm=@0xbfff0878) at /home/kde-devel/src/kde4/qt-copy/src/gui/painting/qpainter.cpp:5235
#9  0x080c0e95 in kpPixmapFX::ensureNoAlphaChannel (destPixmapPtr=0xbfff08f8) at /home/kde-devel/qt4/include/QtGui/qpainter.h:804
#10 0x080bfc6a in kpPixmapFX::convertToPixmapAsLosslessAsPossible (image=@0xbfff09f0, wali=@0xbfff09c0)
    at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp:388
#11 0x08081788 in kpDocument::convertToPixmapAsLosslessAsPossible (image=@0xbfff09f0, wali=@0xbfff09c0, saveOptions=0xbfff0af4, metaInfo=0xbfff0aec)
    at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/document/kpDocument_Open.cpp:134
#12 0x08081f4d in kpDocument::getPixmapFromFile (url=@0xbfff0c00, suppressDoesntExistDialog=true, parent=0x81a3af8, saveOptions=0xbfff0af4, metaInfo=0xbfff0aec)
    at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/document/kpDocument_Open.cpp:309
#13 0x08082120 in kpDocument::open (this=0x819f488, url=@0xbfff0c00, newDocSameNameIfNotExist=<value optimized out>)
    at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/document/kpDocument_Open.cpp:364
#14 0x080ada52 in kpMainWindow::openInternal (this=0x81a3af8, url=@0xbfff0c00, fallbackDocSize=@0xbfff0b64, newDocSameNameIfNotExist=<value optimized out>)
    at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/mainWindow/kpMainWindow_File.cpp:376
#15 0x080adad2 in kpMainWindow::open (this=0x81a3af8, url=@0xbfff0c00, newDocSameNameIfNotExist=true) at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/mainWindow/kpMainWindow_File.cpp:405
#16 0x080a85a5 in kpMainWindow (this=0x81a3af8, url=@0xbfff0c00) at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/mainWindow/kpMainWindow.cpp:83
#17 0x08095ca4 in main (argc=2, argv=0xbfff0da4) at /home/kde-devel/src/kde4/kdegraphics/kolourpaint/kolourpaint.cpp:111
Comment 1 Ruchir Brahmbhatt 2009-04-24 12:42:02 UTC
Created attachment 33054 [details]
Sample tiff file to reproduce the crash
Comment 2 Thurston Dang 2009-04-24 12:56:30 UTC
Thanks for reporting this, and for having checked for related bugs!

Does KolourPaint work normally for other uses? (e.g., new file: draw a few lines, switch tools, draw circles ...)
If not, do the workarounds from bug 183850 (e.g., starting with "-graphicssystem raster", or changing a single line of the KolourPaint code, as per comment #29) help?
Comment 3 Ruchir Brahmbhatt 2009-04-24 13:03:45 UTC
I noticed that it doesn't work for other operations as well and crashes if opened without raster parameter. Although the backtraces are different but it seems this bug can be marked dup of 183850 as it always crashes and works when using raster. 

@Thurston: What do you think?
Comment 4 Thurston Dang 2009-04-24 13:09:36 UTC
I agree that it's a duplicate: both end up crashing after having called kpPixmapFX::ensureNoAlphaChannel -> QPainter::drawPixmap -> QX11PaintEngine::drawPixmap, and both can be worked around the same way.

*** This bug has been marked as a duplicate of bug 183850 ***