Bug 455690 - SAFE ASSERT, Crash after shortcut after using the trackpad for painting.
Summary: SAFE ASSERT, Crash after shortcut after using the trackpad for painting.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-06-21 04:55 UTC by vanyossi
Modified: 2022-08-01 09:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Full crashlog (53.27 KB, text/plain)
2022-06-21 04:55 UTC, vanyossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vanyossi 2022-06-21 04:55:14 UTC
Created attachment 149989 [details]
Full crashlog

krita git (c94a346e42)

After using the trackpad for drawing sometimes there is a safe_assert + crash. This does not seem to happen ever using mouse or stylus. Video of when it happened: https://drive.google.com/file/d/13Z4DWgDs_l6Y0zkDovb0ekDRrB8pcEyV/view I was testing the undo response time as it was very slow after using trackpad, but weirdly not after using the stylus. Do we compress events on trackpad events?

It can be reproduced painting with the trackpad.

SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Users/daedalus/developer/krita/repos/master/krita/libs/ui/input/kis_shortcut_matcher.cpp, line 790

backtrace
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x198b7ad98 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x198bafee0 pthread_kill + 288
2   libsystem_c.dylib             	       0x198aea340 abort + 168
3   QtCore                        	       0x10b670a90 0x10b658000 + 101008
4   QtCore                        	       0x10b92fb10 QMessageLogger::fatal(char const*, ...) const + 116
5   libkritaglobal.19.0.0.dylib   	       0x10a21aabc kis_assert_common(char const*, char const*, int, bool, bool) + 1664 (kis_assert.cpp:89)
6   libkritaglobal.19.0.0.dylib   	       0x10a21b090 kis_safe_assert_recoverable(char const*, char const*, int) + 56 (kis_assert.cpp:107)
7   libkritaui.19.0.0.dylib       	       0x1050e909c KisShortcutMatcher::tryEndRunningShortcut(Qt::MouseButton, QEvent*) + 160 (kis_shortcut_matcher.cpp:790)
8   libkritaui.19.0.0.dylib       	       0x1050e8eac KisShortcutMatcher::buttonReleased(Qt::MouseButton, QEvent*) + 248 (kis_shortcut_matcher.cpp:303)
9   libkritaui.19.0.0.dylib       	       0x1050bf5b0 KisInputManager::eventFilterImpl(QEvent*) + 872 (kis_input_manager.cpp:367)
10  libkritaui.19.0.0.dylib       	       0x1050bf148 KisInputManager::eventFilter(QObject*, QEvent*) + 540 (kis_input_manager.cpp:220)
11  QtCore                        	       0x10b82972c QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 252
12  QtWidgets                     	       0x1079d5c7c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 260
13  QtWidgets                     	       0x1079d85d8 QApplication::notify(QObject*, QEvent*) + 6124
14  libkritaui.19.0.0.dylib       	       0x1051a7b10 KisApplication::notify(QObject*, QEvent*) + 452 (KisApplication.cpp:761)
15  QtCore                        	       0x10b829444 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 288
16  QtWidgets                     	       0x1079d65f0 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 952
17  QtWidgets                     	       0x107a2a760 0x1079c4000 + 419680
18  QtWidgets                     	       0x107a296c0 0x1079c4000 + 415424
19  QtWidgets                     	       0x1079d5c9c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 292
20  QtWidgets                     	       0x1079d7010 QApplication::notify(QObject*, QEvent*) + 548
21  libkritaui.19.0.0.dylib       	       0x1051a7b10 KisApplication::notify(QObject*, QEvent*) + 452 (KisApplication.cpp:761)
22  QtCore                        	       0x10b829444 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 288
23  QtGui                         	       0x10ac01b54 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 2956
24  QtGui                         	       0x10abe9254 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 248
25  libqcocoa.dylib               	       0x10b11021c 0x10b0dc000 + 213532
26  CoreFoundation                	       0x198c7d034 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
27  CoreFoundation                	       0x198c7cf80 __CFRunLoopDoSource0 + 208
28  CoreFoundation                	       0x198c7cc80 __CFRunLoopDoSources0 + 268
29  CoreFoundation                	       0x198c7b600 __CFRunLoopRun + 828
30  CoreFoundation                	       0x198c7ab24 CFRunLoopRunSpecific + 600
31  HIToolbox                     	       0x1a18b3338 RunCurrentEventLoopInMode + 292
32  HIToolbox                     	       0x1a18b2fc4 ReceiveNextEventCommon + 324
33  HIToolbox                     	       0x1a18b2e68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
34  AppKit                        	       0x19b7e178c _DPSNextEvent + 860
35  AppKit                        	       0x19b7e0084 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
36  AppKit                        	       0x19b7d2250 -[NSApplication run] + 596
37  libqcocoa.dylib               	       0x10b10f094 0x10b0dc000 + 209044
38  QtCore                        	       0x10b824ca8 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 524
39  QtCore                        	       0x10b829b04 QCoreApplication::exec() + 128
40  krita                         	       0x102430454 main + 12680 (main.cc:721)
41  dyld                          	       0x102d6508c start + 520
Comment 1 Halla Rempt 2022-06-24 08:42:20 UTC
Trackpad is treated like a mouse, but whether those events are compressed, I don't know.
Comment 2 vanyossi 2022-06-27 14:08:53 UTC
Marked as regression
Comment 3 sh_zam 2022-07-27 07:01:19 UTC
I may have a clue about why this is happening, but can you please share the tablet log so I can be sure about my assertion?
Comment 4 vanyossi 2022-08-01 09:26:42 UTC
Git commit 9649dfd575d6cc6c757feb64c456d61611151793 by Ivan Yossi.
Committed on 01/08/2022 at 09:26.
Pushed by ivany into branch 'master'.

Add extra check to avoid crash on macOS

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

https://invent.kde.org/graphics/krita/commit/9649dfd575d6cc6c757feb64c456d61611151793