<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>520581</bug_id>
          
          <creation_ts>2026-05-23 22:01:01 +0000</creation_ts>
          <short_desc>Crash on Canvas Input -&gt; Rotate Canvas -&gt; Key Combination for Rotate Mode</short_desc>
          <delta_ts>2026-08-09 16:22:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Shortcuts and Canvas Input Settings</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tiar">tamtamy.tymona</reporter>
          <assigned_to name="Tiar">tamtamy.tymona</assigned_to>
          <cc>inahomori</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/e28a2a8dc2e9925f21d9a1a46a827b6663db0143</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2517984</commentid>
    <comment_count>0</comment_count>
    <who name="Tiar">tamtamy.tymona</who>
    <bug_when>2026-05-23 22:01:01 +0000</bug_when>
    <thetext>DESCRIPTION
Krita crashes on null pointer when trying to get the posF() of the event that apparently doesn&apos;t exist.

STEPS TO REPRODUCE
1. Go to Canvas Input Settings -&gt; Rotate Canvas
2. Add Key Combination -&gt; Ctrl + R
3. Use it on the canvas

OBSERVED RESULT
Crash (segfault on null pointer)

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Thread 1 &quot;krita&quot; received signal SIGSEGV, Segmentation fault.
KisAbstractInputAction::eventPosF (this=0x555557d645c0, event=0x0) at /home/appimage/persistent/krita/libs/ui/input/kis_abstract_input_action.cpp:217
217	    switch (event-&gt;type()) {
(gdb) bt
#0  KisAbstractInputAction::eventPosF (this=0x555557d645c0, event=0x0) at /home/appimage/persistent/krita/libs/ui/input/kis_abstract_input_action.cpp:217
#1  0x00007ffff7ab00a6 in KisRotateCanvasAction::begin (this=0x555557d645c0, shortcut=&lt;optimized out&gt;, event=0x0) at /home/appimage/persistent/krita/libs/ui/input/kis_rotate_canvas_action.cpp:103
#2  0x00007ffff7ac001c in KisShortcutMatcher::tryRunSingleActionShortcutImpl&lt;Qt::Key, QEvent&gt; (this=this@entry=0x555556bf1580, param=param@entry=Qt::Key_R, event=event@entry=0x0, keysState=..., keyboard=keyboard@entry=true) at /home/appimage/persistent/krita/libs/ui/input/kis_shortcut_matcher.cpp:834
#3  0x00007ffff7abe3a8 in KisShortcutMatcher::keyPressed (this=0x555556bf1580, key=key@entry=Qt::Key_R) at /home/appimage/persistent/krita/libs/ui/input/kis_shortcut_matcher.cpp:217
#4  0x00007ffff7a986cb in KisInputManager::eventFilterImpl (this=0x555557d5e998, event=&lt;optimized out&gt;) at /home/appimage/persistent/krita/libs/ui/input/kis_input_manager.cpp:451
#5  0x00007ffff54f1caa in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#6  0x00007ffff61177d2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#7  0x00007ffff611f5a6 in QApplication::notify(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#8  0x00007ffff7b7cc95 in KisApplication::notify (this=0x7fffffffe730, receiver=0x555557c772b0, event=0x7fffffffdfb0) at /home/appimage/persistent/krita/libs/ui/KisApplication.cpp:920
#9  0x00007ffff54f1f4a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#10 0x00007ffff6177abf in ?? () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#11 0x00007ffff61177e3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#12 0x00007ffff7b7cc95 in KisApplication::notify (this=0x7fffffffe730, receiver=0x555557df5010, event=0x7fffffffdfb0) at /home/appimage/persistent/krita/libs/ui/KisApplication.cpp:920
#13 0x00007ffff54f1f4a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#14 0x00007ffff59239aa in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Gui.so.5
#15 0x00007ffff58fbd25 in bool QWindowSystemInterfacePrivate::handleWindowSystemEvent&lt;QWindowSystemInterface::SynchronousDelivery&gt;(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Gui.so.5
#16 0x00007ffff58fece6 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags&lt;Qt::KeyboardModifier&gt;, unsigned int, unsigned int, unsigned int, QString const&amp;, bool, unsigned short) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Gui.so.5
#17 0x00007ffff59238cf in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Gui.so.5
#18 0x00007ffff58fb82c in QWindowSystemInterface::sendWindowSystemEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Gui.so.5
#19 0x00007ffff00a53ee in ?? () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5XcbQpa.so.5
#20 0x00007ffff268d17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff268d400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff268d4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff554ba58 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#24 0x00007ffff54f085b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#25 0x00007ffff54f8e14 in QCoreApplication::exec() () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#26 0x000055555555e6bd in main (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /home/appimage/persistent/krita/krita/main.cc:874</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2517988</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-05-23 22:41:11 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2793</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2523194</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-06-15 13:43:35 +0000</bug_when>
    <thetext>Git commit afff1cf7c09f8ed14ddeebd629030122d04cbf9e by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 15/06/2026 at 13:42.
Pushed by dkazakov into branch &apos;master&apos;.

Fix crash on null event pointer in Abstract Input Action

The check in kis_abstract_input_action.cpp is for sure valid
because it happens within
KisShortcutMatcher::tryRunSingleActionShortcutImpl,
and it has a warning that the event can be null.
This commit also includes some more sanity checks that
might be upgraded into KIS_SAFE_ASSERT if needed.

M  +4    -0    libs/ui/input/kis_abstract_input_action.cpp
M  +7    -0    libs/ui/input/kis_pan_action.cpp
M  +4    -0    libs/ui/input/kis_rotate_canvas_action.cpp
M  +3    -0    libs/ui/input/kis_zoom_action.cpp

https://invent.kde.org/graphics/krita/-/commit/afff1cf7c09f8ed14ddeebd629030122d04cbf9e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2523196</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-06-15 13:44:40 +0000</bug_when>
    <thetext>Git commit e28a2a8dc2e9925f21d9a1a46a827b6663db0143 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 15/06/2026 at 13:44.
Pushed by dkazakov into branch &apos;krita/6.0&apos;.

Fix crash on null event pointer in Abstract Input Action

The check in kis_abstract_input_action.cpp is for sure valid
because it happens within
KisShortcutMatcher::tryRunSingleActionShortcutImpl,
and it has a warning that the event can be null.
This commit also includes some more sanity checks that
might be upgraded into KIS_SAFE_ASSERT if needed.

M  +4    -0    libs/ui/input/kis_abstract_input_action.cpp
M  +7    -0    libs/ui/input/kis_pan_action.cpp
M  +4    -0    libs/ui/input/kis_rotate_canvas_action.cpp
M  +3    -0    libs/ui/input/kis_zoom_action.cpp

https://invent.kde.org/graphics/krita/-/commit/e28a2a8dc2e9925f21d9a1a46a827b6663db0143</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2537644</commentid>
    <comment_count>4</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2026-08-09 16:22:23 +0000</bug_when>
    <thetext>*** Bug 523344 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>