Bug 366607 - Crash when KUndo2Command tries to do a timedmerge but gets confused
Summary: Crash when KUndo2Command tries to do a timedmerge but gets confused
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
: 368664 368992 373995 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-10 19:52 UTC by wolthera
Modified: 2016-12-21 11:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
crash with duplicating animation layer. (20.20 KB, text/plain)
2016-08-10 19:54 UTC, wolthera
Details
Backtrace #2 (12.55 KB, text/plain)
2016-08-10 19:55 UTC, wolthera
Details
Backtrace #3: An Assert (12.55 KB, text/plain)
2016-08-10 19:57 UTC, wolthera
Details
Backtrace # 4 (14.90 KB, text/plain)
2016-08-10 20:00 UTC, wolthera
Details
Backtrace 3: assert reuploaded (18.76 KB, text/plain)
2016-08-10 20:08 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2016-08-10 19:52:52 UTC
These 4 backtraces were made with gdb on Ubuntu 16.04, with QT5.6 in my own branch which is synced with master. In ALL CASES the crashes happened because I was moving or duplicating frames. Sometimes the crash happened because I undid moving/dplucating frames. Only one of them is consistently reproducible.

I will attach the backtraces to the report after submitting.

Reproducible: Sometimes
Comment 1 wolthera 2016-08-10 19:54:39 UTC
Created attachment 100528 [details]
crash with duplicating animation layer.

Backtrace 1:

Trying to move a stack of frames with alt or shift, fully reproducible.

Basically, I wanted to offset a walkcycle:

1. first duplicate the walkcycle layer.
2. then move the first few frames of the walkcycle to the back
3. then use the alt key on the first actual frame of the walkcycle to move the full stack of frames to the first frame.
4. this will cause the crash. on restart, assuming you have saved after dplicating, before offsetting, offsetting will work normally
Comment 2 wolthera 2016-08-10 19:55:34 UTC
Created attachment 100529 [details]
Backtrace #2

Don't remember what caused this one.
Comment 3 wolthera 2016-08-10 19:57:08 UTC
Created attachment 100530 [details]
Backtrace #3: An Assert

This one is an assert. But also don't remember what caused it... probably should've written it down.
Comment 4 wolthera 2016-08-10 20:00:52 UTC
Created attachment 100531 [details]
Backtrace # 4

I think this was while saving the file, but I don't know what happened exactly. I do know I lost work, but I managed to use an autosave of the same file.
Comment 5 wolthera 2016-08-10 20:08:11 UTC
Created attachment 100532 [details]
Backtrace 3: assert reuploaded

Whoops, wrong backtrace, this is the right one.
Comment 6 wolthera 2016-08-12 12:09:32 UTC
Aaaand, another one:

Undo frame change, then try changing frames:

Thread 1 (Thread 0x7ffff7f0e8c0 (LWP 11290)):
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff180190a in KUndo2Command::timedMergeWith (this=0x18444570, 
    other=0x7fff74001500)
    at /home/krita/kde/src/krita/libs/kundo2/kundo2stack.cpp:349
#2  0x00007ffff1802662 in KUndo2QStack::push (this=0xdafedc0, cmd=0x191ddd30)
    at /home/krita/kde/src/krita/libs/kundo2/kundo2stack.cpp:760
#3  0x00007ffff3224c53 in KisPostExecutionUndoAdapter::addCommand (
    this=0x1274a070, command=...)
    at /home/krita/kde/src/krita/libs/image/kis_post_execution_undo_adapter.cpp:38
#4  0x00007ffff318c9b1 in KisImageAnimationInterface::requestTimeSwitchWithUndo
    (this=this@entry=0xdaf1130, time=29)
    at /home/krita/kde/src/krita/libs/image/kis_image_animation_interface.cpp:145
#5  0x00007fffabe16360 in AnimationDocker::slotPreviousFrame (
    this=<optimized out>)
    at /home/krita/kde/src/krita/plugins/dockers/animation/animation_docker.cpp:339
#6  0x00007ffff5748cef in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#7  0x00007ffff6509952 in QAction::triggered(bool) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#8  0x00007ffff650c4ad in QAction::activate(QAction::ActionEvent) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#9  0x00007ffff7874c0b in QAction::trigger (this=0xd544a70)
    at /home/krita/Qt/5.6/gcc_64/include/QtWidgets/qaction.h:177
