Bug 374497

Summary: Crash when performing any action immediately after Tool Options location is changed to "toolbar"
Product: [Applications] krita Reporter: Neviril <nevineviril>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: freebox64, halla
Priority: NOR    
Version: 3.1.1   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: (GDB Report of the crash)

Description Neviril 2017-01-03 14:56:39 UTC
A prerequisite for this bug is that Tool Option location is in the docker and that there is an open file.

=Reproducibility=

I have tested it three consecutive times without fail.

=How to reproduce=

1) Have the Tool Options docker visible;
2) "Configure Krita" > General > Tools > Tool Options Location > In Toolbar;
3) Press OK;
4) Choose any tool that will change the content of the Tool Options docker. I first encountered the bug by pressing "V" to engage the straight line tool) or perform any action that will do the same.

=Result=

Krita will crash. Any unsaved result will be lost unless an autosave is available.

=Expected result=

The dialog window that allows to change the Tool Options location states that Krita needs a restart after the operation. This appears to suggest that doing so is not strictly necessary to keep using the program.
Comment 1 Neviril 2017-01-03 15:04:20 UTC
Clarification/rephrasing for the expected result described above:

"The assumption is that restarting Krita is needed to apply the setting and that there is no suggestion that doing so is strictly necessary to keep using the program."
Comment 2 mvowada 2017-01-03 18:51:06 UTC
Created attachment 103172 [details]
(GDB Report of the crash)

Yes, I can reproduce the crash on Ubuntu 14.04 - Krita 3.1.1.
Comment 3 Halla Rempt 2017-01-04 08:00:52 UTC
Backtrace with debug information:

0x00007fffef191ad9 in QAbstractButton::setIcon(QIcon const&) () from /home/boud/dev/deps/lib/libQt5Widgets.so.5
(gdb) bt
#0  0x00007fffef191ad9 in QAbstractButton::setIcon(QIcon const&) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#1  0x00007ffff774a5d8 in KisPaintopBox::slotUpdateSelectionIcon() (this=0x90cf790)
    at /home/boud/dev/krita/libs/ui/kis_paintop_box.cc:1241
#2  0x00007ffff798a84d in KisPaintopBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /home/boud/dev/build/libs/ui/kritaui_automoc.dir/moc_kis_paintop_bo_UI5QS5MSQZR4CW.cpp:260
#3  0x00007fffee0d4441 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /home/boud/dev/deps/lib/libQt5Core.so.5
#4  0x00007ffff7903a40 in KisMainWindow::slotThemeChanged() (this=0x8c4d600)
    at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:633
#5  0x00007ffff790e4fb in KisMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x8c4d600, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffb880)
    at /home/boud/dev/build/libs/ui/moc_KisMainWindow.cpp:341
#6  0x00007fffee0d4441 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /home/boud/dev/deps/lib/libQt5Core.so.5
#7  0x00007ffff792f314 in Digikam::ThemeManager::slotChangePalette() (this=this@entry=0x9614830)
    at /home/boud/dev/krita/libs/ui/thememanager.cpp:200
#8  0x00007ffff792f746 in Digikam::ThemeManager::setCurrentTheme(QString const&) (this=0x9614830, name=...)
    at /home/boud/dev/krita/libs/ui/thememanager.cpp:142
#9  0x00007ffff790a399 in KisMainWindow::configChanged() (this=0x8c4d600)
    at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:2085
#10 0x00007ffff790e3de in KisMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x8c4d600, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffbde0)
    at /home/boud/dev/build/libs/ui/moc_KisMainWindow.cpp:347
#11 0x00007fffee0d4441 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /home/boud/dev/deps/lib/libQt5Core.so.5
#12 0x00007ffff76e606c in KisConfig::setSwitchSelectionCtrlAlt(bool) (this=this@entry=
    0x7fffffffc000, value=false) at /home/boud/dev/krita/libs/ui/kis_config.cc:1696
#13 0x00007ffff7679e6d in KisDlgPreferences::editPreferences() ()
    at /home/boud/dev/krita/libs/ui/dialogs/kis_dlg_preferences.cc:1015
#14 0x00007ffff78ffe14 in KisMainWindow::slotPreferences() (this=0x8c4d600)
    at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:600
#15 0x00007ffff790e5ea in KisMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x8c4d600, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc2b0)
    at /home/boud/dev/build/libs/ui/moc_KisMainWindow.cpp:303
#16 0x00007fffee0d4441 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /home/boud/dev/deps/lib/libQt5Core.so.5
#17 0x00007fffef091842 in QAction::triggered(bool) () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#18 0x00007fffef0943dd in QAction::activate(QAction::ActionEvent) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#19 0x00007fffef20f342 in  () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#20 0x00007fffef2144f0 in  () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#21 0x00007fffef21803b in QMenu::mouseReleaseEvent(QMouseEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#22 0x00007fffef0dcbaa in QWidget::event(QEvent*) () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#23 0x00007fffef21897b in QMenu::event(QEvent*) () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#24 0x00007fffef09adec in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#25 0x00007fffef09fcc4 in QApplication::notify(QObject*, QEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#26 0x00007ffff78d7f77 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x9d2e050, event=0x7fffffffc970) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:537
#27 0x00007fffee0aa8e5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Core.so.5
#28 0x00007fffef09e9c0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#29 0x00007fffef0f5d54 in  () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#30 0x00007fffef0f7d53 in  () at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#31 0x00007fffef09adec in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#32 0x00007fffef09f44a in QApplication::notify(QObject*, QEvent*) ()
    at /home/boud/dev/deps/lib/libQt5Widgets.so.5
#33 0x00007ffff78d7f77 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x9efd290, ev
Comment 4 Halla Rempt 2017-01-04 08:04:08 UTC
Git commit 5e85387243ee1e5a7165bdf4dd5a5247121782d0 by Boudewijn Rempt.
Committed on 04/01/2017 at 08:03.
Pushed by rempt into branch 'master'.

M  +1    -1    libs/ui/kis_paintop_box.cc

https://commits.kde.org/krita/5e85387243ee1e5a7165bdf4dd5a5247121782d0
Comment 5 Halla Rempt 2017-01-04 08:04:17 UTC
Git commit d201ed1cf8bf12d3805c6415c31ead1a931928c5 by Boudewijn Rempt.
Committed on 04/01/2017 at 08:04.
Pushed by rempt into branch 'krita/3.1'.

M  +1    -1    libs/ui/kis_paintop_box.cc

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