Bug 381923 - Crash when attempting to open rightclick menu, when pop-up palette is attached to keystroke
Summary: Crash when attempting to open rightclick menu, when pop-up palette is attache...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-07-02 17:13 UTC by wolthera
Modified: 2017-11-21 09:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2017-07-02 17:13:07 UTC
Application: krita (4.0.0-pre-alpha (git 10f436f))

Qt Version: 5.9.0
Frameworks Version: 5.35.0
Operating System: Linux 4.8.0-56-generic x86_64
Distribution: KDE neon User Edition 5.10

-- Information about the crash:
When using the shape selection tool, to access the booleans, we need to "rightclick" or rather, we need to summon the pop-up palette.

However, I connected the pop-up palette to key ";" instead of rightclick.

This causes this crash to happen.

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fcc9fe668c0 (LWP 3148))]

Thread 6 (Thread 0x7fcc7af7f700 (LWP 4057)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007fccb00023a6 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fccafffdbea in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fccb0001509 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fcca9e576ba in start_thread (arg=0x7fcc7af7f700) at pthread_create.c:333
#5  0x00007fccaf6f93dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fcc69953700 (LWP 3158)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fccb000246b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fccb0d5ccba in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3  0x00007fccb0001509 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fcca9e576ba in start_thread (arg=0x7fcc69953700) at pthread_create.c:333
#5  0x00007fccaf6f93dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fcc69152700 (LWP 3156)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fccb000246b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fccafffb9f6 in QSemaphore::tryAcquire(int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fccad6ae883 in KisTileDataSwapper::waitForWork (this=<optimized out>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007fccad6aea7a in KisTileDataSwapper::run (this=0x7fccadb79a40 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007fccb0001509 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fcca9e576ba in start_thread (arg=0x7fcc69152700) at pthread_create.c:333
#7  0x00007fccaf6f93dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fcc923c7700 (LWP 3150)):
#0  0x00007fff15fd9a4a in clock_gettime ()
#1  0x00007fccaf707836 in __GI___clock_gettime (clock_id=1, tp=0x7fcc923c6a30) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007fccb0222c51 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fccb0221449 in QTimerInfoList::updateCurrentTime() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fccb02219b5 in QTimerInfoList::timerWait(timespec&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fccb022309e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fcca868891d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fcca86892bb in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007fcca868949c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007fccb0223adb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fccb01cd30a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fccafffcaf4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fccaa082b75 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#13 0x00007fccb0001509 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fcca9e576ba in start_thread (arg=0x7fcc923c7700) at pthread_create.c:333
#15 0x00007fccaf6f93dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fcc9d9ee700 (LWP 3149)):
#0  0x00007fccaf6ed70d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fccaddd6c62 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fccaddd88d7 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fcc9fd361f9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007fccb0001509 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fcca9e576ba in start_thread (arg=0x7fcc9d9ee700) at pthread_create.c:333
#6  0x00007fccaf6f93dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fcc9fe668c0 (LWP 3148)):
[KCrash Handler]
#6  KisShowPaletteAction::begin (this=0x17831f20, event=0x0) at /home/wolthera/krita/src/libs/ui/input/kis_show_palette_action.cpp:55
#7  0x00007fccb1cba3e7 in KisShortcutMatcher::tryRunSingleActionShortcutImpl<Qt::Key, QEvent> (this=this@entry=0x177ebd88, param=<optimized out>, event=event@entry=0x0, keysState=...) at /home/wolthera/krita/src/libs/ui/input/kis_shortcut_matcher.cpp:393
#8  0x00007fccb1cb9619 in KisShortcutMatcher::keyPressed (this=0x177ebd88, key=Qt::Key_Semicolon) at /home/wolthera/krita/src/libs/ui/input/kis_shortcut_matcher.cpp:135
#9  0x00007fccb1ca48aa in KisInputManager::eventFilterImpl (this=0x1781bea8, event=0x7fff15f81060) at /home/wolthera/krita/src/libs/ui/input/kis_input_manager.cpp:312
#10 0x00007fccb01cee92 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fccb0b3b3d5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fccb0b44736 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007fccb1d0ec87 in KisApplication::notify (this=<optimized out>, receiver=0x1b2b50e0, event=0x7fff15f81060) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:558
#14 0x00007fccb01cf128 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fccb0b98e7b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fccb0b3b3fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fccb0b42e07 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007fccb1d0ec87 in KisApplication::notify (this=<optimized out>, receiver=0x19580160, event=0x7fff15f81060) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:558
#19 0x00007fccb01cf128 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fccb05c2158 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#21 0x00007fccb05c74f5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#22 0x00007fccb05a2195 in bool QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#23 0x00007fccb05a5998 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#24 0x00007fccb05c21a4 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007fccb05c74f5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#26 0x00007fccb05a1ceb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#27 0x00007fcc9fd94990 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#28 0x00007fcca8689197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007fcca86893f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007fcca868949c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fccb0223abf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007fccb01cd30a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007fccb01d5db4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00000000004050b3 in main (argc=1, argv=<optimized out>) at /home/wolthera/krita/src/krita/main.cc:269

Reported using DrKonqi
Comment 1 Halla Rempt 2017-11-21 09:06:29 UTC
Git commit c6506bb9af659f780aff4d8109a48fe12e52b36a by Boudewijn Rempt.
Committed on 21/11/2017 at 09:05.
Pushed by rempt into branch 'master'.

Do not crash when opening the palette with a keyboard shortcut

When an action is triggered by a keyboard event, the event
passed is 0:

retval =  tryRunSingleActionShortcutImpl(key, (QEvent*)0, m_d->keys);

So we need to check whether the event is valid.

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

https://commits.kde.org/krita/c6506bb9af659f780aff4d8109a48fe12e52b36a