---Type <return> to continue, or q <return> to quit---
#10 KisChangeFrameAction::begin (this=this@entry=0xca86f00, 
    shortcut=<optimized out>, event=event@entry=0x0)
    at /home/krita/kde/src/krita/libs/ui/input/kis_change_frame_action.cpp:73
#11 0x00007ffff7879b27 in KisShortcutMatcher::tryRunSingleActionShortcutImpl<Qt::Key, QEvent> (this=this@entry=0x4b1c600, param=<optimized out>, 
    event=event@entry=0x0, keysState=...)
    at /home/krita/kde/src/krita/libs/ui/input/kis_shortcut_matcher.cpp:385
#12 0x00007ffff7878f99 in KisShortcutMatcher::keyPressed (this=0x4b1c600, 
    key=Qt::Key_Left)
    at /home/krita/kde/src/krita/libs/ui/input/kis_shortcut_matcher.cpp:134
#13 0x00007ffff7866a32 in KisInputManager::eventFilterImpl (this=0xc9ac170, 
    event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/input/kis_input_manager.cpp:303
#14 0x00007ffff571fbf3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#15 0x00007ffff6513025 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#16 0x00007ffff65172a9 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#17 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
    receiver=0xe367180, event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
#18 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#19 0x00007ffff65726f3 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#20 0x00007ffff651304c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#21 0x00007ffff6517488 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#22 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    receiver=0xd805a90, event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
#23 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#24 0x00007ffff5cbc738 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#25 0x00007ffff5cc1465 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#26 0x00007ffff5ca37fd in QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#27 0x00007ffff5ca7b81 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#28 0x00007ffff5cbc774 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#29 0x00007ffff5cc1465 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#30 0x00007ffff5ca26a3 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#31 0x00007fffe5a2b720 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#32 0x00007fffee60c1a7 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffee60c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#34 0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff576f4e7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#36 0x00007ffff571defa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#37 0x00007ffff5725d9d in QCoreApplication::exec() ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#38 0x0000000000404bc6 in main (argc=1, argv=<optimized out>)
    at /home/krita/kde/src/krita/krita/main.cc:231
Comment 7 wolthera 2016-08-12 12:26:06 UTC
Crash when switching frames in wraparound mode:

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
KisPaintDevice::Private::currentStrategy (this=0x30)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:533
533	    if (!defaultBounds->wrapAroundMode()) {
(gdb) thread apply all backtrace

Thread 1667 (Thread 0x7fff927fd700 (LWP 32414)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007ffff555e738 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#2  0x00007ffff555a467 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#3  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#4  0x00007fffeef376fa in start_thread (arg=0x7fff927fd700)
    at pthread_create.c:333
#5  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 11 (Thread 0x7fffa3f64700 (LWP 30667)):
#0  pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff555e7eb in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#2  0x00007ffff6734aa2 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#3  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#4  0x00007fffeef376fa in start_thread (arg=0x7fffa3f64700)
    at pthread_create.c:333
#5  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 10 (Thread 0x7fffa888f700 (LWP 30666)):
#0  pthread_cond_wait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff555e7eb in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#2  0x00007ffff5558116 in QSemaphore::tryAcquire(int, int) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#3  0x00007ffff30dd383 in KisTileDataSwapper::waitForWork (
    this=<optimized out>)
    at /home/krita/kde/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007ffff30dd57a in KisTileDataSwapper::run (
    this=0x7ffff3563460 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>)
    at /home/krita/kde/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#6  0x00007fffeef376fa in start_thread (arg=0x7fffa888f700)
    at pthread_create.c:333
#7  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7fffc0ed5700 (LWP 30665)):
#0  pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff555e7eb in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#2  0x00007ffff5557e8b in QSemaphore::acquire(int) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#3  0x00007ffff30c373e in KisTileDataPooler::waitForWork (
    this=0x7ffff3563420 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>)
---Type <return> to continue, or q <return> to quit---
    at /home/krita/kde/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:165
#4  0x00007ffff30c3efa in KisTileDataPooler::run (
    this=0x7ffff3563420 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>)
    at /home/krita/kde/src/krita/libs/image/tiles3/kis_tile_data_pooler.cc:187
#5  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#6  0x00007fffeef376fa in start_thread (arg=0x7fffc0ed5700)
    at pthread_create.c:333
