Bug 402679 - Do not enable the Brushes and Stuff toolbar after editing it.
Summary: Do not enable the Brushes and Stuff toolbar after editing it.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-29 15:32 UTC by mvowada
Modified: 2019-09-21 12:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
(Video of the steps) (560.85 KB, video/mp4)
2018-12-29 15:32 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2018-12-29 15:32:24 UTC
Created attachment 117167 [details]
(Video of the steps)

(Krita - Ubuntu 14.04 - i3 window manager)

I'm having a crash by doing (see video):

    1. fresh configs + start (no documents)
    2. "Settings" > "Configure Toolbars..." > edit and click "OK"
    3. (toolbar >) "Choose brush preset" > new "Tag" > type in a name > "Enter" key
    4. Left-click on any brush preset in the window.

Actual Results: SIGSEGV and freezing of the OS. Terminal says something like:

    Thread 1 "AppRun" received signal SIGSEGV, Segmentation fault.
    0x00007ffff46fadc0 in QObject::blackSignals(bool) () from /tmp/.mount_KritairlyBm/usr/bin/../lib/libQt5Core.so.5
Comment 1 mvowada 2018-12-29 15:38:19 UTC
(Tested with Krita 4.2.0-pre-alpha (git ea51095) on Ubuntu 14.04 - i3 window manager)
Comment 2 wolthera 2018-12-29 15:46:02 UTC
I can reproduce that editing the toolbar will enable it even though it should not (which is a bug), but I cannot reproduce the crash itself(on git 903fc90 with Kde Neon/ubutu 18.04) despite building with asserts.

That said, the editable toolbar should be fixed :)

