Bug 424720 - Crash on closing a view that is not the current view
Summary: Crash on closing a view that is not the current view
Status: RESOLVED DUPLICATE of bug 424787
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.3.0
Platform: Mint (Ubuntu based) Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-07-27 18:51 UTC by Tiar
Modified: 2020-08-03 17:43 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 Tiar 2020-07-27 18:51:23 UTC
SUMMARY
When I close a view in Krita that isn't the active view, Krita crashes.
Note: it's both on master (65979251d6) and on stable (appimage Version: 4.3.1-alpha (git 21e34aa))

STEPS TO REPRODUCE
1. Create one document.
2. Create another document.
3. Close the previous document (the non-active one).

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash

Krita

 Version: 4.3.1-alpha (git 21e34aa)
 Languages: en_US, en, en_US, en, pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.3.7-050307-generic
  Pretty Productname: Linux Mint 19.3
  Product Type: linuxmint
  Product Version: 19.3
  Desktop: X-Cinnamon
ADDITIONAL INFORMATION
(gdb) bt
#0  0x00007ffff6f8f635 in KisInputManager::eventFilterImpl(QEvent*) [clone .localalias.272] (this=0x555559a67b48, event=0x7fffffffcab0) at /home/tymon/kritadev/krita/libs/ui/input/kis_input_manager.cpp:517
#1  0x00007ffff48301ab in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007ffff51ef491 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3  0x00007ffff51f6ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff7015347 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x5555596002c0, event=0x7fffffffcab0) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:736
#5  0x00007ffff4830499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff51f4699 in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff5227a4e in QWidget::setFocus(Qt::FocusReason) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff52284c8 in QWidget::focusNextPrevChild(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff52283da in QWidget::focusNextPrevChild(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff5228891 in QWidgetPrivate::hide_helper() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff522d558 in QWidget::setVisible(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff5228b2a in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff5357384 in QMdiSubWindow::closeEvent(QCloseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff522d7d8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff5356a33 in QMdiSubWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff51ef4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff51f6ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff7015347 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55556568dd70, event=0x7fffffffd1c0) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:736
#19 0x00007ffff4830499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff5228a72 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff5344d75 in QMdiArea::closeAllSubWindows() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff704e172 in KisMainWindow::closeEvent(QCloseEvent*) (this=0x55555ad7a500, e=0x7fffffffd6b0) at /home/tymon/kritadev/krita/libs/ui/KisMainWindow.cpp:1467
#23 0x00007ffff522d7d8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff5333f34 in QMainWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff2978aeb in KMainWindow::event(QEvent*) (this=this@entry=0x55555ad7a500, ev=ev@entry=0x7fffffffd6b0) at /home/tymon/kritadev/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:765
#26 0x00007ffff29ba299 in KXmlGuiWindow::event(QEvent*) (this=0x55555ad7a500, ev=0x7fffffffd6b0) at /home/tymon/kritadev/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#27 0x00007ffff51ef4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff51f6ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff7015347 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555ad7a500, event=0x7fffffffd6b0) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:736
#30 0x00007ffff4830499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff5228cd1 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff5247d1e in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff524af2d in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff51ef4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff51f6ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff7015347 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555aa96ce0, event=0x7fffffffda10) at /home/tymon/kritadev/krita/libs/ui/KisApplication.cpp:736
#37 0x00007ffff4830499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff4c327ca in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#39 0x00007ffff4c37465 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#40 0x00007ffff4c11b6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007fffea91be5b in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#42 0x00007ffff482f16b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff48372e2 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x0000555555e28e2f in main (argc=<optimized out>, argv=0x7fffffffdec8) at /home/tymon/kritadev/krita/krita/main.cc:614
#45 0x00007ffff3e5fb6b in __libc_start_main (main=0x555555e27420 <main>, argc=1, argv=0x7fffffffdec8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdeb8) at ../csu/libc-start.c:308
#46 0x0000555555e29cca in _start () at /home/tymon/kritadev/krita/krita/main.cc:488
Comment 1 Tiar 2020-07-27 18:53:12 UTC
Forgot to add the part that gdb shows just when the crash happens.

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
0x00007ffff6f8f635 in KisInputManager::eventFilterImpl(QEvent*) [clone .localalias.272] () at /home/tymon/kritadev/krita/libs/ui/input/kis_input_manager.cpp:517
517	        QPointF currentLocalPos =
Comment 2 Halla Rempt 2020-07-27 18:54:30 UTC
Curious, I don't get a crash with the 4.3.0 appimage if I try this.
Comment 3 Tiar 2020-07-27 20:10:48 UTC
I don't get either. It's not 4.3.0 affected, but the current stable version.
Comment 4 Eoin O'Neill 2020-08-03 17:43:32 UTC
This seems to have been fixed by commit 838a1292749390c20395c0ebaffbc9a57c9e98eb which was intended to fix bug 424787. As such, I'm marking it as a duplicate. It works on `master` and `krita/4.3`.

*** This bug has been marked as a duplicate of bug 424787 ***