#7  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffd882a700 (LWP 30660)):
#0  0x00007ffff4c4de8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffee60c39c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff576f4fc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#4  0x00007ffff571defa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#5  0x00007ffff555938c in QThread::exec() ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#6  0x00007fffef162cd5 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5DBus.so.5
#7  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#8  0x00007fffeef376fa in start_thread (arg=0x7fffd882a700)
    at pthread_create.c:333
#9  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
---Type <return> to continue, or q <return> to quit---

Thread 5 (Thread 0x7fffd9245700 (LWP 30659)):
#0  0x00007ffff4c4de8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffee60c39c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffee60c722 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffde6a3916 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fffee632bc5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffeef376fa in start_thread (arg=0x7fffd9245700)
    at pthread_create.c:333
#6  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd9a46700 (LWP 30658)):
#0  0x00007ffff4c4de8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffee60c39c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffee60c4e9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffee632bc5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffeef376fa in start_thread (arg=0x7fffd9a46700)
    at pthread_create.c:333
#6  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffda247700 (LWP 30657)):
#0  0x00007ffff4c4de8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffee60c39c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffda24f28d in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007fffee632bc5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffeef376fa in start_thread (arg=0x7fffda247700)
    at pthread_create.c:333
#6  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe4b21700 (LWP 30656)):
#0  0x00007ffff4c4de8d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007ffff357cc62 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007ffff357e8d7 in xcb_wait_for_event ()
   from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fffe59d0dc9 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#4  0x00007ffff555dc89 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#5  0x00007fffeef376fa in start_thread (arg=0x7fffe4b21700)
    at pthread_create.c:333
#6  0x00007ffff4c59b5d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7f0e8c0 (LWP 30647)):
#0  KisPaintDevice::Private::currentStrategy (this=0x30)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:533
#1  0x00007ffff31d36ad in KisPaintDevice::extent (this=this@entry=0xd9e8460)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:1091
#2  0x00007ffff31d9e44 in KisPaintDevice::createThumbnailDeviceOversampled (
    this=0xd9e8460, w=w@entry=20, h=h@entry=20, oversample=oversample@entry=1, 
    rect=..., outputTileRect=...)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:1535
#3  0x00007ffff31da0a5 in KisPaintDevice::createThumbnail (
---Type <return> to continue, or q <return> to quit---
    this=<optimized out>, w=w@entry=20, h=h@entry=20, rect=..., 
    oversample=oversample@entry=1, 
    renderingIntent=KoColorConversionTransformation::IntentPerceptual, 
    conversionFlags=...)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:1572
#4  0x00007ffff31dacb0 in KisPaintDeviceCache::createThumbnail (
    conversionFlags=..., 
    renderingIntent=KoColorConversionTransformation::IntentPerceptual, 
    oversample=1, h=20, w=20, this=0x7fff7c042868)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device_cache.h:97
#5  KisPaintDevice::createThumbnail (this=<optimized out>, w=w@entry=20, 
    h=h@entry=20, oversample=oversample@entry=1, 
    renderingIntent=renderingIntent@entry=KoColorConversionTransformation::IntentPerceptual, conversionFlags=conversionFlags@entry=...)
    at /home/krita/kde/src/krita/libs/image/kis_paint_device.cc:1579
#6  0x00007ffff31a4f80 in KisLayer::createThumbnail (this=<optimized out>, 
    w=20, h=20) at /home/krita/kde/src/krita/libs/image/kis_layer.cc:793
#7  0x00007ffff770be85 in KisNodeModel::data (this=0xd49b470, index=..., 
    role=120) at /home/krita/kde/src/krita/libs/ui/kis_node_model.cpp:476
#8  0x00007ffff56ea6a8 in QSortFilterProxyModel::data(QModelIndex const&, int) const () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#9  0x00007ffff78e22b6 in QModelIndex::data (arole=120, this=0x7fffffffbd00)
    at /home/krita/Qt/5.6/gcc_64/include/QtCore/qabstractitemmodel.h:420
#10 KisNodeDelegate::drawThumbnail (this=this@entry=0xd490ad0, 
    p=p@entry=0x7fffffffc030, option=..., index=...)
    at /home/krita/kde/src/krita/libs/ui/KisNodeDelegate.cpp:274
#11 0x00007ffff78e7921 in KisNodeDelegate::paint (this=0xd490ad0, 
    p=0x7fffffffc030, o=..., index=...)
    at /home/krita/kde/src/krita/libs/ui/KisNodeDelegate.cpp:112
