Bug 430802 - Crash related to kinetic scrolling and the gradient map filter
Summary: Crash related to kinetic scrolling and the gradient map filter
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.4.2-beta2
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: sh_zam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-25 08:44 UTC by Alvin Wong
Modified: 2021-04-07 12:24 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2020-12-25 08:44:17 UTC
SUMMARY

Weird crash related to the kinetic scrolling gesture and the gradient map filter dialog.


STEPS TO REPRODUCE
1. Enable kinetic scrolling and have it set to "on click drag"
2. Create document and open the filter dialog: Filter -> Map -> Gradient Map
3. Click on "Normalize" or whatever else on the tree list

OBSERVED RESULT

Crash


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 1903 (build 18362.1139)

ADDITIONAL INFORMATION

This apparently doesn't crash when kinetic scrolling is disabled.

Seems to also happen with 4.4.1.

Backtrace on 4.4.2-beta2:

krita.exe caused an Access Violation at location 00007FFAB8571670 in module Qt5Widgets.dll Reading from location FFFFFFFFFFFFFFFF.

AddrPC           Params
00007FFAB8571670 0000000000000000 0000000000160E40 00000000001602AC  Qt5Widgets.dll!0x51670 QGestureRecognizer::unregisterRecognizer+0x24a0
00007FFAB8573A77 000000000EBD7AF0 00000000319BDD38 00000000005FBB00  Qt5Widgets.dll!0x53a77 QGestureRecognizer::unregisterRecognizer+0x48a7
00007FFAB85752ED 000000000EBD7AF0 00007FFAC002258F 00000000005FBB00  Qt5Widgets.dll!0x552ed QGestureRecognizer::unregisterRecognizer+0x611d
00007FFAB853024D 0000000000000000 00007FFACB49211F 0000000000000000  Qt5Widgets.dll!0x1024d QApplication::notify+0x19dd
00007FFAB5BC9266 0000000000000000 3FF0000000000000 C028000000000000  libkritaui.dll!0x309266 notify+0x16  [C:/Packaging/workspace/Krita_Release_Windows64_Build/krita/libs/ui/KisApplication.cpp @ 689]
00007FFACB66D918 0000000000000000 0000000000000000 3FF0000000000000  Qt5Core.dll!0x1fd918 QCoreApplication::sendSpontaneousEvent+0x1a8
00007FFAB852E018 00000000005FBB38 0000000000000000 0000000000000000  Qt5Widgets.dll!0xe018 QApplicationPrivate::sendMouseEvent+0x208
00007FFAB857A93D 000000000069AE70 00007FFACB66C121 000000000000000D  Qt5Widgets.dll!0x5a93d QDesktopWidget::qt_metacall+0x26fd
00007FFAB857D6BB 00000000005FFB80 00000000006FEC40 0000000000000001  Qt5Widgets.dll!0x5d6bb QDesktopWidget::qt_metacall+0x547b
00007FFAB8527BDC 0000000000000000 0000000000000000 0000000000000000  Qt5Widgets.dll!0x7bdc QApplicationPrivate::notify_helper+0x9c
00007FFAB852EC23 0000000000000401 00007FFACB49211F 0000000000000000  Qt5Widgets.dll!0xec23 QApplication::notify+0x3b3
00007FFAB5BC9266 00000000005FBFF8 00007FFABFFFA754 0000000000000000  libkritaui.dll!0x309266 notify+0x16  [C:/Packaging/workspace/Krita_Release_Windows64_Build/krita/libs/ui/KisApplication.cpp @ 689]
00007FFACB66D918 00000000316699E0 0000000000030000 0000000000000001  Qt5Core.dll!0x1fd918 QCoreApplication::sendSpontaneousEvent+0x1a8
00007FFABFFE6DC4 0000000000000000 00007FFACB6736B3 00007FFB0FEA1464  Qt5Gui.dll!0x36dc4 QGuiApplicationPrivate::processMouseEvent+0x6e4
00007FFABFFE8135 0000000002C1A920 0000000002C77160 00000000002A048E  Qt5Gui.dll!0x38135 QGuiApplicationPrivate::processWindowSystemEvent+0x105
00007FFABFFC0EAC 0000000000000401 00000000002A048E 0000000000000000  Qt5Gui.dll!0x10eac QWindowSystemInterface::sendWindowSystemEvents+0x44c
00007FFACB6C814A 0000000000000000 00007FFB103F2073 0000000000000001  Qt5Core.dll!0x25814a QEventDispatcherWin32Private::sendTimerEvent+0x60a
00007FFB103E5C1D 00000000014CE020 00007FFACB6C7C70 00000000002A048E  USER32.dll!0x15c1d UserCallWinProcCheckWow+0x2bd
00007FFB103E5612 00007FFACB6C7C70 00000000005FC6F0 0000000000000000  USER32.dll!0x15612 DispatchMessageWorker+0x1e2
00007FFACB6C75EB 0000000002C77160 0000000000000024 000000000068F8A0  Qt5Core.dll!0x2575eb QEventDispatcherWin32::processEvents+0x5cb
000000006A8FEEA5 0000000000000080 0000000000000014 00000000230374B0  qwindows.dll!0x7eea5 qt_plugin_instance+0x2a25
00007FFACB66B8FF 00000000045AACE0 00000000045C5AA0 000000002299BC90  Qt5Core.dll!0x1fb8ff QEventLoop::exec+0x13f
00007FFACB674B77 00000000005FFBD0 00000000005FFB40 0000000000000004  Qt5Core.dll!0x204b77 QCoreApplication::exec+0x77
0000000140006F4A 0000000000000001 00000000006FED20 0000000140F64970  krita.exe!0x6f4a main+0x213a  [C:/Packaging/workspace/Krita_Release_Windows64_Build/krita/krita/main.cc @ 662]
00000001400013C7 0000000000000000 0000000000000000 0000000000000000  krita.exe!0x13c7 __tmainCRTStartup+0x247
00000001400014CB 0000000000000000 0000000000000000 0000000000000000  krita.exe!0x14cb WinMainCRTStartup+0x1b
00007FFB11257C24 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!0x17c24 BaseThreadInitThunk+0x14
00007FFB1238CEA1 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!0x6cea1 RtlUserThreadStart+0x21
Comment 1 Antti Savolainen 2021-01-23 07:31:33 UTC
I am able to reproduce this on Linux build 4.4.2
Demonstrative video: https://youtu.be/MVfckEllfA0

