Bug 329401 - Krita crashes/hangs when trying to open Animtim's wm03-p4R.kra file
Summary: Krita crashes/hangs when trying to open Animtim's wm03-p4R.kra file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: unspecified Linux
: VHI grave
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 07:16 UTC by Dmitry Kazakov
Modified: 2013-12-31 08:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2013-12-30 07:16:40 UTC
Some memory corruption happens there.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd8849700 (LWP 8809)]
0x00007fffdb5d9be9 in size (this=0x7fffd8847f70) at /usr/include/QtCore/qbitarray.h:67
67          inline int size() const { return (d.size() << 3) - *d.constData(); }
(gdb) bt
#0  0x00007fffdb5d9be9 in size (this=0x7fffd8847f70) at /usr/include/QtCore/qbitarray.h:67
#1  QBitArray::testBit (this=0x7fffd8847f70, i=3) at /usr/include/QtCore/qbitarray.h:119
#2  0x00007fffdb94a05a in KoCompositeOpBase<KoBgrU16Traits, KoCompositeOpGenericSC<KoBgrU16Traits, &(unsigned short cfSoftLight<unsigned short>(unsigned short, unsigned short))> >::composite (this=<optimized out>, params=...) at /home/devel/kde-src/calligra/libs/pigment/compositeops/KoCompositeOpBase.h:62
#3  0x00007ffff3f4e262 in KoColorSpace::bitBlt (this=0x4408d10, srcSpace=0x7fffa3733b40, params=..., op=0x91754c0, renderingIntent=
    KoColorConversionTransformation::IntentPerceptual, conversionFlags=...) at /home/devel/kde-src/calligra/libs/pigment/KoColorSpace.cpp:309
#4  0x00007ffff6b09740 in bitBltImpl<false> (srcHeight=448, srcWidth=448, srcY=64, srcX=64, srcDev=..., dstY=64, dstX=64, this=0x7fffd88484a0)
    at /home/devel/kde-src/calligra/krita/image/kis_painter.cc:602
#5  KisPainter::bitBlt (this=0x7fffd88484a0, dstX=<optimized out>, dstY=<optimized out>, srcDev=<optimized out>, srcX=<optimized out>, srcY=<optimized out>, srcWidth=448, 
    srcHeight=448) at /home/devel/kde-src/calligra/krita/image/kis_painter.cc:624
#6  0x00007ffff6b09ccb in KisPainter::bitBlt (this=0x7fffd88484a0, pos=..., srcDev=<optimized out>, srcRect=<optimized out>)
    at /home/devel/kde-src/calligra/krita/image/kis_painter.cc:630
#7  0x00007ffff6be771c in KisAsyncMerger::compositeWithProjection (this=0x7a425f0, layer=..., rect=<optimized out>)
    at /home/devel/kde-src/calligra/krita/image/kis_async_merger.cpp:368
#8  0x00007ffff6be896c in KisAsyncMerger::startMerge (this=0x7a425f0, walker=..., notifyClones=true) at /home/devel/kde-src/calligra/krita/image/kis_async_merger.cpp:245
#9  0x00007ffff6ac36e6 in runMergeJob (this=0x7a425b0) at /home/devel/kde-build/calligra/krita/image/../../../../kde-src/calligra/krita/image/kis_update_job_item.h:77
#10 KisUpdateJobItem::run (this=0x7a425b0) at /home/devel/kde-build/calligra/krita/image/../../../../kde-src/calligra/krita/image/kis_update_job_item.h:58
#11 0x00007ffff0208e15 in QThreadPoolThread::run (this=0x7fff902f5350) at concurrent/qthreadpool.cpp:106
#12 0x00007ffff0214025 in QThreadPrivate::start (arg=0x7fff902f5350) at thread/qthread_unix.cpp:331
#13 0x00007fffeff83f05 in start_thread () from /lib64/libpthread.so.0
#14 0x00007fffef2f653d in clone () from /lib64/libc.so.6
Comment 1 Dmitry Kazakov 2013-12-30 07:18:58 UTC
The same happens on a clean build of 2.8. Upgrading to Grave.
Comment 2 Dmitry Kazakov 2013-12-30 08:50:52 UTC
Preliminary results of bisecting:

Crashes: b0a4fcd58253a7e0819398b8daf3a06
Doesn't crash: 08a157054a16278b2ed877
Comment 3 Dmitry Kazakov 2013-12-30 10:06:40 UTC
The failing commit: c42aa8266818d05a6af24c719

    The copy-constructor should be implemented for structures having pointers
    
    BUG:321935,320651
Comment 4 Dmitry Kazakov 2013-12-30 11:20:35 UTC
Git commit b937eec6868ef2924e48e39ebcb71a43cf648ef6 by Dmitry Kazakov.
Committed on 30/12/2013 at 11:19.
Pushed by dkazakov into branch 'master'.

Fix memory corruption issue caused by memcpy'ing of a QBitArray

M  +13   -1    libs/pigment/KoCompositeOp.cpp

http://commits.kde.org/calligra/b937eec6868ef2924e48e39ebcb71a43cf648ef6
Comment 5 Dmitry Kazakov 2013-12-31 08:52:37 UTC
Git commit 9aaa37daf671adfe3428dd13ea3f501c5afdac99 by Dmitry Kazakov.
Committed on 30/12/2013 at 11:19.
Pushed by dkazakov into branch 'calligra/2.8'.

Fix memory corruption issue caused by memcpy'ing of a QBitArray

M  +13   -1    libs/pigment/KoCompositeOp.cpp

http://commits.kde.org/calligra/9aaa37daf671adfe3428dd13ea3f501c5afdac99