#12 0x00007ffff6797996 in QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const ()
---Type <return> to continue, or q <return> to quit---
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#13 0x00007ffff679c24e in QTreeView::drawTree(QPainter*, QRegion const&) const
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#14 0x00007ffff67a1676 in QTreeView::paintEvent(QPaintEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#15 0x00007ffff78ebb70 in KisNodeView::paintEvent (this=0xd48b930, 
    event=<optimized out>)
    at /home/krita/kde/src/krita/libs/ui/KisNodeView.cpp:446
#16 0x00007ffff6555308 in QWidget::event(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#17 0x00007ffff664d56e in QFrame::event(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#18 0x00007ffff676559b in QAbstractItemView::viewportEvent(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#19 0x00007ffff67a2530 in QTreeView::viewportEvent(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#20 0x00007ffff78ea96b in KisNodeView::viewportEvent (this=0xd48b930, 
    e=0x7fffffffc880) at /home/krita/kde/src/krita/libs/ui/KisNodeView.cpp:290
#21 0x00007ffff571fbf3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#22 0x00007ffff6513025 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#23 0x00007ffff6517488 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#24 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
    receiver=0xd48bf90, event=0x7fffffffc880)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
#25 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#26 0x00007ffff654e71a in QWidgetPrivate::sendPaintEvent(QRegion const&) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#27 0x00007ffff654ed2f in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#28 0x00007ffff651fbbe in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#29 0x00007ffff651fea9 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#30 0x00007ffff653f6ef in QWidgetPrivate::syncBackingStore() ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#31 0x00007ffff65553d0 in QWidget::event(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#32 0x00007ffff666301b in QMainWindow::event(QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#33 0x00007ffff6f3c3f7 in KMainWindow::event (this=this@entry=0xc9b4080, 
    ev=ev@entry=0x11d52dc0)
    at /home/krita/kde/src/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:780
#34 0x00007ffff6f74a09 in KXmlGuiWindow::event (this=0xc9b4080, ev=0x11d52dc0)
    at /home/krita/kde/src/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#35 0x00007ffff651304c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#36 0x00007ffff6517488 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#37 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
    receiver=0xc9b4080, event=0x11d52dc0)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
#38 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#39 0x00007ffff5722673 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#40 0x00007ffff576f0f3 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#41 0x00007fffee60c1a7 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007fffee60c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff576f4e7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#45 0x00007ffff571defa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#46 0x00007ffff5725d9d in QCoreApplication::exec() ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#47 0x0000000000404bc6 in main (argc=1, argv=<optimized out>)
    at /home/krita/kde/src/krita/krita/main.cc:231
Comment 8 wolthera 2016-08-12 12:48:38 UTC
More crashes:

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
KUndo2Command::timedMergeWith (this=0xdade2d0, other=0x19d)
    at /home/krita/kde/src/krita/libs/kundo2/kundo2stack.cpp:349
349	    if(other->timedId() == this->timedId() && other->timedId()!=-1 )

thread one:

Thread 1 (Thread 0x7ffff7f0e8c0 (LWP 32684)):
#0  KUndo2Command::timedMergeWith (this=0xdade2d0, other=0x19d)
    at /home/krita/kde/src/krita/libs/kundo2/kundo2stack.cpp:349
#1  0x00007ffff1802662 in KUndo2QStack::push (this=0x140e0370, cmd=0x11aca1c0)
    at /home/krita/kde/src/krita/libs/kundo2/kundo2stack.cpp:760
#2  0x00007ffff3224c53 in KisPostExecutionUndoAdapter::addCommand (
    this=0x1190d5e0, command=...)
    at /home/krita/kde/src/krita/libs/image/kis_post_execution_undo_adapter.cpp:38
#3  0x00007ffff318c9b1 in KisImageAnimationInterface::requestTimeSwitchWithUndo
    (this=this@entry=0xe189a00, time=26)
    at /home/krita/kde/src/krita/libs/image/kis_image_animation_interface.cpp:145
#4  0x00007fffaff9e360 in AnimationDocker::slotPreviousFrame (
    this=<optimized out>)
    at /home/krita/kde/src/krita/plugins/dockers/animation/animation_docker.cpp:339
#5  0x00007ffff5748cef in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#6  0x00007ffff6509952 in QAction::triggered(bool) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#7  0x00007ffff650c4ad in QAction::activate(QAction::ActionEvent) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#8  0x00007ffff7874c0b in QAction::trigger (this=0xd63ea50)
    at /home/krita/Qt/5.6/gcc_64/include/QtWidgets/qaction.h:177
