Bug 442117

Summary: Crash when changing color model and the channels docker is open
Product: [Applications] krita Reporter: Deif Lou <ginoba>
Component: DockersAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: griffinvalley
Priority: NOR    
Version: 5.0.0-beta1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: debugger

Description Deif Lou 2021-09-07 10:26:34 UTC
Created attachment 141356 [details]
debugger

SUMMARY
Krita crashes under these conditions:
* when changing the color model to a model that has less channels and
* the channel docker is open and
* the number of channels in the new model is smaller than the number of displayed items in the docker channel list

Example video: https://www.youtube.com/watch?v=HmLQ6b5OSI4

In the video can be seen that if the number of items in the channels docker list is greater than the number of channels in the new model, Krita crashes.

STEPS TO REPRODUCE
1. Open an image and the channels docker
2. Make sure that the channels docker is big. It should show at least one more channel in the list than tha total number of channels in the new model
3. Change the model to a new one that has less channels

OBSERVED RESULT
Krita crashes

EXPECTED RESULT
Krita should change the model and update the channels docker correctly

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.4
Qt Version: 5.15.2
Comment 1 wolthera 2021-09-07 11:14:25 UTC
Application: Krita (krita), signal: Aborted

[New LWP 1909464]
[New LWP 1909465]
[New LWP 1909466]
[New LWP 1909467]
[New LWP 1909468]
[New LWP 1909737]
[New LWP 1909747]
[New LWP 1909755]
[New LWP 1909760]
[New LWP 1909769]
[New LWP 1909770]
[New LWP 1962487]
[New LWP 1962488]
[New LWP 1962501]
[New LWP 1962502]
[New LWP 1962503]
[New LWP 1962504]
[New LWP 1962505]
[New LWP 1962506]
[New LWP 1963019]
[New LWP 1963020]
[New LWP 1963021]
[New LWP 1963022]
[New LWP 1963032]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe859e90aff in __GI___poll (fds=0x7ffc4c1e9438, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
[Current thread is 1 (Thread 0x7fe854ae5f80 (LWP 1909443))]

Thread 25 (Thread 0x7fe846849700 (LWP 1963032)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe846848c90, clockid=<optimized out>, expected=0, futex_word=0x7fe7a0036210) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe846848c90, clockid=<optimized out>, mutex=0x7fe7a00361c0, cond=0x7fe7a00361e8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x7fe7a00361e8, mutex=0x7fe7a00361c0, abstime=0x7fe846848c90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 24 (Thread 0x7fe7c1ffb700 (LWP 1963022)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c1ffac90, clockid=<optimized out>, expected=0, futex_word=0x55679dbaf434) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c1ffac90, clockid=<optimized out>, mutex=0x55679dbaf3e0, cond=0x55679dbaf408) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55679dbaf408, mutex=0x55679dbaf3e0, abstime=0x7fe7c1ffac90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 23 (Thread 0x7fe7c3fff700 (LWP 1963021)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c3ffec90, clockid=<optimized out>, expected=0, futex_word=0x55679b911b94) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c3ffec90, clockid=<optimized out>, mutex=0x55679b911b40, cond=0x55679b911b68) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55679b911b68, mutex=0x55679b911b40, abstime=0x7fe7c3ffec90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 22 (Thread 0x7fe7c2ffd700 (LWP 1963020)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c2ffcc90, clockid=<optimized out>, expected=0, futex_word=0x55679b3dba20) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c2ffcc90, clockid=<optimized out>, mutex=0x55679b3db9d0, cond=0x55679b3db9f8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55679b3db9f8, mutex=0x55679b3db9d0, abstime=0x7fe7c2ffcc90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 21 (Thread 0x7fe7c0ff9700 (LWP 1963019)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c0ff8c90, clockid=<optimized out>, expected=0, futex_word=0x7fe7a00056e4) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c0ff8c90, clockid=<optimized out>, mutex=0x7fe7a0005690, cond=0x7fe7a00056b8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x7fe7a00056b8, mutex=0x7fe7a0005690, abstime=0x7fe7c0ff8c90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 20 (Thread 0x7fe82ae9c700 (LWP 1962506)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe82ae9bc90, clockid=<optimized out>, expected=0, futex_word=0x5567966ef174) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe82ae9bc90, clockid=<optimized out>, mutex=0x5567966ef120, cond=0x5567966ef148) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567966ef148, mutex=0x5567966ef120, abstime=0x7fe82ae9bc90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 19 (Thread 0x7fe82bfff700 (LWP 1962505)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe82bffec90, clockid=<optimized out>, expected=0, futex_word=0x5567966f4070) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe82bffec90, clockid=<optimized out>, mutex=0x5567966f4020, cond=0x5567966f4048) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567966f4048, mutex=0x5567966f4020, abstime=0x7fe82bffec90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 18 (Thread 0x7fe7df7ff700 (LWP 1962504)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7df7fec90, clockid=<optimized out>, expected=0, futex_word=0x5567966f1670) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7df7fec90, clockid=<optimized out>, mutex=0x5567966f1620, cond=0x5567966f1648) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567966f1648, mutex=0x5567966f1620, abstime=0x7fe7df7fec90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 17 (Thread 0x7fe7c27fc700 (LWP 1962503)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c27fbc90, clockid=<optimized out>, expected=0, futex_word=0x5567966f0000) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c27fbc90, clockid=<optimized out>, mutex=0x5567966effb0, cond=0x5567966effd8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567966effd8, mutex=0x5567966effb0, abstime=0x7fe7c27fbc90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 16 (Thread 0x7fe7c9e06700 (LWP 1962502)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c9e05c90, clockid=<optimized out>, expected=0, futex_word=0x55679684a180) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c9e05c90, clockid=<optimized out>, mutex=0x55679684a130, cond=0x55679684a158) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55679684a158, mutex=0x55679684a130, abstime=0x7fe7c9e05c90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 15 (Thread 0x7fe7dcdfb700 (LWP 1962501)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7dcdfac90, clockid=<optimized out>, expected=0, futex_word=0x5567969a1a60) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7dcdfac90, clockid=<optimized out>, mutex=0x5567969a1a10, cond=0x5567969a1a38) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567969a1a38, mutex=0x5567969a1a10, abstime=0x7fe7dcdfac90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 14 (Thread 0x7fe7c37fe700 (LWP 1962488)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7c37fdc90, clockid=<optimized out>, expected=0, futex_word=0x5567966ee7c0) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7c37fdc90, clockid=<optimized out>, mutex=0x5567966ee770, cond=0x5567966ee798) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567966ee798, mutex=0x5567966ee770, abstime=0x7fe7c37fdc90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 13 (Thread 0x7fe7ca607700 (LWP 1962487)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fe7ca606c90, clockid=<optimized out>, expected=0, futex_word=0x5567967210e0) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fe7ca606c90, clockid=<optimized out>, mutex=0x556796721090, cond=0x5567967210b8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x5567967210b8, mutex=0x556796721090, abstime=0x7fe7ca606c90) at pthread_cond_wait.c:656
#3  0x00007fe85a23deb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a23b3c1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 12 (Thread 0x7fe7cae08700 (LWP 1909770)):
#0  0x00007fe859e90aff in __GI___poll (fds=0x7fe7c4004280, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe8574db36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 11 (Thread 0x7fe7cb609700 (LWP 1909769)):
#0  0x00007fe859e90aff in __GI___poll (fds=0x7fe7bc005240, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe8574db36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 0x7fe7ec9cd700 (LWP 1909760)):
#0  0x00007fe859e90aff in __GI___poll (fds=0x7fe7d8005210, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe8574db36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe845a4a3ba in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#7  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7fe808c5b700 (LWP 1909755)):
#0  0x00007fe859e90aff in __GI___poll (fds=0x7fe7e4003ec0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe8574db36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe845795559 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7fe7ee8af700 (LWP 1909747)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fe85a23a340 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fe85a23a1a6 in QSemaphore::tryAcquire(int, int) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fe85b8804a7 in KisTileDataSwapper::waitForWork() (this=<optimized out>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:74
#4  0x00007fe85b8806aa in KisTileDataSwapper::run() (this=0x7fe85bdcbca0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:80
#5  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7fe80a839700 (LWP 1909737)):
#0  0x00007fe85a2382e0 in QMutex::lock() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007fe85a478ec2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fe8574da8ef in g_main_context_prepare () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe8574db29b in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7fe837fff700 (LWP 1909468)):
#0  0x00007fe8574d78ed in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fe8574d9345 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe8574da82b in g_main_context_prepare () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe8574db29b in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe85a478fcb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe85a236c22 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fe8572aaf4b in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007fe85a237dbc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fe844ea1700 (LWP 1909467)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fe84c0064c8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fe84c006478, cond=0x7fe84c0064a0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x7fe84c0064a0, mutex=0x7fe84c006478) at pthread_cond_wait.c:638
#3  0x00007fe851c21e7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fe851c21a7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fe851848700 (LWP 1909466)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fe84c0064c8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fe84c006478, cond=0x7fe84c0064a0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x7fe84c0064a0, mutex=0x7fe84c006478) at pthread_cond_wait.c:638
#3  0x00007fe851c21e7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fe851c21a7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fe851047700 (LWP 1909465)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fe84c0064c8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fe84c006478, cond=0x7fe84c0064a0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x7fe84c0064a0, mutex=0x7fe84c006478) at pthread_cond_wait.c:638
#3  0x00007fe851c21e7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fe851c21a7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fe850846700 (LWP 1909464)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fe84c0064c8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fe84c006478, cond=0x7fe84c0064a0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x7fe84c0064a0, mutex=0x7fe84c006478) at pthread_cond_wait.c:638
#3  0x00007fe851c21e7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007fe851c21a7b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007fe857e58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fe859e9d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fe854ae5f80 (LWP 1909443)):
[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00007fe859da0859 in __GI_abort () at abort.c:79
#6  0x00007fe85a1fcbf7 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fe85a1fc062 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fe80b00d4ef in QList<KoChannelInfo*>::at(int) const (i=4, this=0x7ffc4c1ea4f8) at /home/wolthera/krita/src/plugins/dockers/channeldocker/channelmodel.cpp:57
#9  ChannelModel::data(QModelIndex const&, int) const (this=0x55679df7f2c0, index=..., role=0) at /home/wolthera/krita/src/plugins/dockers/channeldocker/channelmodel.cpp:45
#10 0x00007fe85b195d38 in QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007fe85b194c40 in QStyledItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fe85b1bfda0 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007fe85b1c65ef in QTableView::paintEvent(QPaintEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fe85af3bcf6 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fe85afec092 in QFrame::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fe85b176972 in QAbstractItemView::viewportEvent(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fe85a41e4c3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fe85aef8db2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fe85af01bb8 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007fe85c68394d in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55679df21d00, event=0x7ffc4c1eb100) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:701
#21 0x00007fe85a41e75a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007fe85af340aa in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007fe85af348d2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007fe85af0b427 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007fe85af0bf44 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fe85af35775 in QWidgetPrivate::syncBackingStore() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007fe85af3c6ec in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fe85b054a58 in QMainWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007fe858c4120b in KMainWindow::event(QEvent*) (this=this@entry=0x55679e1bf060, ev=ev@entry=0x5567a238b140) at /home/wolthera/krita/src/libs/widgetutils/xmlgui/kmainwindow.cpp:753
#30 0x00007fe858c8367d in KXmlGuiWindow::event(QEvent*) (this=0x55679e1bf060, ev=0x5567a238b140) at /home/wolthera/krita/src/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:113
#31 0x00007fe85aef8dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007fe85af01bb8 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007fe85c68394d in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55679e1bf060, event=0x5567a238b140) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:701
#34 0x00007fe85a41e75a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007fe85a421061 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007fe85a479957 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007fe8574db17d in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fe8574db400 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fe8574db4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fe85a478fb2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007fe85a41d25b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007fe85a425414 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x0000556794d87320 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/wolthera/krita/src/krita/main.cc:677
[Inferior 1 (process 1909443) detached]
Comment 2 wolthera 2021-09-07 11:26:11 UTC
Git commit 1eaf9dc7f624ef29d6358c243dd25437adb890b1 by Wolthera van Hövell tot Westerflier.
Committed on 07/09/2021 at 11:26.
Pushed by woltherav into branch 'krita/5.0'.

Check that the model index is beneath colorchannel count.

It seems the real bug is that the thumbnails/model can take a bit to
update when generating the thumbnails, while the model/view is faster.
In this time, we shouldn't try to access information that doesn't exist.

M  +23   -20   plugins/dockers/channeldocker/channelmodel.cpp

https://invent.kde.org/graphics/krita/commit/1eaf9dc7f624ef29d6358c243dd25437adb890b1
Comment 3 wolthera 2021-09-07 11:26:33 UTC
Git commit 372ad5104492e09eaaf85308572fe0def40b0f55 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 07/09/2021 at 11:26.
Pushed by woltherav into branch 'master'.

Check that the model index is beneath colorchannel count.

It seems the real bug is that the thumbnails/model can take a bit to
update when generating the thumbnails, while the model/view is faster.
In this time, we shouldn't try to access information that doesn't exist.


(cherry picked from commit 1eaf9dc7f624ef29d6358c243dd25437adb890b1)

M  +23   -20   plugins/dockers/channeldocker/channelmodel.cpp

https://invent.kde.org/graphics/krita/commit/372ad5104492e09eaaf85308572fe0def40b0f55