Application: krita (4.1.0-pre-alpha (git 4c7aa19)) Qt Version: 5.9.1 Frameworks Version: 5.44.0 Operating System: Linux 4.13.0-41-generic x86_64 Distribution: Ubuntu 17.10 -- Information about the crash: I've had several crashes with the transform tool and a transformation mask. I just tried to transform something, and then it crashes. This happens randomly. The crash can be reproduced sometimes. -- Backtrace: Application: Krita (krita), signal: Aborted Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7f0bca0f6440 (LWP 9953))] Thread 5 (Thread 0x7f0b6163e700 (LWP 3331)): [KCrash Handler] #6 0x00007f0bc63bf0bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #7 0x00007f0bc63c0f5d in __GI_abort () at abort.c:90 #8 0x00007f0bc6a11095 in __gnu_cxx::__verbose_terminate_handler() () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #9 0x00007f0bc6a0ec86 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #10 0x00007f0bc6a0ecd1 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #11 0x00007f0bc6a0ef69 in __cxa_rethrow () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #12 0x00007f0bc6dad987 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #13 0x00007f0bc6db129d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #14 0x00007f0bc018b7fc in start_thread (arg=0x7f0b6163e700) at pthread_create.c:465 #15 0x00007f0bc649cb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 4 (Thread 0x7f0b8e52f700 (LWP 10070)): #0 0x00007f0bc648c06d in __GI___libc_read (fd=24, buf=0x7f0b8e52ea70, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:26 #1 0x00007f0bbebae280 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f0bbeb69c4b in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f0bbeb6a110 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f0bbeb6a27c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f0bc6fe749b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #6 0x00007f0bc6f8ce3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f0bc6dac3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #8 0x00007f0babce5f45 in () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #9 0x00007f0bc6db129d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #10 0x00007f0bc018b7fc in start_thread (arg=0x7f0b8e52f700) at pthread_create.c:465 #11 0x00007f0bc649cb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 3 (Thread 0x7f0b8dd2e700 (LWP 10058)): #0 0x00007f0bc6460bf8 in __GI___nanosleep (requested_time=0x7f0b8dd2dcd0, remaining=0x7f0b8dd2dcd0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27 #1 0x00007f0bc6fe6e0d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007f0bc40e29ea in KisTileDataSwapper::run() (this=0x7f0bc45d6f20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:97 #3 0x00007f0bc6db129d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f0bc018b7fc in start_thread (arg=0x7f0b8dd2e700) at pthread_create.c:465 #5 0x00007f0bc649cb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 2 (Thread 0x7f0ba63e3700 (LWP 9959)): #0 0x00007f0bc6490951 in __GI___poll (fds=0x7f0ba0018ef0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007f0bbeb6a169 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f0bbeb6a27c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f0bc6fe749b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f0bc6f8ce3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f0bc6dac3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #6 0x00007f0bc03b8e45 in () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 #7 0x00007f0bc6db129d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #8 0x00007f0bc018b7fc in start_thread (arg=0x7f0ba63e3700) at pthread_create.c:465 #9 0x00007f0bc649cb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7f0bca0f6440 (LWP 9953)): #0 0x00007f0bc019264b in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7fff2bcc9810, expected=0, futex_word=0x5654f5823a40) at ../sysdeps/unix/sysv/linux/futex-internal.h:142 #1 0x00007f0bc019264b in __pthread_cond_wait_common (abstime=0x7fff2bcc98d0, mutex=0x5654f58239f0, cond=0x5654f5823a18) at pthread_cond_wait.c:533 #2 0x00007f0bc019264b in __pthread_cond_timedwait (cond=0x5654f5823a18, mutex=0x5654f58239f0, abstime=0x7fff2bcc98d0) at pthread_cond_wait.c:667 #3 0x00007f0bc6db2588 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f0bc6db0e7e in QThread::wait(unsigned long) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f0bc40e2798 in KisTileDataSwapper::terminateSwapper() (this=this@entry=0x7f0bc45d6f20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:81 #6 0x00007f0bc40c52b9 in KisTileDataStore::~KisTileDataStore() (this=0x7f0bc45d6ee0 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, __in_chrg=<optimized out>) at /home/wolthera/krita/src/libs/image/tiles3/kis_tile_data_store.cc:83 #7 0x00007f0bc40c5699 in (anonymous namespace)::Q_QGS_s_instance::Holder::~Holder() (this=<optimized out>, __in_chrg=<optimized out>) at /home/wolthera/krita/src/libs/image/tiles3/kis_tile_data_store.cc:30 #8 0x00007f0bc63c3ec0 in __run_exit_handlers (status=1, listp=0x7f0bc67626f8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83 #9 0x00007f0bc63c3f1a in __GI_exit (status=<optimized out>) at exit.c:105 #10 0x00007f0bb515344d in () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #11 0x00007f0bc6fbe452 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #12 0x00007f0bc7d0946c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007f0bc7d10d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007f0bc95cc1f7 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x5654e6fbc630, event=0x7f0bac672b40) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:652 #15 0x00007f0bc6f8ede8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #16 0x00007f0bc6f9155d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #17 0x00007f0bc6fe7e53 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #18 0x00007f0bbeb69fb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #19 0x00007f0bbeb6a1f0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007f0bbeb6a27c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007f0bc6fe747f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #22 0x00007f0bc6f8ce3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #23 0x00007f0bc6f95da4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #24 0x00005654e4095857 in main(int, char**) (argc=<optimized out>, argv=0x7fff2bcca3f8) at /home/wolthera/krita/src/krita/main.cc:385 Possible duplicates by query: bug 385854, bug 382744, bug 382425, bug 380394. Reported using DrKonqi
I think I found a reliable way to reproduce this crash Steps: Make a transform layer Draw on the layer below Transform the Transform Layer Draw on the layer again Transform the Transform Layer again for 1-3 times I don't know what causes the 1-3 times inconsistency. Video here https://www.youtube.com/watch?v=cHFf4BQovxE (gdb) bt #0 0x00007ffff44f40bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff44f5f5d in __GI_abort () at abort.c:90 #2 0x00007ffff4ed1107 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007ffff678c584 in kis_assert_common(char const*, char const*, int, bool, bool) (assertion=0x7ffff239e698 "0 && \"sanity check failed: the tile has already been removed!\"", file=0x7ffff239e628 "/home/managor/Sourcebuilding/krita/krita-testing-4.0.0/libs/image/tiles3/KisTiledExtentManager.cpp", line=53, throwException=false, isIgnorable=false) at ./libs/global/kis_assert.cpp:90 #4 0x00007ffff678c89c in kis_assert_recoverable(char const*, char const*, int) (assertion=0x7ffff239e698 "0 && \"sanity check failed: the tile has already been removed!\"", file=0x7ffff239e628 "/home/managor/Sourcebuilding/krita/krita-testing-4.0.0/libs/image/tiles3/KisTiledExtentManager.cpp", line=53) at ./libs/global/kis_assert.cpp:103 #5 0x00007ffff206324a in (anonymous namespace)::removeTileFromMap(int, QMap<int, int>*) (index=18, map=0x7fff94013590) at ./libs/image/tiles3/KisTiledExtentManager.cpp:53 #6 0x00007ffff206345a in KisTiledExtentManager::notifyTileRemoved(int, int) (this=0x7fff94013588, col=18, row=0) at ./libs/image/tiles3/KisTiledExtentManager.cpp:94 #7 0x00007ffff20599d0 in KisTiledDataManager::purge(QRect const&) (this=0x7fff94013550, area=...) at ./libs/image/tiles3/kis_tiled_data_manager.cc:298 #8 0x00007ffff227af5b in KisDataManager::purge(QRect const&) (this=0x7fff94013550, area=...) at ./libs/image/kis_datamanager.h:133 #9 0x00007ffff2275dc7 in KisPaintDevice::purgeDefaultPixels() (this=0x7fff94003770) at ./libs/image/kis_paint_device.cc:1416 #10 0x00007ffff22d4011 in KisTransformWorker::runPartial(QRect const&) (this=0x7fffa17e7560, processRect=...) at ./libs/image/kis_transform_worker.cc:410 #11 0x00007ffff22d3176 in KisTransformWorker::run() (this=0x7fffa17e7560) at ./libs/image/kis_transform_worker.cc:237 #12 0x00007fffbabf6751 in KisTransformUtils::transformDevice(ToolTransformArgs const&, KisSharedPtr<KisPaintDevice>, KisProcessingVisitor::ProgressHelper*) (config=..., device=..., helper=0x7fffa17e7730) at ./plugins/tools/tool_transform2/kis_transform_utils.cpp:287 #13 0x00007fffbab51b61 in KisTransformMaskAdapter::transformDevice(KisSharedPtr<KisNode>, KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>) const (this=0x55556013a390, node=..., src=..., dst=...) at ./plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp:71 #14 0x00007ffff2198d53 in KisTransformMask::decorateRect(KisSharedPtr<KisPaintDevice>&, KisSharedPtr<KisPaintDevice>&, QRect const&, KisNode::PositionToFilthy) const (this=0x5555607f1a90, src=..., dst=..., rc=..., maskPos=KisNode::N_FILTHY) at ./libs/image/kis_transform_mask.cpp:252 #15 0x00007ffff223a88b in KisMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&, QRect const&, KisNode::PositionToFilthy) const (this=0x5555607f1a90, projection=..., applyRect=..., needRect=..., maskPos=KisNode::N_FILTHY) at ./libs/image/kis_mask.cc:296 #16 0x00007ffff2211fd7 in KisLayer::applyMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&, KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) const (this=0x5555608ec270, source=..., destination=..., requestedRect=..., filthyNode=..., lastNode=...) at ./libs/image/kis_layer.cc:688 #17 0x00007ffff221255b in KisLayer::updateProjection(QRect const&, KisSharedPtr<KisNode>) (this=0x5555608ec270, rect=..., filthyNode=...) at ./libs/image/kis_layer.cc:720 #18 0x00007ffff221b285 in KisLayerProjectionPlane::recalculate(QRect const&, KisSharedPtr<KisNode>) (this=0x5555608d9820, rect=..., filthyNode=...) at ./libs/image/kis_layer_projection_plane.cpp:47 #19 0x00007ffff21b080b in KisAsyncMerger::startMerge(KisBaseRectsWalker&, bool) (this=0x5555608cf2f8, walker=..., notifyClones=true) at ./libs/image/kis_async_merger.cpp:266 #20 0x00007ffff239cb36 in KisUpdateJobItem::runMergeJob() (this=0x5555608cf2b0) at ./obj-x86_64-linux-gnu/libs/image/kritaimage_autogen/EWIEGA46WW/../../../../../libs/image/kis_update_job_item.h:117 #21 0x00007ffff239c981 in KisUpdateJobItem::run() (this=0x5555608cf2b0) at ./obj-x86_64-linux-gnu/libs/image/kritaimage_autogen/EWIEGA46WW/../../../../../libs/image/kis_update_job_item.h:85 #22 0x00007ffff4ee2581 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #23 0x00007ffff4ee629d in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #24 0x00007fffede7c7fc in start_thread (arg=0x7fffa17e8700) at pthread_create.c:465 #25 0x00007ffff45d1b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Hm, at least this backtrace leads to a clear assert.
IÍ„'m unable to reproduce this any more. Did something change?
Wolthera's crash is in the tile manager; yours was an assert, so I'm quite sure it's not the same thing in the end.
The assert should have been fixed when dmitry fixed the lockless hash table. the original backtrace shows a kernel assert when creating threads: I suspect that that has to do with the lockless patches as well because of the conext. Since Dmitry fixed all of that, I'm closing the report.