#9  KisChangeFrameAction::begin (this=this@entry=0xc914a10, 
    shortcut=<optimized out>, event=event@entry=0x0)
---Type <return> to continue, or q <return> to quit---
    at /home/krita/kde/src/krita/libs/ui/input/kis_change_frame_action.cpp:73
#10 0x00007ffff7879b27 in KisShortcutMatcher::tryRunSingleActionShortcutImpl<Qt::Key, QEvent> (this=this@entry=0x10f42e0, param=<optimized out>, 
    event=event@entry=0x0, keysState=...)
    at /home/krita/kde/src/krita/libs/ui/input/kis_shortcut_matcher.cpp:385
#11 0x00007ffff7878f99 in KisShortcutMatcher::keyPressed (this=0x10f42e0, 
    key=Qt::Key_Left)
    at /home/krita/kde/src/krita/libs/ui/input/kis_shortcut_matcher.cpp:134
#12 0x00007ffff7866a32 in KisInputManager::eventFilterImpl (this=0xc9e58a0, 
    event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/input/kis_input_manager.cpp:303
#13 0x00007ffff571fbf3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#14 0x00007ffff6513025 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#15 0x00007ffff65172a9 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#16 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
    receiver=0x146983b0, event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
#17 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#18 0x00007ffff65726f3 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#19 0x00007ffff651304c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#20 0x00007ffff6517488 in QApplication::notify(QObject*, QEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5
#21 0x00007ffff78cc837 in KisApplication::notify (this=<optimized out>, 
    receiver=0xd80fa60, event=0x7fffffffcf40)
    at /home/krita/kde/src/krita/libs/ui/KisApplication.cpp:510
---Type <return> to continue, or q <return> to quit---
#22 0x00007ffff571fe80 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#23 0x00007ffff5cbc738 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#24 0x00007ffff5cc1465 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#25 0x00007ffff5ca37fd in QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#26 0x00007ffff5ca7b81 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#27 0x00007ffff5cbc774 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#28 0x00007ffff5cc1465 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#29 0x00007ffff5ca26a3 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Gui.so.5
#30 0x00007fffe5a2b720 in ?? ()
   from /home/krita/Qt/5.6/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#31 0x00007fffee60c1a7 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fffee60c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffee60c4ac in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#34 0x00007ffff576f4e7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#35 0x00007ffff571defa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#36 0x00007ffff5725d9d in QCoreApplication::exec() ()
   from /home/krita/Qt/5.6/gcc_64/lib/libQt5Core.so.5
#37 0x0000000000404bc6 in main (argc=1, argv=<optimized out>)
    at /home/krita/kde/src/krita/krita/main.cc:231
Comment 9 Halla Rempt 2016-09-19 09:05:08 UTC
*** Bug 368992 has been marked as a duplicate of this bug. ***
Comment 10 Halla Rempt 2016-09-19 09:05:24 UTC
*** Bug 368664 has been marked as a duplicate of this bug. ***
Comment 11 Halla Rempt 2016-09-19 11:10:12 UTC
Git commit 68ca0a9afba1693d7f1a6234c605ff7233522dd5 by Boudewijn Rempt.
Committed on 19/09/2016 at 11:09.
Pushed by rempt into branch 'master'.

Wrap the undo commands in a QPointer

This should fix the problems when trying to merge already deleted
commands in the timedMergeWith method, because now we can track
whether the QObject-based KUndo2Command instances have been deleted
behind our back.

