Bug 504473

Summary: Krita crashes GNOME desktop environment
Product: [Applications] krita Reporter: random_bozo <kirith400>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: 5.2.9   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description random_bozo 2025-05-18 14:48:43 UTC
SUMMARY
Krita randomly, after a couple minutes of use, crashes and brings down GNOME DE with it. 

STEPS TO REPRODUCE
1. Open krita
2. Use it for couple of minutes

OBSERVED RESULT
Black screen then gnome login screen. Gnome session terminated.

EXPECTED RESULT
Doesn't do that. 

SOFTWARE/OS VERSIONS
OS: Arch Linux
Kernel: Linux 6.14.4-arch1-2
DE: GNOME 48 on Wayland

ADDITIONAL INFORMATION
COREDUMP BACKTRACE:
```
#0  QHash<QString, QCache<QString, QIcon>::Node>::findNode (ahp=0x0, this=0x10, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:940
#1  QHash<QString, QCache<QString, QIcon>::Node>::contains (this=0x10, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:920
#2  QCache<QString, QIcon>::contains (this=0x0, key=...) at ../../include/QtCore/../../src/corelib/tools/qcache.h:108
#3  QIcon::fromTheme (name=...) at image/qicon.cpp:1305
#4  0x00007078b49ab352 in KGuiItem::icon (this=this@entry=0x7fffda54a180) at /usr/src/debug/kwidgetsaddons5/kwidgetsaddons-5.116.0/src/kguiitem.cpp:105
#5  0x00007078b49aba1c in KGuiItem::assign (button=button@entry=0x5a61f9f10460, item=...) at /usr/src/debug/kwidgetsaddons5/kwidgetsaddons-5.116.0/src/kguiitem.cpp:175
#6  0x00007078b535a81d in KoDialogPrivate::appendButton (this=this@entry=0x5a61f89c9de0, key=key@entry=KoDialog::Ok, item=...)
    at /usr/src/debug/krita/krita-5.2.9/libs/widgets/KoDialog.cpp:146
#7  0x00007078b535b011 in KoDialog::setButtons (this=this@entry=0x7fffda54a370, buttonMask=..., buttonMask@entry=...) at /usr/src/debug/krita/krita-5.2.9/libs/widgets/KoDialog.cpp:244
#8  0x00007078b535b32a in KoDialogPrivate::init (this=<optimized out>, q=q@entry=0x7fffda54a370) at /usr/src/debug/krita/krita-5.2.9/libs/widgets/KoDialog.cpp:165
#9  0x00007078b535b4d6 in KoDialog::KoDialog (this=<optimized out>, parent=<optimized out>, flags=..., this=<optimized out>, parent=<optimized out>, flags=...)
    at /usr/src/debug/krita/krita-5.2.9/libs/widgets/KoDialog.cpp:180
#10 0x00007078b79ac5b6 in KisDelayedSaveDialog::KisDelayedSaveDialog (this=<optimized out>, image=..., type=<optimized out>, busyWait=<optimized out>, parent=<optimized out>,
    this=<optimized out>, image=..., type=<optimized out>, busyWait=<optimized out>, parent=<optimized out>) at /usr/include/qt/QtCore/qflags.h:120
#11 0x00007078b7d03f03 in (anonymous namespace)::busyWaitWithFeedback (image=...) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisPart.cpp:140
#12 0x00007078b7cfcea9 in std::__invoke_impl<void, void (*&)(KisSharedPtr<KisImage>), KisSharedPtr<KisImage> > (__f=<optimized out>) at /usr/include/c++/14.2.1/bits/invoke.h:61
#13 std::__invoke_r<void, void (*&)(KisSharedPtr<KisImage>), KisSharedPtr<KisImage> > (__fn=<optimized out>) at /usr/include/c++/14.2.1/bits/invoke.h:111
#14 std::_Function_handler<void(KisSharedPtr<KisImage>), void (*)(KisSharedPtr<KisImage>)>::_M_invoke (__functor=..., __args#0=...) at /usr/include/c++/14.2.1/bits/std_function.h:290
#15 0x00007078b729d0fa in std::function<void(KisSharedPtr<KisImage>)>::operator() (this=0x5a61f5e666e8, __args#0=...) at /usr/include/c++/14.2.1/bits/std_function.h:591
#16 KisBusyWaitBroker::notifyWaitOnImageStarted (this=<optimized out>, image=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/libs/image/KisBusyWaitBroker.cpp:61
#17 0x00007078b73079b8 in KisImage::waitForDone (this=0x5a61f6550050) at /usr/src/debug/krita/krita-5.2.9/libs/image/kis_image.cc:1877
#18 0x00007078b7cb884d in KisDocument::~KisDocument (this=<optimized out>, this=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:686
#19 0x00007078b7d027c4 in KisDocument::~KisDocument (this=<optimized out>, this=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:646
#20 KisPart::~KisPart (this=<optimized out>, this=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisPart.cpp:178
#21 0x00007078b7d0343e in (anonymous namespace)::Q_QGS_s_instance::innerFunction()::Holder::~Holder() () at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisPart.cpp:85
#22 0x00007078b54505e1 in __run_exit_handlers (status=status@entry=1, listp=0x7078b55f6680 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
    at exit.c:118
#23 0x00007078b54506be in __GI_exit (status=status@entry=1) at exit.c:148
#24 0x00007078b58fa6cb in _XDefaultIOError (dpy=0x5a61f3f9ba80) at /usr/src/debug/libx11/libX11-1.8.12/src/XlibInt.c:1308
#25 0x00007078b58fd75c in _XIOError (dpy=dpy@entry=0x5a61f3f9ba80) at /usr/src/debug/libx11/libX11-1.8.12/src/XlibInt.c:1539
#26 0x00007078b5901baf in _XEventsQueued (dpy=0x5a61f3f9ba80, mode=<optimized out>) at /usr/src/debug/libx11/libX11-1.8.12/src/xcb_io.c:444
#27 0x00007078b58f2eb2 in XPending (dpy=0x5a61f3f9ba80) at /usr/src/debug/libx11/libX11-1.8.12/src/Pending.c:55
#28 0x00007078aee90d60 in ?? () from /usr/lib/libgdk-3.so.0
#29 0x00007078b3707149 in g_main_context_check_unlocked (context=0x5a61f3ec4060, max_priority=<optimized out>, fds=<optimized out>, n_fds=<optimized out>) at ../glib/glib/gmain.c:4136
#30 0x00007078b3769ceb in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5a61f3ec4060, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/glib/gmain.c:4311
#31 0x00007078b3705615 in g_main_context_iteration (context=0x5a61f3ec4060, may_block=1) at ../glib/glib/gmain.c:4379
#32 0x00007078b5cff72f in QEventDispatcherGlib::processEvents (this=0x5a61f43004e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007078b5ca80dc in QEventLoop::exec (this=0x7fffda54a950, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007078b5cb45dd in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x00007078b612f87f in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#36 0x00007078b6955a2a in QApplication::exec () at kernel/qapplication.cpp:2832
#37 0x00005a61ba86f009 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/krita/main.cc:794
```
SYSTEM LOG:
```
May 18 17:11:12 Archie gnome-shell[10043]: **
May 18 17:11:12 Archie gnome-shell[10043]: libmutter:ERROR:../mutter/src/wayland/meta-wayland-pointer-constraints.c:565:meta_wayland_pointer_constraint_deactivate: code should not be reached
May 18 17:11:12 Archie gnome-shell[10043]: Bail out! libmutter:ERROR:../mutter/src/wayland/meta-wayland-pointer-constraints.c:565:meta_wayland_pointer_constraint_deactivate: code should not be reached
```
Comment 1 Halla Rempt 2025-05-27 08:49:25 UTC
Does this also happen with the appimage? If not, it's likely something went wrong with the arch build of Krita or its dependencies.
Comment 2 random_bozo 2025-05-29 11:05:10 UTC
(In reply to Halla Rempt from comment #1)
> Does this also happen with the appimage? If not, it's likely something went
> wrong with the arch build of Krita or its dependencies.

Yes, same thing happens with the appimage and also the flatpak version.
Comment 3 random_bozo 2025-05-29 23:46:47 UTC
(In reply to random_bozo from comment #2)
> (In reply to Halla Rempt from comment #1)
> > Does this also happen with the appimage? If not, it's likely something went
> > wrong with the arch build of Krita or its dependencies.
> 
> Yes, same thing happens with the appimage and also the flatpak version.

So... after a dozen or so crashes krita freezes on the splashscreen and wont start at all anymore.
Here the console log when starting the arch package version:
```
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc"
Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc"
Loading plugin "/usr/lib/kritaplugins/kritaseexprgenerator.so" failed,  "Cannot load library /usr/lib/kritaplugins/kritaseexprgenerator.so: (libKSeExprUI.so.4: cannot open shared object file: No such file or directory)"
Loading plugin "/usr/lib/kritaplugins/kritamypaintop.so" failed,  "Cannot load library /usr/lib/kritaplugins/kritamypaintop.so: (libmypaint.so.0: cannot open shared object file: No such file or directory)"
zsh: killed     krita
```

Here the console log for the  appimage version:
```
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
NOT COOL: Duplicated action name from xml data:  "object_order_raise"
NOT COOL: Duplicated action name from xml data:  "object_align_horizontal_right"
NOT COOL: Duplicated action name from xml data:  "object_ungroup"
NOT COOL: Duplicated action name from xml data:  "object_order_back"
NOT COOL: Duplicated action name from xml data:  "object_order_front"
NOT COOL: Duplicated action name from xml data:  "object_align_vertical_center"
NOT COOL: Duplicated action name from xml data:  "object_group"
NOT COOL: Duplicated action name from xml data:  "object_align_horizontal_left"
NOT COOL: Duplicated action name from xml data:  "object_align_vertical_top"
NOT COOL: Duplicated action name from xml data:  "object_align_horizontal_center"
NOT COOL: Duplicated action name from xml data:  "object_order_lower"
NOT COOL: Duplicated action name from xml data:  "object_align_vertical_bottom"
NOT COOL: Duplicated action name from xml data:  "object_distribute_horizontal_left"
NOT COOL: Duplicated action name from xml data:  "object_distribute_horizontal_center"
NOT COOL: Duplicated action name from xml data:  "object_distribute_horizontal_right"
NOT COOL: Duplicated action name from xml data:  "object_distribute_horizontal_gaps"
NOT COOL: Duplicated action name from xml data:  "object_distribute_vertical_top"
NOT COOL: Duplicated action name from xml data:  "object_distribute_vertical_center"
NOT COOL: Duplicated action name from xml data:  "object_distribute_vertical_bottom"
NOT COOL: Duplicated action name from xml data:  "object_distribute_vertical_gaps"
NOT COOL: Duplicated action name from xml data:  "object_transform_rotate_90_cw"
NOT COOL: Duplicated action name from xml data:  "object_transform_rotate_90_ccw"
NOT COOL: Duplicated action name from xml data:  "object_transform_rotate_180"
...
...
...
NOT COOL: Duplicated action name from xml data:  "execute_script_8"
NOT COOL: Duplicated action name from xml data:  "execute_script_9"
NOT COOL: Duplicated action name from xml data:  "execute_script_10"
NOT COOL: Duplicated action name from xml data:  "krita_filter_threshold"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolDyna"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolRectangle"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolMultiBrush"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolLazyBrush"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolSmartPatch"
NOT COOL: Duplicated action name from xml data:  "PanTool"
NOT COOL: Duplicated action name from xml data:  "InteractionTool"
NOT COOL: Duplicated action name from xml data:  "KritaSelected/KisToolColorSampler"
NOT COOL: Duplicated action name from xml data:  "KritaFill/KisToolFill"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolLine"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolEllipse"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolBrush"
NOT COOL: Duplicated action name from xml data:  "KritaFill/KisToolGradient"
NOT COOL: Duplicated action name from xml data:  "KritaShape/KisToolMeasure"
NOT COOL: Duplicated action name from xml data:  "KritaTransform/KisToolMove"
NOT COOL: Duplicated action name from xml data:  "KarbonCalligraphyTool"
NOT COOL: Duplicated action name from xml data:  "PathTool"
NOT COOL: Duplicated action name from xml data:  "ZoomTool"
NOT COOL: Duplicated action name from xml data:  "ToolReferenceImages"
zsh: killed     ./krita-5.2.9-x86_64.AppImage
```
Comment 4 Bug Janitor Service 2025-05-30 03:48:20 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.
Comment 5 Halla Rempt 2025-05-30 08:19:47 UTC
"Loading plugin "/usr/lib/kritaplugins/kritaseexprgenerator.so" failed,  "Cannot load library /usr/lib/kritaplugins/kritaseexprgenerator.so: (libKSeExprUI.so.4: cannot open shared object file: No such file or directory)"
Loading plugin "/usr/lib/kritaplugins/kritamypaintop.so" failed,  "Cannot load library /usr/lib/kritaplugins/kritamypaintop.so: (libmypaint.so.0: cannot open shared object file: No such file or directory)"
zsh: killed     krita"

That definitely is a build issue. As for the log when running the appimage, it is finding both the distro build's actions as well as the ones local to the appimage. This definitely is an Arch Linux problem. It's not something we can fix in Krita because it is not caused by faulty code in Krita.