Backtrace:

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
0x00007ffff5628620 in ?? () from /usr/lib/libQt5Widgets.so.5
#0  0x00007ffff5628620 in ?? () from /usr/lib/libQt5Widgets.so.5
#1  0x00007ffff562aefe in ?? () from /usr/lib/libQt5Widgets.so.5
#2  0x00007ffff562dfc6 in ?? () from /usr/lib/libQt5Widgets.so.5
#3  0x00007ffff55e25b7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#4  0x00007ffff70ac04a in KisApplication::notify (this=<optimized out>, receiver=0x555562dcb380, event=0x7fffffffd8e0) at /usr/src/debug/krita-4.4.2/libs/ui/KisApplication.cpp:713
#5  0x00007ffff4b13a7a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#6  0x00007ffff55e187e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/libQt5Widgets.so.5
#7  0x00007ffff5635249 in ?? () from /usr/lib/libQt5Widgets.so.5
#8  0x00007ffff563863f in ?? () from /usr/lib/libQt5Widgets.so.5
#9  0x00007ffff55db752 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff70ac04a in KisApplication::notify (this=<optimized out>, receiver=0x5555645a0720, event=0x7fffffffdc20) at /usr/src/debug/krita-4.4.2/libs/ui/KisApplication.cpp:713
#11 0x00007ffff4b13a7a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#12 0x00007ffff4eed594 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#13 0x00007ffff4ec2bb5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#14 0x00007fffeeb2b16c in ?? () from /usr/lib/libQt5XcbQpa.so.5
#15 0x00007ffff1f42a84 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#16 0x00007ffff1f969b1 in ?? () from /usr/lib/libglib-2.0.so.0
#17 0x00007ffff1f412b1 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#18 0x00007ffff4b6c6e1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#19 0x00007ffff4b123fc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#20 0x00007ffff4b1a894 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#21 0x0000555555e2704b in main (argc=<optimized out>, argv=0x7fffffffe2d8) at /usr/src/debug/krita-4.4.2/krita/main.cc:662
Comment 2 sh_zam 2021-04-06 09:06:07 UTC
Kinetic Scrolling being enabled by default on Android this is a one tap death situation. Assigning this to myself
Comment 3 Bug Janitor Service 2021-04-06 17:37:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/794
Comment 4 Halla Rempt 2021-04-07 12:24:03 UTC
Git commit 6adbb94f227100d068489c7916487c26c20ef394 by Halla Rempt, on behalf of Sharaf Zaman.
Committed on 07/04/2021 at 12:21.
Pushed by rempt into branch 'master'.

Crash when clicking Gradient Map/Palettize filter

This only happens with these two items because they both create a
QScroller which when used while Kinetic Scrolling being enabled is
pushed to a recognizers container. But when we delete the widget, the
cached value which was next to scroller's recognizer (a coincidence) is
taken to be valid hence a crash.

A  +30   -0    3rdparty/ext_qt/0001-Check-if-we-reached-the-end-of-Iterator.patch
M  +6    -0    3rdparty/ext_qt/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/6adbb94f227100d068489c7916487c26c20ef394