M  +4    -2    libs/image/commands_new/kis_change_projection_color_command.cpp
M  +2    -2    libs/image/commands_new/kis_change_projection_color_command.h
M  +15   -10   libs/image/commands_new/kis_saved_commands.cpp
M  +5    -5    libs/image/commands_new/kis_saved_commands.h
M  +4    -2    libs/image/commands_new/kis_switch_current_time_command.cpp
M  +2    -2    libs/image/commands_new/kis_switch_current_time_command.h
M  +11   -17   libs/kundo2/kundo2command.cpp
M  +4    -6    libs/kundo2/kundo2command.h
M  +19   -10   libs/kundo2/kundo2stack.cpp
M  +5    -3    libs/kundo2/kundo2stack.h
M  +5    -5    libs/ui/canvas/kis_change_guides_command.cpp
M  +2    -2    libs/ui/canvas/kis_change_guides_command.h
M  +1    -1    plugins/flake/textshape/TextTool.cpp
M  +1    -1    plugins/flake/textshape/commands/ChangeListLevelCommand.cpp
M  +1    -1    plugins/flake/textshape/commands/ChangeListLevelCommand.h
M  +1    -0    plugins/flake/textshape/kotext/KoTextCommandBase.h
M  +1    -1    plugins/flake/textshape/kotext/KoTextEditor_undo.cpp
M  +1    -1    plugins/flake/textshape/kotext/OdfTextTrackStyles.cpp
M  +2    -2    plugins/flake/textshape/kotext/commands/ChangeListCommand.cpp
M  +1    -1    plugins/flake/textshape/kotext/commands/ChangeListCommand.h
M  +5    -2    plugins/flake/textshape/kotext/commands/DeleteCommand.cpp
M  +1    -1    plugins/flake/textshape/kotext/commands/DeleteCommand.h
M  +1    -1    plugins/flake/textshape/kotext/commands/ListItemNumberingCommand.cpp
M  +1    -1    plugins/flake/textshape/kotext/commands/ListItemNumberingCommand.h
M  +3    -3    plugins/flake/textshape/kotext/commands/RenameSectionCommand.cpp
M  +1    -1    plugins/flake/textshape/kotext/commands/RenameSectionCommand.h

http://commits.kde.org/krita/68ca0a9afba1693d7f1a6234c605ff7233522dd5
Comment 12 Dmitry Kazakov 2016-09-21 13:16:03 UTC
Git commit a1e7098bdfa7618578f4c6096c0b35146c81bee3 by Dmitry Kazakov.
Committed on 21/09/2016 at 11:05.
Pushed by dkazakov into branch 'kazakov/preset-chooser-fixes'.

Fix crash when D&D frames from a *cloned* layer

Yes, we should also copy the free-frame-id counter when cloning
the layers (and ideally also check if the frame id is already occupied)

M  +12   -3    libs/image/kis_paint_device.cc
M  +55   -11   libs/image/tests/kis_keyframing_test.cpp
M  +2    -0    libs/image/tests/kis_keyframing_test.h

http://commits.kde.org/krita/a1e7098bdfa7618578f4c6096c0b35146c81bee3
Comment 13 Dmitry Kazakov 2016-09-21 13:16:03 UTC
Git commit 431fbb5a10eb2f1b54085e79137db8d0e7e997c4 by Dmitry Kazakov.
Committed on 21/09/2016 at 13:15.
Pushed by dkazakov into branch 'kazakov/preset-chooser-fixes'.

Fix crash in timedMergeWith()

Don't try to read from m_lastMergedIndex + 1, which might not
exist because the previous command has been merged using basic
Qt's mechanism.

M  +53   -19   libs/kundo2/kundo2stack.cpp

http://commits.kde.org/krita/431fbb5a10eb2f1b54085e79137db8d0e7e997c4
Comment 14 Halla Rempt 2016-09-26 20:06:14 UTC
Git commit e2f9deda136ff8f4a1d8a12104ab678098a2a890 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 26/09/2016 at 20:06.
Pushed by rempt into branch 'krita/3.0.1'.

Fix crash when D&D frames from a *cloned* layer

Yes, we should also copy the free-frame-id counter when cloning
the layers (and ideally also check if the frame id is already occupied)

M  +12   -3    libs/image/kis_paint_device.cc
M  +2    -0    libs/image/tests/kis_keyframing_test.h

http://commits.kde.org/krita/e2f9deda136ff8f4a1d8a12104ab678098a2a890
Comment 15 Halla Rempt 2016-09-26 20:26:56 UTC
Git commit 53b7dccab445b87b71f0e9a6d25429d337634703 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 26/09/2016 at 20:06.
Pushed by rempt into branch 'krita/3.0.1'.

Fix crash in timedMergeWith()

Don't try to read from m_lastMergedIndex + 1, which might not
exist because the previous command has been merged using basic
Qt's mechanism.

M  +53   -19   libs/kundo2/kundo2stack.cpp

http://commits.kde.org/krita/53b7dccab445b87b71f0e9a6d25429d337634703
Comment 16 Halla Rempt 2016-12-21 11:57:40 UTC
*** Bug 373995 has been marked as a duplicate of this bug. ***