After applying transform mask on a layer, if you click in one of the history states in undo history docker, Krita crashes. Reproducible: Always Steps to Reproduce: 1.open Krita, Create a new layer and draw something 2.Apply transform mask to this layer and do some transformation like scaling down. 3.Now go to the undo history docker and click on any one or the first history state Actual Results: Krita crashes, It also doesn't trigger the bug report wizard. Expected Results: while clicking in the undo history docker the actions should be undone. here is the backtrace from gdb : raghu@raghu:~$ gdb krita GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from krita...done. (gdb) run Starting program: /home/raghu/kde4/inst/bin/krita [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". ################################### # Adding a tablet device: Wacom Intuos4 6x9 stylus Device Type: "Stylus" # Axes limits data X: 0 44704 Y: 0 27940 Z: 0 0 Pressure: 0 2048 Rotation: -900 899 T. Pres: 0 0 ################################### # Adding a tablet device: Wacom Intuos4 6x9 eraser Device Type: "XFreeEraser" # Axes limits data X: 0 44704 Y: 0 27940 Z: 0 0 Pressure: 0 2048 Rotation: 0 1 T. Pres: 0 0 krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/Rh2238.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/mO7055.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/i15839.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/P16461.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/xT5305.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/oN7055.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/KQ5305.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/r15839.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/L16461.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/rW2238.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/bI2238.pat" failed krita(11594) KoResourceServer<T, Policy>::loadResources: Loading resource "/home/raghu/.kde/share/apps/krita/patterns/22_texture-reptile.png" failed connect failed: No such file or directory void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Close" under id 35 void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Close All" under id 36 [New Thread 0x7fff9c85b700 (LWP 11618)] [Thread 0x7fff9c85b700 (LWP 11618) exited] Failed to open "brushes/bird.gih" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/01_canvas.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/02_rough-canvas.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/02b_WoofTissue.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/03_default-paper.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/04_paper-C-grain.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/05_paper-torchon.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/06_hard-grain.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/07_big-grain.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/08_bump-relief.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/09_drawed_crosshatched.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/09b_drawed-CrossedLines.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/10_drawed_dotted.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/11_drawed_furry.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/12_drawed_vertical.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/13_drawed_swirl.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/14_texture-rock.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/15_texture-rockB.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/16_texture-woody.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/17_texture-melt.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/18_texture-bark.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/18b_WaveFlex.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/19_texture-crackle.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/20_texture-vegetal.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/21_texture-chainmail.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/22_texture-reptile.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/23-dynamic-screentone-A.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/24-dynamic-screentone-B.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/25-dynamic-screentone-C.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/4-paper-soft-grain_testdark-black15.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/4-paper-soft-grain_testdark-black55.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to open "patterns/4-paper-soft-grain_teststrong.pat" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/4-paper-soft-grain_teststrong.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/4-paper-soft-grain_testtweak2.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/background-pc.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" Failed to load "patterns/bg-texture.png" from bundle "/home/raghu/.kde/share/apps/krita/bundles/2015-04-17_deevadkrita_V6.bundle" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.binary.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.addin.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.presentation.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.template.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.template.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.template.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.document.macroEnabled.12" krita(11594) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.slide.macroEnabled.12" WARNING: KisImageConfig: requested config synchronization from nonGUI thread! Skipping... OpenGL version 1.1 or higher is present. OpenGL version 1.2 or higher is present. OpenGL version 1.3 or higher is present. OpenGL version 1.4 or higher is present. OpenGL version 1.5 or higher is present. OpenGL version 2.0 or higher is present. OpenGL version 2.1 or higher is present. OpenGL version 3.0 or higher is present. OpenGL version 3.1 or higher is present. OpenGL version 3.2 or higher is present. OpenGL version 3.3 or higher is present. OpenGL version 4.0 or higher is present. krita(11594)/koffice (lib komain) KoRuler::createGuideToolConnection: No guides tool found, skipping connection krita(11594)/koffice (lib komain) KoRuler::createGuideToolConnection: No guides tool found, skipping connection krita(11594) CanvasData::activateToolActions: "InteractionTool" : action "object_order_raise" conflicts with canvas action "rotate_canvas_right" shortcut: "Ctrl+]" krita(11594) CanvasData::activateToolActions: "InteractionTool" : action "object_order_lower" conflicts with canvas action "rotate_canvas_left" shortcut: "Ctrl+[" krita(11594) CanvasData::activateToolActions: "InteractionTool" : action "object_order_raise" conflicts with canvas action "rotate_canvas_right" shortcut: "Ctrl+]" krita(11594) CanvasData::activateToolActions: "InteractionTool" : action "object_order_lower" conflicts with canvas action "rotate_canvas_left" shortcut: "Ctrl+[" uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu ASSERT (krita): "parentLayer" in file /home/raghu/kde4/src/calligra/krita/image/kis_transform_mask.cpp, line 187 [New Thread 0x7fff9c85b700 (LWP 11639)] [New Thread 0x7fff96e07700 (LWP 11641)] [New Thread 0x7fffb4c8c700 (LWP 11640)] [New Thread 0x7fffd9490700 (LWP 11638)] [New Thread 0x7fff8ddff700 (LWP 11629)] [New Thread 0x7fffb648f700 (LWP 11613)] [New Thread 0x7fffb6c90700 (LWP 11612)] [New Thread 0x7fffd8c8f700 (LWP 11610)] [New Thread 0x7fffb548d700 (LWP 11609)] [New Thread 0x7fffd9c91700 (LWP 11599)] [New Thread 0x7fffdadb9700 (LWP 11598)] Program received signal SIGABRT, Aborted. [Switching to Thread 0x7fff9c85b700 (LWP 11639)] 0x00007ffff5399267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 55 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff5399267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 #1 0x00007ffff539aeca in __GI_abort () at abort.c:89 #2 0x00007ffff5cc4a8a in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #3 0x00007ffff5cc4df9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #4 0x00007ffff5cc56e1 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #5 0x00007ffff243dacc in kis_assert_common ( assertion=assertion@entry=0x7ffff46c7591 "parentLayer", file=file@entry=0x7ffff46c75d0 "/home/raghu/kde4/src/calligra/krita/image/kis_transform_mask.cpp", line=line@entry=187, throwException=throwException@entry=false) at /home/raghu/kde4/src/calligra/krita/libglobal/kis_assert.cpp:76 #6 0x00007ffff243dfb7 in kis_assert_recoverable ( assertion=assertion@entry=0x7ffff46c7591 "parentLayer", file=file@entry=0x7ffff46c75d0 "/home/raghu/kde4/src/calligra/krita/image/kis_transform_mask.cpp", line=line@entry=187) at /home/raghu/kde4/src/calligra/krita/libglobal/kis_assert.cpp:85 #7 0x00007ffff45a5dea in KisTransformMask::recaclulateStaticImage ( this=0x8ce8f40) at /home/raghu/kde4/src/calligra/krita/image/kis_transform_mask.cpp:187 #8 0x00007fffb93f83c3 in ModifyTransformMaskCommand::undo ( ---Type <return> to continue, or q <return> to quit--- this=0x7fff7c8beb90) at /home/raghu/kde4/src/calligra/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp:63 #9 0x00007ffff45c1981 in KisStrokeStrategyUndoCommandBased::doStrokeCallback ( this=0x7a57450, data=<optimized out>) at /home/raghu/kde4/src/calligra/krita/image/kis_stroke_strategy_undo_command_based.cpp:102 #10 0x00007ffff4504381 in run (this=<optimized out>) at /home/raghu/kde4/build/krita/image/../../../src/calligra/krita/image/kis_stroke_job.h:40 #11 KisUpdateJobItem::run (this=0x51f4960) at /home/raghu/kde4/build/krita/image/../../../src/calligra/krita/image/kis_update_job_item.h:61 #12 0x00007ffff5cc2b70 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #13 0x00007ffff5ccf6ff in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #14 0x00007fffefe316aa in start_thread (arg=0x7fff9c85b700) at pthread_create.c:333 #15 0x00007ffff546aeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb)
To me is seems to happen only when selecting the first Undo item (Freehand brush stroke), probably selecting an undo item without the transform mask break something (it crashes while trying get the transform mask parent layer).
Git commit de3e3b5a8ed84d484e93dc26164b07dfe12fdba0 by Dmitry Kazakov. Committed on 17/08/2015 at 12:17. Pushed by dkazakov into branch 'calligra/2.9'. Add a barrier between sequentially undone commands with setIndex Some of the commands are undone asynchronously using strokes and the other are undone directly by simply executing the code in the loop. To avoid implicit reordering of the commands which undo/redo we should add barriers between single commands. M +6 -0 krita/ui/KisDocument.cpp M +13 -2 libs/kundo2/kundo2stack.cpp M +3 -0 libs/kundo2/kundo2stack.h http://commits.kde.org/calligra/de3e3b5a8ed84d484e93dc26164b07dfe12fdba0
Git commit 87fa0eb8b7d3d14a180309c6ddda1c4e218e60f1 by Dmitry Kazakov. Committed on 17/08/2015 at 12:17. Pushed by dkazakov into branch 'calligra/2.9'. Fix a severe crash in Transformation Masks We should be really careful with makeCloneFrom() calls. There is a simple rule of thumb: "Use makeCloneFrom or makeCloneFromRough if and only of you are the only owner of the paint device and you are 100% sure no other thread has access to it" The reason is simple. These call change offset and a color space of the paint device, so all the other users with get a SIGSEGV with a non-zero probability. If you want to copy data to a device, which is shared with someone else, use KisPainter::copyAreaOptimized() instead. It is totlly safe. M +2 -1 krita/image/kis_transform_mask.cpp http://commits.kde.org/calligra/87fa0eb8b7d3d14a180309c6ddda1c4e218e60f1