Bug 409249 - Assert when saving a new snapshot of an image with assistants
Summary: Assert when saving a new snapshot of an image with assistants
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Assistants (show other bugs)
Version: git master (please specify the git hash!)
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-27 13:45 UTC by Tiar
Modified: 2019-07-08 14:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
File that makes Krita throws assert when making a new snapshot (2.37 MB, application/x-krita)
2019-06-27 13:45 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-06-27 13:45:20 UTC
Created attachment 121186 [details]
File that makes Krita throws assert when making a new snapshot

SUMMARY
When you try to make a new snapshot out of this file, Krita throws an assert.


STEPS TO REPRODUCE
1. Open the file attached.
2. Click on "Add" button in the Snapshot docker.

OBSERVED RESULT
Assert.

EXPECTED RESULT
No assert.

SOFTWARE/OS VERSIONS
Linux Mint 
Qt Version: 5.12.3 

ADDITIONAL INFORMATION
The file attached is taken from bug 408927


-------

ASSERT: "!d->assistants.contains(assistant)" in file /home/tymon/kritadev/krita/libs/ui/kis_painting_assistant.cc, line 87

Thread 1 "krita" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: Nie ma takiego pliku ani katalogu.
(gdb) thread apply all bt

Thread 9 (Thread 0x7fffbf7fe700 (LWP 7052)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff3b7dc30 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007ffff3b7daa2 in QSemaphore::tryAcquire(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff5594fc3 in KisTileDataSwapper::waitForWork (this=<optimized out>) at /home/tymon/kritadev/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007ffff559521a in KisTileDataSwapper::run (this=0x7ffff5c49e00 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /home/tymon/kritadev/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007ffff3b7b612 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffee520182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#7  0x00007ffff344ffaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7fffc487b700 (LWP 7047)):
#0  0x00007ffff3443ba9 in __GI___poll (fds=0x7fffc0003ce0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffed3c7539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed3c764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff3d84047 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff3d2f5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff3b7a2c6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3b7b612 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffee520182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007ffff344ffaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7fffddc20700 (LWP 6980)):
#0  0x00007ffff3443ba9 in __GI___poll (fds=0x7fffd8004230, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffed3c7539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed3c764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff3d84047 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff3d2f5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff3b7a2c6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffee54e565 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007ffff3b7b612 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffee520182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9  0x00007ffff344ffaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fffe5a12700 (LWP 6979)):
#0  0x00007ffff3443ba9 in __GI___poll (fds=0x7fffe5a11ca8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffecc9f747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fffecca136a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fffe81ac6a8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007ffff3b7b612 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffee520182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007ffff344ffaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fffe8b1f600 (LWP 6942)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff3357535 in __GI_abort () at abort.c:79
#2  0x00007ffff3b439a7 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff3b42e29 in qt_assert(char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff6b8bf27 in KisPaintingAssistantHandle::registerAssistant (this=<optimized out>, assistant=assistant@entry=0x55557053bae0) at /home/tymon/kritadev/krita/libs/ui/kis_painting_assistant.cc:87
#5  0x00007ffff6b8e40b in KisPaintingAssistant::Private::reuseOrCreateHandle (this=<optimized out>, handleMap=..., origHandle=..., q=q@entry=0x55557053bae0) at /home/tymon/kritadev/krita/libs/ui/kis_painting_assistant.cc:185

#6  0x00007ffff6b8e8af in KisPaintingAssistant::KisPaintingAssistant (this=0x55557053bae0, rhs=..., handleMap=...) at /home/tymon/kritadev/krita/libs/ui/kis_painting_assistant.cc:239
#7  0x00007fffcfe65530 in non-virtual thunk to PerspectiveAssistant::clone(QMap<KisSharedPtr<KisPaintingAssistantHandle>, KisSharedPtr<KisPaintingAssistantHandle> >&) const ()
    at /home/tymon/kritadev/krita/plugins/assistants/Assistants/PerspectiveAssistant.cc:49
---Type <return> to continue, or q <return> to quit---
#8  0x00007ffff6b8f2c9 in KisPaintingAssistant::cloneAssistantList (list=...) at /home/tymon/kritadev/krita/libs/ui/kis_painting_assistant.cc:861
#9  0x00007ffff6e4eca9 in KisDocument::Private::copyFromImpl (policy=KisDocument::CONSTRUCT, q=0x555560873710, rhs=..., this=0x555570144290) at /home/tymon/kritadev/krita/libs/ui/KisDocument.cpp:391
#10 KisDocument::Private::Private (q=0x555560873710, rhs=..., this=0x555570144290) at /home/tymon/kritadev/krita/libs/ui/KisDocument.cpp:264
#11 KisDocument::KisDocument (this=0x555560873710, rhs=...) at /home/tymon/kritadev/krita/libs/ui/KisDocument.cpp:490
#12 0x00007ffff6e4f228 in KisDocument::lockAndCloneForSaving (this=0x5555593c1170) at /home/tymon/kritadev/krita/libs/ui/KisDocument.cpp:797
#13 0x00007ffff6e4f2db in KisDocument::lockAndCreateSnapshot (this=<optimized out>) at /home/tymon/kritadev/krita/libs/ui/KisDocument.cpp:802
#14 0x00007fffc4cbdf6d in KisSnapshotModel::slotCreateSnapshot (this=0x5555608d0f40) at /home/tymon/kritadev/krita/plugins/dockers/snapshotdocker/KisSnapshotModel.cpp:186
#15 0x00007ffff3d5a563 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff47df032 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff47df24a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff47e060f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff47e07e5 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff48ca6ca in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff4735b58 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff48ca773 in QToolButton::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff46f6551 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff46fdb77 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff6e3c857 in KisApplication::notify (this=<optimized out>, receiver=0x5555608d3040, event=0x7fffffffd420) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:653
#26 0x00007ffff3d308e9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff46fcebf in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff475057b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff475353f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007ffff46f6551 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007ffff46fd930 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff6e3c857 in KisApplication::notify (this=<optimized out>, receiver=0x55555f41ba40, event=0x7fffffffd910) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:653
#33 0x00007ffff3d308e9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007ffff4106c6c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007ffff4108075 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#36 0x00007ffff40e205b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#37 0x00007fffe81ad67a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#38 0x00007fffed3c7387 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fffed3c75c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fffed3c764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007ffff3d84047 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007ffff3d2f5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff3d375e2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x0000555555e4d761 in main (argc=<optimized out>, argv=0x7fffffffdfd8) at /home/tymon/kritadev/krita/krita/main.cc:548
Comment 1 Tiar 2019-06-28 11:40:09 UTC
Git hash for the commit I checked it in: 103d4b79da
Comment 2 tusooa 2019-06-28 23:51:24 UTC
Git commit edb2c8414b8dd3dfd1a778a772da0817ad9733b5 by Tusooa Zhu.
Committed on 28/06/2019 at 23:47.
Pushed by tusooaw into branch 'master'.

Fix an assert when cloning perspective assistant

The handles in the variables `topLeft`, `topRight`, etc. are but
duplicates of the ones in the handle list, so they must have been
already registered to the new assistant. Registering them twice
will trigger an assert.

M  +4    -4    libs/ui/kis_painting_assistant.cc

https://invent.kde.org/kde/krita/commit/edb2c8414b8dd3dfd1a778a772da0817ad9733b5
Comment 3 Halla Rempt 2019-07-08 14:59:28 UTC
Git commit 252e349324cd315d377f7fafecc7cdbb06ae419a by Boudewijn Rempt, on behalf of Tusooa Zhu.
Committed on 08/07/2019 at 14:59.
Pushed by rempt into branch 'krita/4.2'.

Fix an assert when cloning perspective assistant

The handles in the variables `topLeft`, `topRight`, etc. are but
duplicates of the ones in the handle list, so they must have been
already registered to the new assistant. Registering them twice
will trigger an assert.

M  +4    -4    libs/ui/kis_painting_assistant.cc

https://invent.kde.org/kde/krita/commit/252e349324cd315d377f7fafecc7cdbb06ae419a