Next time, see if you can get the full backtrace with 'thread apply all backtrace' if you're running in GDB.
Comment 3 mvowada 2018-12-30 10:44:30 UTC
Hi Wolthera,
(In reply to wolthera from comment #2)
> Next time, see if you can get the full backtrace with 'thread apply all
> backtrace' if you're running in GDB.
I'm sorry, the OS freezes as soon as I try to choose a preset (point 4) and I always have to shutdown through the power button (tested using the Appimage with both "i3wm" and "Unity/Compiz" as window managers).
Comment 4 wolthera 2018-12-30 13:18:39 UTC
Oh, right, that's not an OS freeze so much as that the pop-up prevents you from switching to the terminal... Hmz, what to do, what to do...
Comment 5 Halla Rempt 2019-01-06 09:59:55 UTC
Well, one could attach gdb to the krita process from a console terminal -- depending on whether that's enabled. *buntu disables consoles at the moment, I think.
Comment 6 Halla Rempt 2019-01-06 10:01:03 UTC
Thread 1 (Thread 0x7fb6f5641800 (LWP 13694)):
[KCrash Handler]
#6  0x00007fb6f14a88e0 in QObject::blockSignals(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fb6f40229dd in KisSignalsBlocker::blockObjects (this=0x7ffe4ae7a7f0) at /home/boud/dev/krita/libs/global/kis_signals_blocker.h:82
#8  KisSignalsBlocker::KisSignalsBlocker (this=0x7ffe4ae7a7f0, object=<optimized out>) at /home/boud/dev/krita/libs/global/kis_signals_blocker.h:65
#9  0x00007fb6f401feff in KisPaintopBox::resourceSelected (this=0x5602d9f6be50, resource=0x5602d3c0a220) at /home/boud/dev/krita/libs/ui/kis_paintop_box.cc:567
#10 0x00007fb6f43c51d4 in KisPaintopBox::qt_static_metacall (_o=0x5602d9f6be50, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_paintop_box.cpp:236
#11 0x00007fb6f14ab075 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fb6f43d05bf in KisPaintOpPresetsChooserPopup::resourceSelected (this=<optimized out>, _t1=<optimized out>) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/IMAN36LHMA/moc_kis_paintop_presets_chooser_popup.cpp:182
#13 0x00007fb6f43d037c in KisPaintOpPresetsChooserPopup::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/IMAN36LHMA/moc_kis_paintop_presets_chooser_popup.cpp:103
#14 0x00007fb6f14ab075 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fb6f43d13ef in KisPresetChooser::resourceSelected (this=<optimized out>, _t1=<optimized out>) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/IMAN36LHMA/moc_kis_preset_chooser.cpp:170
#16 0x00007fb6f14ab075 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fb6ee7e0d6f in KoResourceItemChooser::resourceSelected (this=this@entry=0x5602da7f1190, _t1=<optimized out>, _t1@entry=0x5602d3c0a220) at /home/boud/dev/b-krita/libs/widgets/kritawidgets_autogen/EWIEGA46WW/moc_KoResourceItemChooser.cpp:206
#18 0x00007fb6ee741d2d in KoResourceItemChooser::activated (this=0x5602da7f1190, index=...) at /home/boud/dev/krita/libs/widgets/KoResourceItemChooser.cpp:385
#19 0x00007fb6f14ab075 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fb6ee7e1fd2 in KoResourceItemView::currentResourceChanged (this=this@entry=0x5602da7f21d0, _t1=...) at /home/boud/dev/b-krita/libs/widgets/kritawidgets_autogen/EWIEGA46WW/moc_KoResourceItemView.cpp:168
#21 0x00007fb6ee746c2c in KoResourceItemView::selectionChanged (this=0x5602da7f21d0, selected=...) at /home/boud/dev/krita/libs/widgets/KoResourceItemView.cpp:62
#22 0x00007fb6f24597c1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007fb6f14ab075 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007fb6f1432c47 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007fb6f14377b0 in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007fb6f143acfb in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fb6f24a7d5f in QTableView::setSelection(QRect const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fb6f245b9b9 in QAbstractItemView::mousePressEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007fb6f22483ef in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007fb6f22e95de in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007fb6f2460a2b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007fb6ee7468bc in KoResourceItemView::viewportEvent (this=0x5602da7f21d0, event=0x7ffe4ae7ba80) at /home/boud/dev/krita/libs/widgets/KoResourceItemView.cpp:53
#33 0x00007fb6f147bd6d in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007fb6f2208df5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007fb6f2210f87 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007fb6f42a17c7 in KisApplication::notify (this=<optimized out>, receiver=0x5602da7f2a30, event=0x7ffe4ae7ba80) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#37 0x00007fb6f147bfe8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007fb6f220f8d2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007fb6f226294a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007fb6f2265229 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007fb6f2208e1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007fb6f22103ef in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007fb6f42a17c7 in KisApplication::notify (this=<optimized out>, receiver=0x5602d8a07290, event=0x7ffe4ae7bef0) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#44 0x00007fb6f147bfe8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x00007fb6f1a0c7bb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#46 0x00007fb6f1a0e335 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#47 0x00007fb6f19e6f5b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#48 0x00007fb6e127176b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#49 0x00007fb6f147a30a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007fb6f14834d0 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00005602ceb8f72b in main (argc=<optimized out>, argv=0x7ffe4ae7c468) at /home/boud/dev/krita/krita/main.cc:459
Comment 7 Halla Rempt 2019-01-06 10:33:07 UTC
Git commit b1e502e5ccf31ab2bf1363a83068e5aa13ebbca1 by Boudewijn Rempt.
Committed on 06/01/2019 at 10:31.
Pushed by rempt into branch 'master'.

Add a safe assert to prevent Krita from crashing when a toolbar gets accidentally enabled

How to make sure the toolbar stays disabled when it's edited is
a more difficult problem, but at least now Krita only triggers
a safe assert return, which means that there is no user-visible
crash.

M  +2    -0    libs/ui/kis_paintop_box.cc

https://commits.kde.org/krita/b1e502e5ccf31ab2bf1363a83068e5aa13ebbca1
Comment 8 Dmitry Kazakov 2019-09-16 09:55:14 UTC
Git commit ccd7785cd0aa5dc286002dabe22b7098d7378337 by Dmitry Kazakov.
Committed on 16/09/2019 at 09:55.
Pushed by dkazakov into branch 'master'.

Fix availablity of toolbars after editing

Bascially, when the toolbars are edited without any document open,
they should still be disabled after editing.

M  +8    -0    libs/ui/KisMainWindow.cpp
M  +2    -0    libs/ui/KisMainWindow.h

https://invent.kde.org/kde/krita/commit/ccd7785cd0aa5dc286002dabe22b7098d7378337
Comment 9 Dmitry Kazakov 2019-09-21 12:09:06 UTC
Git commit 6e17183815e54f4b0e83714973d4277fe4e05ac1 by Dmitry Kazakov.
Committed on 21/09/2019 at 10:01.
Pushed by dkazakov into branch 'krita/4.2'.

Fix availablity of toolbars after editing

Bascially, when the toolbars are edited without any document open,
they should still be disabled after editing.

M  +8    -0    libs/ui/KisMainWindow.cpp
M  +2    -0    libs/ui/KisMainWindow.h

https://invent.kde.org/kde/krita/commit/6e17183815e54f4b0e83714973d4277fe4e05ac1