Bug 452331 - Crash when opening a second image
Summary: Crash when opening a second image
Status: RESOLVED DUPLICATE of bug 452063
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-06 13:52 UTC by Halla Rempt
Modified: 2022-04-06 15:12 UTC (History)
1 user (show)

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 Halla Rempt 2022-04-06 13:52:39 UTC
This crash happens when creating an image, closing it and creating a new image: 

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
0x00007ffff5a6a82b in QObject::objectName() const () from /home/halla/dev/deps/lib/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff5a6a82b in QObject::objectName() const () from /home/halla/dev/deps/lib/libQt5Core.so.5
#1  0x00007ffff44b418a in KActionCollectionPrivate::unlistAction (this=0x5555576bb870, action=0x55556004bc90)
    at /home/halla/dev/krita/libs/widgetutils/xmlgui/kactioncollection.cpp:705
#2  0x00007ffff44b442b in KActionCollection::takeAction (this=0x55555768c950, action=0x55556004bc90)
    at /home/halla/dev/krita/libs/widgetutils/xmlgui/kactioncollection.cpp:338
#3  0x00007ffff44b56c3 in KActionCollection::addAction (this=this@entry=0x55555768c950, name=..., 
    action=<optimized out>, action@entry=0x5555600b3690)
    at /home/halla/dev/krita/libs/widgetutils/xmlgui/kactioncollection.cpp:288
#4  0x00007ffff4f514c2 in KoZoomController::Private::init (this=0x555560609af0, co=<optimized out>, 
    zh=<optimized out>, actionCollection=0x55555768c950)
    at /home/halla/dev/krita/libs/widgets/KoZoomController.cpp:39
#5  0x00007ffff4f51704 in KoZoomController::KoZoomController (this=0x5555600b8c60, co=0x55555f56eef0, 
    zh=0x55555f56ee78, actionCollection=0x55555768c950, parent=<optimized out>)
    at /home/halla/dev/krita/libs/widgets/KoZoomController.cpp:50
#6  0x00007ffff7969992 in KisZoomController::KisZoomController (parent=0x55555f56ef40, 
    actionCollection=0x55555768c950, zh=0x55555f56ee78, co=<optimized out>, this=0x5555600b8c60)
    at /home/halla/dev/krita/libs/ui/kis_zoom_manager.cc:43
#7  KisZoomManager::setup (this=0x55555f56ef40, actionCollection=0x55555768c950)
    at /home/halla/dev/krita/libs/ui/kis_zoom_manager.cc:112
#8  0x00007ffff7cb187e in KisView::KisView (this=0x55555bbd8530, document=0x55555ad36660, 
    viewManager=<optimized out>, parent=<optimized out>) at /home/halla/dev/krita/libs/ui/KisView.cpp:231
#9  0x00007ffff7c9b7e7 in KisPart::createView (
    this=0x7ffff7fc3560 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>, 
    document=document@entry=0x55555ad36660, viewManager=0x5555576ad2f0, parent=parent@entry=0x555557668970)
    at /home/halla/dev/krita/libs/ui/KisPart.cpp:302
#10 0x00007ffff7c768d4 in KisMainWindow::addViewAndNotifyLoadingCompleted (this=0x555557668970, 
    document=0x55555ad36660, subWindow=0x0) at /home/halla/dev/krita/libs/ui/KisMainWindow.cpp:1075
#11 0x00007ffff5a6d100 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#12 0x00007ffff76db423 in KisOpenPane::documentSelected (this=<optimized out>, _t1=<optimized out>)
    at /home/halla/dev/b-krita/libs/ui/kritaui_autogen/EWIEGA46WW/moc_KisOpenPane.cpp:246
#13 0x00007ffff5a6d100 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#14 0x00007ffff660e746 in ?? () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#15 0x00007ffff5a6d100 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#16 0x00007ffff6567256 in QAbstractButton::clicked(bool) () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#17 0x00007ffff656747e in ?? () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#18 0x00007ffff65681e9 in QAbstractButton::click() () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#19 0x00007ffff64b5264 in QWidget::event(QEvent*) () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#20 0x00007ffff64720d6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#21 0x00007ffff647bd76 in QApplication::notify(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#22 0x00007ffff7c3ad1e in KisApplication::notify (this=0x7fffffffd270, receiver=0x55555f4bafa0, 
    event=0x7fffffffc230) at /home/halla/dev/krita/libs/ui/KisApplication.cpp:758
