Bug 489537 - [Windows] [Steam] Safe assert in shortcuts matcher
Summary: [Windows] [Steam] Safe assert in shortcuts matcher
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.2.3-beta1
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 485050 489267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-01 09:38 UTC by theodorateo8
Modified: 2024-07-25 11:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Window Krita- Internal Error (30.08 KB, image/png)
2024-07-01 09:38 UTC, theodorateo8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theodorateo8 2024-07-01 09:38:11 UTC
Created attachment 171228 [details]
Window Krita- Internal Error

I bought Krita from Steam, and sometimes it crashes without prior warning. I never had the same problem with the free version.
I have attached the window that pops up every time, explaining the exact problem.
Comment 1 Dmitry Kazakov 2024-07-15 10:06:11 UTC
*** Bug 489267 has been marked as a duplicate of this bug. ***
Comment 2 Dmitry Kazakov 2024-07-15 10:07:22 UTC
The bug is twofold:

1) The assert shouldn't happen
2) In the release packages, this safe assert should be hidden from the user
Comment 3 Dmitry Kazakov 2024-07-17 06:57:01 UTC
Okay, I have made special Krita builds that support testing safe asserts, and I see that safe asserts are **not** present in release builds. It seems like the message is done in some non-release build, like nightly.

Anyway, it resolves only a half of the issue, the assert itself is still valid.
Comment 4 Dmitry Kazakov 2024-07-17 07:36:34 UTC
Hi, theodorateo!

Could you share your Krita crashlog file? It should be placed in this location:

%localappdata%\kritacrash.log

It might help me investigate why this assert triggers at the first place.
Comment 5 Dmitry Kazakov 2024-07-17 07:47:47 UTC
I have a feeling like this bug is related: 

https://bugs.kde.org/show_bug.cgi?id=490255
Comment 6 Dmitry Kazakov 2024-07-18 12:21:21 UTC
*** Bug 485050 has been marked as a duplicate of this bug. ***
Comment 7 Dmitry Kazakov 2024-07-19 11:19:15 UTC
Git commit fe42eb944e1827a14aed38c6a4cd968918202200 by Dmitry Kazakov.
Committed on 19/07/2024 at 11:18.
Pushed by dkazakov into branch 'master'.

Add a code for testing asserts

1) Set environment variable:

export KRITA_ENABLE_ASSERT_TESTS=1

2) Create an image with a file layer

3) Set file name with any of:

   * crash_me_with_safe_assert
   * crash_me_with_normal_assert
   * crash_me_with_qfatal

4) Press "Open attached file" button (folder icon)
CC:kimageshop@kde.org

M  +13   -0    libs/ui/kis_file_layer.cpp

https://invent.kde.org/graphics/krita/-/commit/fe42eb944e1827a14aed38c6a4cd968918202200
Comment 8 Dmitry Kazakov 2024-07-21 10:25:07 UTC
Git commit bde35293fa025f692c224a9845b8392cc5acdb60 by Dmitry Kazakov.
Committed on 19/07/2024 at 12:05.
Pushed by dkazakov into branch 'release/5.2.4'.

Fix conflicts between mouse and touch actions requested concurrently

When drawing with a stylus on a touch-capable laptop it may happen
that a touch event will come in the middle of a stylus stroke. In
such a case we should avoid starting any touch action, while a
tablet action is still running.

This patch basically replaces all the checks for `if (!m_d->runningShortcut)`
with `if (!hasRunningShortcut())` which checks for all the types of the
actions possible. It basically prohibits running any touch action while
table action is running and vice versa.

# Conflicts:
#	libs/ui/input/kis_shortcut_matcher.cpp

M  +0    -2    libs/ui/input/kis_input_manager.cpp
M  +47   -73   libs/ui/input/kis_shortcut_matcher.cpp
M  +0    -3    libs/ui/input/kis_shortcut_matcher.h

https://invent.kde.org/graphics/krita/-/commit/bde35293fa025f692c224a9845b8392cc5acdb60
Comment 9 Dmitry Kazakov 2024-07-21 10:25:15 UTC
Git commit 8c82627cedcb79680992a746abbe3b9d8f200d40 by Dmitry Kazakov.
Committed on 16/07/2024 at 13:46.
Pushed by dkazakov into branch 'release/5.2.4'.

Add a code for testing asserts

1) Set environment variable:

