ASSERT with selections
Closed, ResolvedPublic

Description

ASSERT: "!this->isEmpty()" in file ../../include/QtCore/../../src/corelib/tools/qstack.h, line 56

I am not sure if this is due to the intel device, or due the layerstack changes.

To reproduce: make a selection with the path tool, or freehand path. Doesn't always occur.

woltherav created this task.Jan 3 2016, 7:04 PM
woltherav updated the task description. (Show Details)
woltherav raised the priority of this task from to High.
woltherav moved this task to Krita 3.0 Regressions on the Krita board.
woltherav added subscribers: woltherav, dkazakov, rempt.

I got a random crash on Windows when making a selection recently, I bet it is due to the same issue.

rempt added a comment.Jan 4 2016, 7:47 PM

do you have the full backtrace?

I didn't on the intel laptop, but suddenly, I seem to have something on my desktop that seems to be the same problem:
(#10 0x00007f3a7513561d in qt_assert (assertion=0x7f3a75542376 "!this->isEmpty()", file=0x7f3a75542340 "../../include/QtCore/../../src/corelib/tools/qstack.h", line=56) at global/qglobal.cpp:3046)

Application: krita (krita), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3a77488800 (LWP 27755))]

Thread 9 (Thread 0x7f3a64ca6700 (LWP 27756)):
#0  0x00007f3a7482d8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f3a73166bd2 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f3a7316874f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f3a670c5cb9 in QXcbEventReader::run (this=0x2333a10) at qxcbconnection.cpp:1249
#4  0x00007f3a7515688a in QThreadPrivate::start (arg=0x2333a10) at thread/qthread_unix.cpp:329
#5  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a64ca6700) at pthread_create.c:333
#6  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7f3a5c140700 (LWP 27757)):
#0  0x00007f3a7482f743 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f3a7541b66a in qt_safe_select (nfds=10, fdread=0x7f3a54000a78, fdwrite=0x7f3a54000d08, fdexcept=0x7f3a54000f98, orig_timeout=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f3a7541ce22 in QEventDispatcherUNIX::select (this=0x7f3a540008c0, nfds=10, readfds=0x7f3a54000a78, writefds=0x7f3a54000d08, exceptfds=0x7f3a54000f98, timeout=0x0) at kernel/qeventdispatcher_unix.cpp:320
#3  0x00007f3a7541c5a8 in QEventDispatcherUNIXPrivate::doSelect (this=0x7f3a540008e0, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f3a7541e1b4 in QEventDispatcherUNIX::processEvents (this=0x7f3a540008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f3a7539bbfe in QEventLoop::processEvents (this=0x7f3a5c13fd40, flags=...) at kernel/qeventloop.cpp:128
#6  0x00007f3a7539bf35 in QEventLoop::exec (this=0x7f3a5c13fd40, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f3a7514e2ad in QThread::exec (this=0x7f3a6d64fd60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:503
#8  0x00007f3a6d5b23d9 in QDBusConnectionManager::run (this=0x7f3a6d64fd60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:152
#9  0x00007f3a7515688a in QThreadPrivate::start (arg=0x7f3a6d64fd60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:329
#10 0x00007f3a6f77a6aa in start_thread (arg=0x7f3a5c140700) at pthread_create.c:333
#11 0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f3a45d70700 (LWP 27765)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f3a7515812c in QWaitConditionPrivate::wait (this=0x3d609d0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2  0x00007f3a75157ea4 in QWaitCondition::wait (this=0x3d59f38, mutex=0x3d59f30, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f3a7514d063 in QSemaphore::acquire (this=0x7f3a731554f0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+16>, n=1) at thread/qsemaphore.cpp:137
#4  0x00007f3a72cbad2e in KisTileDataPooler::waitForWork (this=0x7f3a731554e0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/wolthera/kf5/src/krita/krita/image/tiles3/kis_tile_data_pooler.cc:165
#5  0x00007f3a72cbb4e1 in KisTileDataPooler::run (this=0x7f3a731554e0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/wolthera/kf5/src/krita/krita/image/tiles3/kis_tile_data_pooler.cc:187
#6  0x00007f3a7515688a in QThreadPrivate::start (arg=0x7f3a731554e0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at thread/qthread_unix.cpp:329
#7  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a45d70700) at pthread_create.c:333
#8  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f3a3ffff700 (LWP 27766)):
#0  0x00007f3a747fcc4d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f3a7525c966 in qt_nanosleep (amount=...) at tools/qelapsedtimer_unix.cpp:185
#2  0x00007f3a75156c44 in QThread::msleep (msecs=700) at thread/qthread_unix.cpp:468
#3  0x00007f3a72cd620a in KisTileDataSwapper::run (this=0x7f3a73155520 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/wolthera/kf5/src/krita/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#4  0x00007f3a7515688a in QThreadPrivate::start (arg=0x7f3a73155520 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at thread/qthread_unix.cpp:329
#5  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a3ffff700) at pthread_create.c:333
#6  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f3a5078b700 (LWP 27767)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f3a7515812c in QWaitConditionPrivate::wait (this=0x41404c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:136
#2  0x00007f3a75157ea4 in QWaitCondition::wait (this=0x4140130, mutex=0x4140128, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f3a762a1469 in QFileInfoGatherer::run (this=0x4140118) at dialogs/qfileinfogatherer.cpp:211
#4  0x00007f3a7515688a in QThreadPrivate::start (arg=0x4140118) at thread/qthread_unix.cpp:329
#5  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a5078b700) at pthread_create.c:333
#6  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f3a2a98f700 (LWP 29931)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f3a751580d0 in QWaitConditionPrivate::wait_relative (this=0x8b4f700, time=30000) at thread/qwaitcondition_unix.cpp:126
#2  0x00007f3a75158110 in QWaitConditionPrivate::wait (this=0x8b4f700, time=30000) at thread/qwaitcondition_unix.cpp:134
#3  0x00007f3a75157ea4 in QWaitCondition::wait (this=0x8b37980, mutex=0x8b365e0, time=30000) at thread/qwaitcondition_unix.cpp:208
#4  0x00007f3a7514fc23 in QThreadPoolThread::run (this=0x8b37970) at thread/qthreadpool.cpp:127
#5  0x00007f3a7515688a in QThreadPrivate::start (arg=0x8b37970) at thread/qthread_unix.cpp:329
#6  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a2a98f700) at pthread_create.c:333
#7  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f3a1cffa700 (LWP 29962)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f3a751580d0 in QWaitConditionPrivate::wait_relative (this=0xb708ec0, time=30000) at thread/qwaitcondition_unix.cpp:126
#2  0x00007f3a75158110 in QWaitConditionPrivate::wait (this=0xb708ec0, time=30000) at thread/qwaitcondition_unix.cpp:134
#3  0x00007f3a75157ea4 in QWaitCondition::wait (this=0xc785e50, mutex=0x7aea110, time=30000) at thread/qwaitcondition_unix.cpp:208
#4  0x00007f3a7514fc23 in QThreadPoolThread::run (this=0xc785e40) at thread/qthreadpool.cpp:127
#5  0x00007f3a7515688a in QThreadPrivate::start (arg=0xc785e40) at thread/qthread_unix.cpp:329
#6  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a1cffa700) at pthread_create.c:333
#7  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f3a1ffff700 (LWP 29963)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f3a751580d0 in QWaitConditionPrivate::wait_relative (this=0x7f3a140b8110, time=30000) at thread/qwaitcondition_unix.cpp:126
#2  0x00007f3a75158110 in QWaitConditionPrivate::wait (this=0x7f3a140b8110, time=30000) at thread/qwaitcondition_unix.cpp:134
#3  0x00007f3a75157ea4 in QWaitCondition::wait (this=0x7f3a14122640, mutex=0x7aea110, time=30000) at thread/qwaitcondition_unix.cpp:208
#4  0x00007f3a7514fc23 in QThreadPoolThread::run (this=0x7f3a14122630) at thread/qthreadpool.cpp:127
#5  0x00007f3a7515688a in QThreadPrivate::start (arg=0x7f3a14122630) at thread/qthread_unix.cpp:329
#6  0x00007f3a6f77a6aa in start_thread (arg=0x7f3a1ffff700) at pthread_create.c:333
#7  0x00007f3a74838eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f3a77488800 (LWP 27755)):
[KCrash Handler]
#6  0x00007f3a74767267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7  0x00007f3a74768eca in __GI_abort () at abort.c:89
#8  0x00007f3a75140c69 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1610
#9  0x00007f3a7513cf12 in QMessageLogger::fatal (this=0x7fffda388030, msg=0x7f3a754936d0 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:784
#10 0x00007f3a7513561d in qt_assert (assertion=0x7f3a75542376 "!this->isEmpty()", file=0x7f3a75542340 "../../include/QtCore/../../src/corelib/tools/qstack.h", line=56) at global/qglobal.cpp:3046
#11 0x00007f3a7533f564 in QStack<QAbstractItemModelPrivate::Change>::pop (this=0x432c1d0) at ../../include/QtCore/../../src/corelib/tools/qstack.h:56
#12 0x00007f3a75339c39 in QAbstractItemModel::endRemoveRows (this=0x432c070) at itemmodels/qabstractitemmodel.cpp:2676
#13 0x00007f3a76dcaa79 in KisNodeModel::slotEndRemoveDummy (this=0x432c070) at /home/wolthera/kf5/src/krita/krita/ui/kis_node_model.cpp:343
#14 0x00007f3a7702e4e5 in KisNodeModel::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/wolthera/kf5/build/krita/ui/moc_kis_node_model.cpp:139
#15 0x00007f3a753e45f0 in QMetaObject::activate (sender=0x7a967d0, signalOffset=3, local_signal_index=5, argv=0x0) at kernel/qobject.cpp:3730
#16 0x00007f3a753e3dd6 in QMetaObject::activate (sender=0x7a967d0, m=0x7f3a774093e0 <KisDummiesFacadeBase::staticMetaObject>, local_signal_index=5, argv=0x0) at kernel/qobject.cpp:3595
#17 0x00007f3a77022a23 in KisDummiesFacadeBase::sigEndRemoveDummy (this=this@entry=0x7a967d0) at /home/wolthera/kf5/build/krita/ui/moc_kis_dummies_facade_base.cpp:279
#18 0x00007f3a76d3b671 in KisDummiesFacadeBase::slotContinueRemoveNode (this=0x7a967d0, node=...) at /home/wolthera/kf5/src/krita/krita/ui/flake/kis_dummies_facade_base.cpp:155
#19 0x00007f3a7702de66 in KisDummiesFacadeBase::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/wolthera/kf5/build/krita/ui/moc_kis_dummies_facade_base.cpp:148
#20 0x00007f3a753dc523 in QMetaCallEvent::placeMetaCall (this=0x7f3a10117020, object=0x7a967d0) at kernel/qobject.cpp:495
#21 0x00007f3a753dd6e9 in QObject::event (this=0x7a967d0, e=0x7f3a10117020) at kernel/qobject.cpp:1256
#22 0x00007f3a75fc8b50 in QApplicationPrivate::notify_helper (this=0x2312510, receiver=0x7a967d0, e=0x7f3a10117020) at kernel/qapplication.cpp:3717
#23 0x00007f3a75fc60fd in QApplication::notify (this=0x7fffda388d90, receiver=0x7a967d0, e=0x7f3a10117020) at kernel/qapplication.cpp:3160
#24 0x00007f3a76f80157 in KisApplication::notify (this=<optimized out>, receiver=0x7a967d0, event=0x7f3a10117020) at /home/wolthera/kf5/src/krita/krita/ui/KisApplication.cpp:539
#25 0x00007f3a7539f687 in QCoreApplication::notifyInternal2 (receiver=0x7a967d0, event=0x7f3a10117020) at kernel/qcoreapplication.cpp:1002
#26 0x00007f3a753a3970 in QCoreApplication::sendEvent (receiver=0x7a967d0, event=0x7f3a10117020) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227
#27 0x00007f3a753a0b27 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x2276c60) at kernel/qcoreapplication.cpp:1636
#28 0x00007f3a7541e06a in QEventDispatcherUNIX::processEvents (this=0x235a210, flags=...) at kernel/qeventdispatcher_unix.cpp:579
#29 0x00007f3a6716b7fc in QUnixEventDispatcherQPA::processEvents (this=0x235a210, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#30 0x00007f3a7539bbfe in QEventLoop::processEvents (this=0x7fffda388bb0, flags=...) at kernel/qeventloop.cpp:128
#31 0x00007f3a7539bf35 in QEventLoop::exec (this=0x7fffda388bb0, flags=...) at kernel/qeventloop.cpp:204
#32 0x00007f3a7539fe7d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1272
#33 0x00007f3a757d25b2 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1561
#34 0x00007f3a75fc5aad in QApplication::exec () at kernel/qapplication.cpp:2976
#35 0x0000000000402f49 in main (argc=1, argv=0x7fffda388ef8) at /home/wolthera/kf5/src/krita/krita/main.cc:173
rempt added a comment.Jan 4 2016, 9:15 PM

Okay, that's definitely not display driver related, must be something with layer handling, so let's ping dmitry about it.

I'm wondering how "Creation of a selection" can remove nodes? As far as I know it can only add a selection mask. It can also remove it (Deselect) if you just click on the canvas. But still I cannot reproduce the bug :(

rempt closed this task as Resolved.Sep 26 2016, 2:24 PM
rempt claimed this task.

This is probably fixed since then -- the code at line 343 doesn't look like this anymore.