Bug 274874 - Assert when converting image from CMYK to LAB
Summary: Assert when converting image from CMYK to LAB
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Color models (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 269448 275739 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-04 01:04 UTC by pentalis
Modified: 2011-07-15 14:19 UTC (History)
1 user (show)

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 pentalis 2011-06-04 01:04:15 UTC
ASSERT failure in KoColorSpace::bitBlt: "Composite op is for color space CMYK (Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates) while this is LABA (Lab built-in - (lcms internal))", file /home/pentalis/kde4/source/calligra/libs/pigment/KoColorSpace.cpp, line 302
KCrash: Application 'krita' crashing...

Reproducible: Always.

How to reproduce the crash:
--Create a new CMYK 16 bit image.
--Got to menu, select Image -> Convert Image Type... -> Model = L* a* b*
--Click on the canvas to paint. Crash.
Comment 1 pentalis 2011-06-04 01:38:48 UTC
Backtrace complete log, starting in the ASSERT, to getting the backtrace using gdb:


ASSERT failure in KoColorSpace::bitBlt: "Composite op is for color space CMYKA16 (Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates) while this is LABA (Lab built-in - (lcms internal))", file /home/pentalis/GIT_TEMPLE/kde4/source/calligra/libs/pigment/KoColorSpace.cpp, line 302

Program received signal SIGABRT, Aborted.
0x00007fffefb8f165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
Current language:  auto
The current source language is "auto; currently c".
(gdb) bt
#0  0x00007fffefb8f165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffefb91f70 in *__GI_abort () at abort.c:92
#2  0x00007ffff77cbc7f in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#3  0x00007ffff77cbe22 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007ffff77cbfd5 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#5  0x00007ffff3fa3129 in KoColorSpace::bitBlt (this=0x6562020, dst=<value optimized out>, 
    dstRowStride=<value optimized out>, srcSpace=0x77132b0, src=<value optimized out>, 
    srcRowStride=<value optimized out>, srcAlphaMask=0x0, maskRowStride=0, opacity=255 '\377', rows=6, cols=6, 
    op=0x60b2e60, channelFlags=...)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/libs/pigment/KoColorSpace.cpp:302
#6  0x00007ffff6e9486e in KisPainter::bitBlt (this=0x7fffffffcb00, dstX=<value optimized out>, 
    dstY=<value optimized out>, srcDev=<value optimized out>, srcX=<value optimized out>, 
    srcY=<value optimized out>, srcWidth=6, srcHeight=6)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_painter.cc:577
#7  0x00007ffff6e96ac8 in KisPainter::bitBlt (this=0x7fffffffcb00, pos=..., srcDev=<value optimized out>, 
    srcRect=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_painter.cc:596
#8  0x00007ffff6f02960 in KisIndirectPaintingSupport::mergeToLayer (this=0x9cd6e8, 
    layer=<value optimized out>, region=<value optimized out>, transactionText=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_indirect_painting_support.cpp:129
#9  0x00007ffff742b87f in KisToolFreehand::endPaint (this=0x730e500)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/tool/kis_tool_freehand.cc:429
#10 0x00007ffff742c580 in KisToolFreehand::mouseReleaseEvent (this=0x730e500, e=0x7fffffffccd0)

---Type <return> to continue, or q <return> to quit---
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/tool/kis_tool_freehand.cc:280
#11 0x00007ffff43295a7 in KoToolProxy::mouseReleaseEvent (this=0x6c7ed60, event=0x7fffffffd7f0, point=...)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/libs/flake/KoToolProxy.cpp:304
#12 0x00007ffff73061eb in KisCanvasWidgetBase::processMouseReleaseEvent (this=0x6c7f328, e=0x7fffffffd7f0)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/canvas/kis_canvas_widget_base.cpp:247
#13 0x00007ffff122b632 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007ffff11d532c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff11dbfdb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007ffff1eed7a6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#17 0x00007ffff78c309c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#18 0x00007ffff11db1be in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff125b07b in ?? () from /usr/lib/libQtGui.so.4
#20 0x00007ffff12599dc in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007ffff1285e81 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007ffff78c19c2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQtCore.so.4
#23 0x00007ffff78c1d9c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQtCore.so.4
#24 0x00007ffff78c6a2b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#25 0x00007ffff7bddaaa in kdemain (argc=<value optimized out>, argv=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/main.cc:49
#26 0x00007fffefb7bc4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, 
---Type <return> to continue, or q <return> to quit---
    ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fffffffe2e8) at libc-start.c:228
#27 0x00000000004008a9 in _start ()
Comment 2 pentalis 2011-06-04 01:42:17 UTC
New backtrace, The KDE Crash Handler magically started giving a backtrance instead of just "Signal: Aborted".


Application: Krita (krita), signal: Aborted
The current source language is "auto; currently asm".
[Current thread is 1 (Thread 0x7fb24b606780 (LWP 7052))]

