Bug 391282 - New window crash on close (Krita 4 beta - Ubuntu 14.04 Unity)
Summary: New window crash on close (Krita 4 beta - Ubuntu 14.04 Unity)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.0.0-beta.1
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-02 08:20 UTC by mvowada
Modified: 2018-03-02 09:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
(GDB backtrace) (9.79 KB, text/plain)
2018-03-02 08:20 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2018-03-02 08:20:30 UTC
Created attachment 111129 [details]
(GDB backtrace)

Not sure the backtrace can be helpful since I'm using the appimage.
Steps:

    1) new document ("CTRL+N")
    2) paint some strokes

    3) Window > New Window (*)
    4) new document ("CTRL+N")
    5) paint some strokes

    6) close the open window

(*) Unity users have to create a shortcut to create a new window, the "Window" menu commands in Krita 4 Unity are not accessible from the main menu.

Actual Results: SIGSEGV, Segmentation fault


Note: the crash does not occur in Krita 3.3.3 appimage.
Comment 1 Halla Rempt 2018-03-02 09:35:28 UTC
Backtrace with line numbers:

Thread 1 (Thread 0x7f5288a46940 (LWP 10723)):
[KCrash Handler]
#6  0x00007f52881b09c4 in KisAction::activationFlags (this=this@entry=0xa06b8c0) at /home/boud/dev/krita/libs/ui/kis_action.cpp:98
#7  0x00007f52881b2cb3 in KisActionManager::updateGUI (this=<optimized out>) at /home/boud/dev/krita/libs/ui/kis_action_manager.cpp:309
#8  0x00007f5288392c9b in KisViewManager::guiUpdateTimeout (this=<optimized out>) at /home/boud/dev/krita/libs/ui/KisViewManager.cpp:1296
#9  0x00007f52883f9765 in KisViewManager::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-krita/libs/ui/moc_KisViewManager.cpp:190
#10 0x00007f527e0d643f in QMetaObject::activate (sender=0x88e1c68, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3766
#11 0x00007f527e0d643f in QMetaObject::activate (sender=sender@entry=0x88d80c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3766
#12 0x00007f527e0d7037 in QMetaObject::activate (sender=sender@entry=0x88d80c0, m=m@entry=0x7f52849d0b60 <KisRelaxedTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3628
#13 0x00007f52847c7bc0 in KisRelaxedTimer::timeout (this=this@entry=0x88d80c0) at /home/boud/dev/b-krita/libs/global/moc_kis_relaxed_timer.cpp:126
#14 0x00007f52847c1daa in KisRelaxedTimer::timerEvent (this=0x88d80c0, event=<optimized out>) at /home/boud/dev/krita/libs/global/kis_relaxed_timer.cpp:100
#15 0x00007f527e0d7b54 in QObject::event (this=0x88d80c0, e=<optimized out>) at kernel/qobject.cpp:1227
#16 0x00007f527efd07fc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x88d80c0, e=0x7ffe7cdb0c20) at kernel/qapplication.cpp:3733
#17 0x00007f527efd75e0 in QApplication::notify (this=0x7ffe7cdb1380, receiver=receiver@entry=0x88d80c0, e=e@entry=0x7ffe7cdb0c20) at kernel/qapplication.cpp:3492
#18 0x00007f5288333117 in KisApplication::notify (this=<optimized out>, receiver=0x88d80c0, event=0x7ffe7cdb0c20) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:601
#19 0x00007f527e0ac175 in QCoreApplication::notifyInternal2 (receiver=0x88d80c0, event=event@entry=0x7ffe7cdb0c20) at kernel/qcoreapplication.cpp:1044
#20 0x00007f527e0fe47e in QCoreApplication::sendEvent (event=0x7ffe7cdb0c20, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:234
#21 QTimerInfoList::activateTimers (this=0x2d68f70) at kernel/qtimerinfo_unix.cpp:643
#22 0x00007f527e0feac1 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#23 0x00007f5279235134 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x00007f5279235388 in ?? () from /usr/lib64/libglib-2.0.so.0
#25 0x00007f527923542c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#26 0x00007f527e0fedec in QEventDispatcherGlib::processEvents (this=this@entry=0x2d68ff0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#27 0x00007f527228f471 in QPAEventDispatcherGlib::processEvents (this=0x2d68ff0, flags=...) at qeventdispatcher_glib.cpp:69
#28 0x00007f527e0aa89b in QEventLoop::exec (this=this@entry=0x7ffe7cdb0e70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#29 0x00007f527e0b2f54 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1332
#30 0x00007f527e619e5c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1687
#31 0x00007f527efd0755 in QApplication::exec () at kernel/qapplication.cpp:2918
#32 0x0000000000405b59 in main (argc=1, argv=0x7ffe7cdb1508) at /home/boud/dev/krita/krita/main.cc:349
Comment 2 Halla Rempt 2018-03-02 09:53:31 UTC
Git commit 66efad8c393daf09c81e9dfa8014879f2aab61e4 by Boudewijn Rempt.
Committed on 02/03/2018 at 09:52.
Pushed by rempt into branch 'master'.

Wrap list of actions in QPointers

The delayed timer for updating the gui might actually call updateGUI
after the window has been destroyed, so the actions are all gone. To
avoid the timing issue, wrap the actions the Action Manager manages
but not owns in a QPointer

M  +18   -17   libs/ui/kis_action_manager.cpp

https://commits.kde.org/krita/66efad8c393daf09c81e9dfa8014879f2aab61e4
Comment 3 Halla Rempt 2018-03-02 09:53:50 UTC
Git commit 79c3fa4b8a4a510bb512bdfbe64ce4955007b04b by Boudewijn Rempt.
Committed on 02/03/2018 at 09:53.
Pushed by rempt into branch 'krita/4.0'.

Wrap list of actions in QPointers

The delayed timer for updating the gui might actually call updateGUI
after the window has been destroyed, so the actions are all gone. To
avoid the timing issue, wrap the actions the Action Manager manages
but not owns in a QPointer
(cherry picked from commit 66efad8c393daf09c81e9dfa8014879f2aab61e4)

M  +18   -17   libs/ui/kis_action_manager.cpp

https://commits.kde.org/krita/79c3fa4b8a4a510bb512bdfbe64ce4955007b04b