Bug 461436

Summary: Krita segfault after several copy-from-old-file-to-new operations
Product: [Applications] krita Reporter: Elka <eshilina03>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: dimula73, tamtamy.tymona
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Elka 2022-11-04 19:46:55 UTC
Application: krita (5.1.2)

Qt Version: 5.15.7
Frameworks Version: 5.99.0
Operating System: Linux 6.0.6-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.26.2 [KCrashBackend]

-- Information about the crash:
Krita 5.1.2-1
Wayland
Three monitors: 4K Huawei MateView28, Laptop FHD screen and Screen drawing tablet Huion Kamvas 13(mirrored with laptop screen)

Reproduce a bug:
* open some krita document
* create new document
* copy some region from old document to new several times
After some short time it krashes

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f90792dd4dd in QSortFilterProxyModel::data(QModelIndex const&, int) const () at /usr/lib/libQt5Core.so.5
#5  0x00007f9034cef025 in  () at /usr/lib/kritaplugins/kritalayerdocker.so
#6  0x00007f9034ce550a in  () at /usr/lib/kritaplugins/kritalayerdocker.so
#7  0x00007f9079334c00 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f9079334c00 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007f9079336faf in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#10 0x00007f9079327b86 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#11 0x00007f9079d78b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f907afdcd8f in KisApplication::notify(QObject*, QEvent*) () at /usr/lib/libkritaui.so.18
#13 0x00007f9079303f98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#14 0x00007f907934e493 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#15 0x00007f907934ead2 in  () at /usr/lib/libQt5Core.so.5
#16 0x00007f90769a387b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#17 0x00007f90769fa279 in  () at /usr/lib/libglib-2.0.so.0
#18 0x00007f90769a2132 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#19 0x00007f907934ec4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#20 0x00007f90792fc73c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#21 0x00007f9079307269 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#22 0x000055ab0a85789f in  ()
#23 0x00007f9078c5c290 in  () at /usr/lib/libc.so.6
#24 0x00007f9078c5c34a in __libc_start_main () at /usr/lib/libc.so.6
#25 0x000055ab0a859a55 in  ()
[Inferior 1 (process 349914) detached]

Reported using DrKonqi
Comment 1 Tiar 2022-11-05 01:03:22 UTC
Can you please download Krita Next from the website and see if you can reproduce the crash? If not, it's very likely it's a duplicate of bug 459510 and that commit (that reverts previous commit) just needs to be backported.

It wasn't backported because Lynx3d didn't find the offending commit on krita/5.1, because it has a wrong commit message.
Bad commit on master: https://invent.kde.org/graphics/krita/-/commit/9b7318c13298e2fc52b52ac0d760a62152d4a838
Bad commit on krita/5.1: https://invent.kde.org/graphics/krita/-/commit/f6389225
Unrelated commit with the same commit message: https://invent.kde.org/graphics/krita/-/commit/5b52e54952280f49d89476d2711a746005a67462

Commit that reverts the bad commit on master: https://invent.kde.org/graphics/krita/-/commit/eda2d6fbc2ad4949ee96c4ab3f6f10d39a1b422c
And there is no commit that reverts it on krita/5.1 .
Comment 2 Tiar 2022-11-05 03:10:44 UTC
Git commit a943b8c708f8a1c921940aea42829c94476f1cbd by Agata Cacko, on behalf of Mathias Wein.
Committed on 05/11/2022 at 03:07.
Pushed by tymond into branch 'krita/5.1'.

Revert "Make sure that thumbnails are generated from exactBounds()"

This reverts commit 9b7318c13298e2fc52b52ac0d760a62152d4a838.
(Note: commit 9b7318c13298e2f is the commit from master.
On krita/5.1, it reverts commit f6389225, which has an incorrect
commit message but is the same commit as the one mentioned).
Related: bug 459510

(cherry picked from commit eda2d6fbc2ad4949ee96c4ab3f6f10d39a1b422c)

M  +1    -1    libs/image/kis_paint_device.cc
M  +4    -15   plugins/dockers/layerdocker/LayerBox.cpp
M  +1    -5    plugins/dockers/layerdocker/LayerBox.h

https://invent.kde.org/graphics/krita/commit/a943b8c708f8a1c921940aea42829c94476f1cbd
Comment 3 Elka 2022-11-05 11:09:52 UTC
Hello, Tiar!
Yes, `krita-5.2.0-prealpha-c64143d85e-x86_64.appimage` from nightly builds has it fixed.
Comment 4 Bug Janitor Service 2022-11-06 05:07:53 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Dmitry Kazakov 2022-11-11 13:13:31 UTC

*** This bug has been marked as a duplicate of bug 459510 ***