Thread 4 (Thread 0x7fb226f5e700 (LWP 7060)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb24af3be6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb24af37c04 in QSemaphore::acquire(int) () from /usr/lib/libQtCore.so.4
#3  0x00007fb24a5d53b6 in KisTileDataPooler::waitForWork (this=0x8361ad0) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007fb24a5d5710 in KisTileDataPooler::run (this=0x8361ad0) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007fb24af3ae15 in ?? () from /usr/lib/libQtCore.so.4
#6  0x00007fb2430ae8ba in start_thread (arg=<value optimized out>) at pthread_create.c:300
#7  0x00007fb24339302d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fb22775f700 (LWP 7061)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb24af3be6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb24af37a24 in QSemaphore::tryAcquire(int, int) () from /usr/lib/libQtCore.so.4
#3  0x00007fb24a5f02d0 in KisTileDataSwapper::run (this=0x8361b08) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#4  0x00007fb24af3ae15 in ?? () from /usr/lib/libQtCore.so.4
#5  0x00007fb2430ae8ba in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x00007fb24339302d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fb217fff700 (LWP 7070)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb24af3be6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007fb24af36d07 in QReadWriteLock::lockForRead() () from /usr/lib/libQtCore.so.4
#3  0x00007fb24a686a0f in KisPaintLayer::copyOriginalToProjection (this=<value optimized out>, original=) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_paint_layer.cc:118
#4  0x00007fb24a664e25 in KisLayer::applyMasks (this=<value optimized out>, source=) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_layer.cc:379
#5  0x00007fb24a66574e in KisLayer::updateProjection (this=0x835d280, rect=<value optimized out>) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_layer.cc:456
#6  0x00007fb24a5d10fe in KisAsyncMerger::startMerge (this=0x7fb218116f78, walker=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/build/calligra/krita/image/../../../../source/calligra/krita/image/kis_async_merger.h:216
#7  0x00007fb24a5d14d1 in KisUpdateJobItem::run (this=0x7fb218116f50) at /home/pentalis/GIT_TEMPLE/kde4/build/calligra/krita/image/../../../../source/calligra/krita/image/kis_updater_context.h:40
#8  0x00007fb24af30d5f in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb24af3ae15 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007fb2430ae8ba in start_thread (arg=<value optimized out>) at pthread_create.c:300
#11 0x00007fb24339302d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb24b606780 (LWP 7052)):
[KCrash Handler]
#5  0x00007fb2432f6165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007fb2432f8f70 in *__GI_abort () at abort.c:92
#7  0x00007fb24af32c7f in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#8  0x00007fb24af32e22 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fb24af32fd5 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#10 0x00007fb24770a129 in KoColorSpace::bitBlt (this=0x7fcdc80, dst=<value optimized out>, dstRowStride=<value optimized out>, srcSpace=0x938a9c0, src=<value optimized out>, 
    srcRowStride=<value optimized out>, srcAlphaMask=0x0, maskRowStride=0, opacity=255 '\377', rows=6, cols=6, op=0x835cad0, channelFlags=...)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/libs/pigment/KoColorSpace.cpp:302
#11 0x00007fb24a5fb86e in KisPainter::bitBlt (this=0x7fff4effe2b0, dstX=<value optimized out>, dstY=<value optimized out>, srcDev=<value optimized out>, srcX=<value optimized out>, 
    srcY=<value optimized out>, srcWidth=6, srcHeight=6) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_painter.cc:577
#12 0x00007fb24a5fdac8 in KisPainter::bitBlt (this=0x7fff4effe2b0, pos=..., srcDev=<value optimized out>, srcRect=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_painter.cc:596
#13 0x00007fb24a669960 in KisIndirectPaintingSupport::mergeToLayer (this=0x835d2b8, layer=<value optimized out>, region=<value optimized out>, transactionText=<value optimized out>)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/image/kis_indirect_painting_support.cpp:129
#14 0x00007fb24ab9287f in KisToolFreehand::endPaint (this=0x8f7f710) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/tool/kis_tool_freehand.cc:429
#15 0x00007fb24ab93580 in KisToolFreehand::mouseReleaseEvent (this=0x8f7f710, e=0x7fff4effe480) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/tool/kis_tool_freehand.cc:280
#16 0x00007fb247a905a7 in KoToolProxy::mouseReleaseEvent (this=0x890dea0, event=0x7fff4effefa0, point=...) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/libs/flake/KoToolProxy.cpp:304
#17 0x00007fb24aa6d1eb in KisCanvasWidgetBase::processMouseReleaseEvent (this=0x890e3b8, e=0x7fff4effefa0)
    at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/ui/canvas/kis_canvas_widget_base.cpp:247
#18 0x00007fb244992632 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007fb24493c32c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007fb244942fdb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007fb2456547a6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0x00007fb24b02a09c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#23 0x00007fb2449421be in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#24 0x00007fb2449c207b in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007fb2449c09dc in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007fb2449ece81 in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007fb24b0289c2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x00007fb24b028d9c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007fb24b02da2b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#30 0x00007fb24b344aaa in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /home/pentalis/GIT_TEMPLE/kde4/source/calligra/krita/main.cc:49
#31 0x00007fb2432e2c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fff4efffa98) at libc-start.c:228
#32 0x00000000004008a9 in _start ()
Comment 3 Sven Langkamp 2011-06-15 19:17:39 UTC
*** Bug 275739 has been marked as a duplicate of this bug. ***
Comment 4 Halla Rempt 2011-06-18 15:18:43 UTC
*** Bug 269448 has been marked as a duplicate of this bug. ***
Comment 5 Sven Langkamp 2011-07-15 14:19:27 UTC
Git commit ed6d84ce8e448c6e9369a4cfbb89edd2be856de5 by Sven Langkamp.
Committed on 15/07/2011 at 16:15.
Pushed by langkamp into branch 'master'.

fix crash on painting after changing colorspace, tool was still storing the old composite op
BUG:274874

M  +2    -2    krita/plugins/tools/defaulttools/kis_tool_fill.cc     
M  +5    -4    krita/plugins/tools/defaulttools/kis_tool_multihand.cpp     
M  +5    -4    krita/ui/tool/kis_tool_freehand.cc     
M  +8    -14   krita/ui/tool/kis_tool_paint.cc     
M  +1    -2    krita/ui/tool/kis_tool_paint.h     

http://commits.kde.org/calligra/ed6d84ce8e448c6e9369a4cfbb89edd2be856de5