https://bugs.kde.org/show_bug.cgi?id=436893

            Bug ID: 436893
           Summary: Crash after closing document while pop-up palette is
                    visible
           Product: krita
           Version: git master (please specify the git hash!)
          Platform: Other
                OS: Linux
            Status: REPORTED
          Keywords: regression
          Severity: crash
          Priority: NOR
         Component: General
          Assignee: krita-bugs-n...@kde.org
          Reporter: lynx.mw+...@gmail.com
  Target Milestone: ---

SUMMARY
Krita crashes on creating a new document when a previously opened document was
closed while the pop-up palette was active.


STEPS TO REPRODUCE
1. Open or create a document
2. Open the Pop-up Palette (right-click while brush tool active)
3. Close the document while the Pop-up Palette is still active
4. Open or create another document

OBSERVED RESULT
Krita crashes with the backtrace below. Seems there is a dangling pointer to
the pop-up widget.

--------
 Version: 5.0.0-prealpha (git b1530e3)
 Languages: en_US, en, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-72-generic
  Pretty Productname: Ubuntu 20.04.2 LTS
  Product Type: ubuntu
  Product Version: 20.04
  Desktop: KDE
-------

Backtrace:
Thread 1 (Thread 0x7fa58821a6c0 (LWP 19640)):
[KCrash Handler]
#6  0x00007fa58d283ee2 in __dynamic_cast () at
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007fa58ffe6dd0 in KisInputManager::eventFilterImpl(QEvent*)
(this=0x560d11e724e8, event=0x7fffd4cf03a0) at
/home/lynx/coding/krita/krita-git/libs/ui/input/kis_input_manager.cpp:343
#8  0x00007fa58d64264b in
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fa58e05aa55 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007fa58e0640f0 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007fa5900a26ed in KisApplication::notify(QObject*, QEvent*)
(this=<optimized out>, receiver=0x560d2419c270, event=0x7fffd4cf03a0) at
/home/lynx/coding/krita/krita-git/libs/ui/KisApplication.cpp:709
#12 0x00007fa58d64293a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007fa58e092078 in QWidget::setCursor(QCursor const&) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fa58c5d7bc0 in KoToolManager::Private::connectActiveTool()
(this=0x560d11f180e0) at
/home/lynx/coding/krita/krita-git/libs/flake/KoToolManager.cpp:441
#15 0x00007fa58c5da9ba in KoToolManager::Private::switchTool(QString const&)
(this=0x560d11f180e0, id=...) at
/home/lynx/coding/krita/krita-git/libs/flake/KoToolManager.cpp:487
#16 0x00007fa58c5dbbab in
KoToolManager::Private::attachCanvas(KoCanvasController*) (this=0x560d11f180e0,
controller=<optimized out>) at
/home/lynx/coding/krita/krita-git/libs/flake/KoToolManager.cpp:675
#17 0x00007fa58c5dbcdd in KoToolManager::addController(KoCanvasController*)
(this=0x7fa58c792c00 <(anonymous
namespace)::Q_QGS_s_instance::innerFunction()::holder>, controller=<optimized
out>) at /home/lynx/coding/krita/krita-git/libs/flake/KoToolManager.cpp:242
#18 0x00007fa59011448b in KisView::setViewManager(KisViewManager*)
(this=this@entry=0x560d2689e9e0, view=<optimized out>) at
/home/lynx/coding/krita/krita-git/libs/ui/KisView.cpp:317
#19 0x00007fa5900e8052 in KisMainWindow::showView(KisView*, QMdiSubWindow*)
(this=0x560d11bd26a0, imageView=0x560d2689e9e0, subwin=0x0) at
/home/lynx/coding/krita/krita-git/libs/ui/KisMainWindow.cpp:714
#20 0x00007fa5900db5cd in KisMainWindow::addView(KisView*, QMdiSubWindow*)
(this=this@entry=0x560d11bd26a0, view=view@entry=0x560d2689e9e0,
subWindow=subWindow@entry=0x0) at
/home/lynx/coding/krita/krita-git/libs/ui/KisMainWindow.cpp:686
#21 0x00007fa5900db735 in
KisMainWindow::addViewAndNotifyLoadingCompleted(KisDocument*, QMdiSubWindow*)
(this=0x560d11bd26a0, document=<optimized out>, subWindow=0x0) at
/home/lynx/coding/krita/krita-git/libs/ui/KisMainWindow.cpp:1142
#22 0x00007fa58d66e300 in QMetaObject::activate(QObject*, int, int, void**) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fa58fb82d33 in KisOpenPane::documentSelected(KisDocument*)
(this=<optimized out>, _t1=<optimized out>) at
/media/zeug/krita/build/libs/ui/kritaui_autogen/EWIEGA46WW/moc_KisOpenPane.cpp:241
#24 0x00007fa58d66e300 in QMetaObject::activate(QObject*, int, int, void**) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007fa58e1f6b66 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fa58d66e300 in QMetaObject::activate(QObject*, int, int, void**) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fa58e14f806 in QAbstractButton::clicked(bool) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fa58e14fa2e in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007fa58e150e73 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007fa58e151035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007fa58e09d2b6 in QWidget::event(QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007fa58e05aa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007fa58e064343 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007fa5900a26ed in KisApplication::notify(QObject*, QEvent*)
(this=<optimized out>, receiver=0x560d23f9d580, event=0x7fffd4cf1070) at
/home/lynx/coding/krita/krita-git/libs/ui/KisApplication.cpp:709
#35 0x00007fa58d64293a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007fa58e063457 in QApplicationPrivate::sendMouseEvent(QWidget*,
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007fa58e0b935d in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007fa58e0bc1ec in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007fa58e05aa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007fa58e0640f0 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007fa5900a26ed in KisApplication::notify(QObject*, QEvent*)
(this=<optimized out>, receiver=0x560d263c5d60, event=0x7fffd4cf1570) at
/home/lynx/coding/krita/krita-git/libs/ui/KisApplication.cpp:709
#42 0x00007fa58d64293a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007fa58da2b7d3 in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#44 0x00007fa58da2d10b in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#45 0x00007fa58da0735b in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#46 0x00007fa587ab032e in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#47 0x00007fa58a96e17d in g_main_context_dispatch () at
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007fa58a96e400 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007fa58a96e4a3 in g_main_context_iteration () at
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007fa58d69a565 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007fa58d6414db in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#52 0x00007fa58e25ec6d in QDialog::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007fa5900d9fe3 in KisMainWindow::slotFileNew() (this=<optimized out>)
at /home/lynx/coding/krita/krita-git/libs/ui/KisMainWindow.cpp:1687
#54 0x00007fa58fe18310 in KisWelcomePageWidget::slotNewFileClicked()
(this=<optimized out>) at
/home/lynx/coding/krita/krita-git/libs/ui/KisWelcomePageWidget.cpp:634
#55 0x00007fa58fb8f8f5 in KisWelcomePageWidget::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) (_o=0x560d11e87f20, _c=<optimized out>,
_id=<optimized out>, _a=<optimized out>) at
/media/zeug/krita/build/libs/ui/kritaui_autogen/EWIEGA46WW/moc_KisWelcomePageWidget.cpp:224
#56 0x00007fa58d66e300 in QMetaObject::activate(QObject*, int, int, void**) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007fa58e14f806 in QAbstractButton::clicked(bool) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#58 0x00007fa58e14fa2e in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#59 0x00007fa58e150e73 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#60 0x00007fa58e151035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#61 0x00007fa58e09d2b6 in QWidget::event(QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#62 0x00007fa58e05aa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#63 0x00007fa58e064343 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#64 0x00007fa5900a26ed in KisApplication::notify(QObject*, QEvent*)
(this=<optimized out>, receiver=0x560d11bedb30, event=0x7fffd4cf2200) at
/home/lynx/coding/krita/krita-git/libs/ui/KisApplication.cpp:709
#65 0x00007fa58d64293a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#66 0x00007fa58e063457 in QApplicationPrivate::sendMouseEvent(QWidget*,
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#67 0x00007fa58e0b935d in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#68 0x00007fa58e0bc1ec in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#69 0x00007fa58e05aa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#70 0x00007fa58e0640f0 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#71 0x00007fa5900a26ed in KisApplication::notify(QObject*, QEvent*)
(this=<optimized out>, receiver=0x560d194a8dd0, event=0x7fffd4cf2700) at
/home/lynx/coding/krita/krita-git/libs/ui/KisApplication.cpp:709
#72 0x00007fa58d64293a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#73 0x00007fa58da2b7d3 in
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#74 0x00007fa58da2d10b in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#75 0x00007fa58da0735b in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#76 0x00007fa587ab032e in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#77 0x00007fa58a96e17d in g_main_context_dispatch () at
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#78 0x00007fa58a96e400 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#79 0x00007fa58a96e4a3 in g_main_context_iteration () at
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#80 0x00007fa58d69a565 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#81 0x00007fa58d6414db in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#82 0x00007fa58d649246 in QCoreApplication::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#83 0x0000560d0d8575ed in main(int, char**) (argc=<optimized out>,
argv=0x7fffd4cf2dc8) at /home/lynx/coding/krita/krita-git/krita/main.cc:663
[Inferior 1 (process 19640) detached]

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to