#23 0x00007ffff5a416ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#24 0x00007ffff64d3b8e in ?? () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#25 0x00007ffff64720d6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#26 0x00007ffff647b5d0 in QApplication::notify(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#27 0x00007ffff7c3ad1e in KisApplication::notify (this=0x7fffffffd270, receiver=0x5555604334b0, 
    event=0x7fffffffc230) at /home/halla/dev/krita/libs/ui/KisApplication.cpp:758
--Type <RET> for more, q to quit, c to continue without paging--
#28 0x00007ffff5a416ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#29 0x00007ffff5e2f2fb in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Gui.so.5
#30 0x00007ffff5e348c1 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /home/halla/dev/deps/lib/libQt5Gui.so.5
#31 0x00007ffff5e0e98c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    () from /home/halla/dev/deps/lib/libQt5Gui.so.5
#32 0x00007ffff012954e in ?? () from /home/halla/dev/deps/lib/libQt5XcbQpa.so.5
#33 0x00007ffff2f9c17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007ffff2f9c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff2f9c4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff5a99645 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#37 0x00007ffff5a4029b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#38 0x00007ffff66768fd in QDialog::exec() () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#39 0x00007ffff7c75173 in KisMainWindow::slotFileNew (this=<optimized out>)
    at /home/halla/dev/krita/libs/ui/KisMainWindow.cpp:1615
#40 0x00007ffff7c8a542 in KisMainWindow::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, 
    _id=<optimized out>, _a=<optimized out>)
    at /home/halla/dev/b-krita/libs/ui/kritaui_autogen/include/moc_KisMainWindow.cpp:364
#41 0x00007ffff5a6d100 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#42 0x00007ffff646ba36 in QAction::triggered(bool) () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#43 0x00007ffff646e0f2 in QAction::activate(QAction::ActionEvent) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#44 0x00007ffff646e9bf in QAction::event(QEvent*) () from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#45 0x00007ffff64720d6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#46 0x00007ffff647b5d0 in QApplication::notify(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Widgets.so.5
#47 0x00007ffff7c3ad1e in KisApplication::notify (this=0x7fffffffd270, receiver=0x55555c1c3e10, 
    event=0x7fffffffcb80) at /home/halla/dev/krita/libs/ui/KisApplication.cpp:758
#48 0x00007ffff5a416ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#49 0x00007ffff5e5d92e in QShortcutMap::dispatchEvent(QKeyEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Gui.so.5
#50 0x00007ffff5e5da13 in QShortcutMap::tryShortcut(QKeyEvent*) () from /home/halla/dev/deps/lib/libQt5Gui.so.5
#51 0x00007ffff5e11d13 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) ()
   from /home/halla/dev/deps/lib/libQt5Gui.so.5
#52 0x00007ffff5e2f221 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/halla/dev/deps/lib/libQt5Gui.so.5
#53 0x00007ffff5e348c1 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /home/halla/dev/deps/lib/libQt5Gui.so.5
#54 0x00007ffff5e0e98c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    () from /home/halla/dev/deps/lib/libQt5Gui.so.5
#55 0x00007ffff012954e in ?? () from /home/halla/dev/deps/lib/libQt5XcbQpa.so.5
#56 0x00007ffff2f9c17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#57 0x00007ffff2f9c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#58 0x00007ffff2f9c4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007ffff5a99645 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#60 0x00007ffff5a4029b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
--Type <RET> for more, q to quit, c to continue without paging--
   from /home/halla/dev/deps/lib/libQt5Core.so.5
#61 0x00007ffff5a47ff6 in QCoreApplication::exec() () from /home/halla/dev/deps/lib/libQt5Core.so.5
#62 0x000055555555d60f in main (argc=<optimized out>, argv=<optimized out>)
    at /home/halla/dev/krita/krita/main.cc:702
Comment 1 Halla Rempt 2022-04-06 14:04:23 UTC
Amyspark, could this be related to

https://invent.kde.org/graphics/krita/-/commit/bcff23b8f01e483fdde3807cb19eef6ad7ea4eca

?
Comment 2 amyspark 2022-04-06 15:12:38 UTC
Yes, the commit restores it to the previous state (though you'll instead trip UBsan). See the original blame: https://invent.kde.org/graphics/krita/-/blame/308d37a02f83d62fe616b1815e797996404febfc/libs/widgetutils/xmlgui/kactioncollection.cpp#L615.

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