export KRITA_ENABLE_ASSERT_TESTS=1

2) Create an image with a file layer

3) Set file name with any of:

   * crash_me_with_safe_assert
   * crash_me_with_normal_assert
   * crash_me_with_qfatal

4) Press "Open attached file" button (folder icon)

M  +13   -0    libs/ui/kis_file_layer.cpp

https://invent.kde.org/graphics/krita/-/commit/8c82627cedcb79680992a746abbe3b9d8f200d40
Comment 10 Dmitry Kazakov 2024-07-21 10:25:24 UTC
Git commit bef988e37709815a80381ca742d89283841ed35a by Dmitry Kazakov.
Committed on 19/07/2024 at 12:05.
Pushed by dkazakov into branch 'release/5.2.4'.

Make sure that the default actions are activated after touch-end

M  +40   -1    libs/ui/input/kis_shortcut_matcher.cpp

https://invent.kde.org/graphics/krita/-/commit/bef988e37709815a80381ca742d89283841ed35a
Comment 11 Dmitry Kazakov 2024-07-25 11:12:38 UTC
Git commit bad0dd9cd86a9915bf8883f45a68ab5c7ba2d91a by Dmitry Kazakov.
Committed on 25/07/2024 at 11:11.
Pushed by dkazakov into branch 'master'.

Fix conflicts between mouse and touch actions requested concurrently

When drawing with a stylus on a touch-capable laptop it may happen
that a touch event will come in the middle of a stylus stroke. In
such a case we should avoid starting any touch action, while a
tablet action is still running.

This patch basically replaces all the checks for `if (!m_d->runningShortcut)`
with `if (!hasRunningShortcut())` which checks for all the types of the
actions possible. It basically prohibits running any touch action while
table action is running and vice versa.

M  +0    -2    libs/ui/input/kis_input_manager.cpp
M  +47   -73   libs/ui/input/kis_shortcut_matcher.cpp
M  +0    -3    libs/ui/input/kis_shortcut_matcher.h

https://invent.kde.org/graphics/krita/-/commit/bad0dd9cd86a9915bf8883f45a68ab5c7ba2d91a
Comment 12 Dmitry Kazakov 2024-07-25 11:12:46 UTC
Git commit 1337dc18649ef969c6d4262bba73796cfc51af61 by Dmitry Kazakov.
Committed on 25/07/2024 at 11:11.
Pushed by dkazakov into branch 'master'.

Make sure that the default actions are activated after touch-end

M  +40   -1    libs/ui/input/kis_shortcut_matcher.cpp

https://invent.kde.org/graphics/krita/-/commit/1337dc18649ef969c6d4262bba73796cfc51af61
Comment 13 Dmitry Kazakov 2024-07-25 11:16:17 UTC
Git commit 72cb6152132394c8de995c1f7706746be408dde7 by Dmitry Kazakov.
Committed on 25/07/2024 at 11:15.
Pushed by dkazakov into branch 'krita/5.2'.

Fix conflicts between mouse and touch actions requested concurrently

When drawing with a stylus on a touch-capable laptop it may happen
that a touch event will come in the middle of a stylus stroke. In
such a case we should avoid starting any touch action, while a
tablet action is still running.

This patch basically replaces all the checks for `if (!m_d->runningShortcut)`
with `if (!hasRunningShortcut())` which checks for all the types of the
actions possible. It basically prohibits running any touch action while
table action is running and vice versa.

# Conflicts:
#	libs/ui/input/kis_shortcut_matcher.cpp

M  +0    -2    libs/ui/input/kis_input_manager.cpp
M  +47   -73   libs/ui/input/kis_shortcut_matcher.cpp
M  +0    -3    libs/ui/input/kis_shortcut_matcher.h

https://invent.kde.org/graphics/krita/-/commit/72cb6152132394c8de995c1f7706746be408dde7
Comment 14 Dmitry Kazakov 2024-07-25 11:16:19 UTC
Git commit a2454daa95e778ccf2c79144cf3d99b8f2dd7263 by Dmitry Kazakov.
Committed on 25/07/2024 at 11:15.
Pushed by dkazakov into branch 'krita/5.2'.

Make sure that the default actions are activated after touch-end

M  +40   -1    libs/ui/input/kis_shortcut_matcher.cpp

https://invent.kde.org/graphics/krita/-/commit/a2454daa95e778ccf2c79144cf3d99b8f2dd7263