Bug 345195 - Crash when deleting animated brush
Summary: Crash when deleting animated brush
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (other bugs)
Version First Reported In: 2.9
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Stefano Bonicatti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-16 01:11 UTC by Chris Jones
Modified: 2015-08-08 09:11 UTC (History)
3 users (show)

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


Attachments
I get a crash of Krita and OS freeze, by *only* clicking on a generated tip in the tab "Predefined" (brush editor). See video in attachment (Ubuntu 14.04 Unity - Krita: 2.9.1) (917.27 KB, video/mp4)
2015-03-16 20:59 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jones 2015-03-16 01:11:28 UTC
If an animated brush is deleted from the predefined tips immediately after creating it, Krita crashes.

Reproducible: Always

Steps to Reproduce:
1. Create a 100x100 image
2. Go to Edit Brush Settings > Stamp
3. Name the brush, set Style to Animated and click on Add to Predefined Tips
4. Under the Predefined tab, select the newly created brush, and click on Delete Resource
Comment 1 Halla Rempt 2015-03-16 09:27:21 UTC
Hi Chris,

Thanks for your report. I can confirm the crash:

Thread 1 (Thread 0x7fc79cdc77c0 (LWP 3803)):
[KCrash Handler]
#5  0x0000000000000000 in  ()
#6  0x00007fc79be23379 in KisImagePipeBrush::setScale(double) (scale=0.40322580645161288, this=<optimized out>) at /home/boud/kde/src/psd/krita/libbrush/kis_brushes_pipe.h:82
#7  0x00007fc79be23379 in KisImagePipeBrush::setScale(double) (this=0x6461ad0, _scale=0.40322580645161288) at /home/boud/kde/src/psd/krita/libbrush/kis_imagepipe_brush.cpp:417
#8  0x00007fc775dc2393 in KisBrushChooser::slotSetItemSize(double) (this=this@entry=0xa1b9bb0, sizeValue=1000) at /home/boud/kde/src/psd/krita/plugins/paintops/libpaintop/kis_brush_chooser.cpp:208
#9  0x00007fc775dc3959 in KisBrushChooser::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0xa1b9bb0, _c=<optimized out>, _id=2, _a=0x7fffd8e66d80) at /home/boud/kde/build/psd/krita/plugins/paintops/libpaintop/kis_brush_chooser.moc:65
#10 0x00007fc7950dc1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0xa1ba370, m=m@entry=0x7fc79cb84bc0 <KisDoubleSliderSpinBox::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd8e66d80) at kernel/qobject.cpp:3576
#11 0x00007fc79c2f7f40 in KisDoubleSliderSpinBox::valueChanged(double) (this=<optimized out>, _t1=1000) at /home/boud/kde/build/psd/krita/ui/moc_kis_slider_spin_box.cpp:289
#12 0x00007fc79c62aae9 in KisDoubleSliderSpinBox::setValue(double) (this=0xa1ba370, value=<optimized out>) at /home/boud/kde/src/psd/krita/ui/widgets/kis_slider_spin_box.cpp:642
#13 0x00007fc775dc280a in KisBrushChooser::update(KoResource*) (this=this@entry=0xa1b9bb0, resource=0x6461ad0) at /home/boud/kde/src/psd/krita/plugins/paintops/libpaintop/kis_brush_chooser.cpp:265
#14 0x00007fc775dc3920 in KisBrushChooser::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0xa1b9bb0, _c=<optimized out>, _id=7, _a=0x7fffd8e67030) at /home/boud/kde/build/psd/krita/plugins/paintops/libpaintop/kis_brush_chooser.moc:70
#15 0x00007fc7950dc1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0xa29f660, m=m@entry=0x7fc799add380 <KoResourceItemChooser::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd8e67030) at kernel/qobject.cpp:3576
#16 0x00007fc79986235f in KoResourceItemChooser::resourceSelected(KoResource*) (this=this@entry=0xa29f660, _t1=_t1@entry=0x6461ad0) at /home/boud/kde/build/psd/libs/widgets/KoResourceItemChooser.moc:114
#17 0x00007fc7998627a9 in KoResourceItemChooser::activated(QModelIndex const&) (this=0xa29f660) at /home/boud/kde/src/psd/libs/widgets/KoResourceItemChooser.cpp:396
#18 0x00007fc7950dc1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0xa29f2b0, m=m@entry=0x7fc799addce0 <KoResourceItemView::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffd8e67180) at kernel/qobject.cpp:3576
#19 0x00007fc7998667ed in KoResourceItemView::selectionChanged(QItemSelection const&, QItemSelection const&) (_t1=..., this=0xa29f2b0) at /home/boud/kde/build/psd/libs/widgets/KoResourceItemView.moc:101
#20 0x00007fc7998667ed in KoResourceItemView::selectionChanged(QItemSelection const&, QItemSelection const&) (this=0xa29f2b0, selected=...) at /home/boud/kde/src/psd/libs/widgets/KoResourceItemView.cpp:70
#21 0x00007fc7950dc1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0xa2b2da0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffd8e672c0) at kernel/qobject.cpp:3576
#22 0x00007fc79601a087 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) () at /usr/lib64/libQtGui.so.4
#23 0x00007fc79601f6c1 in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) () at /usr/lib64/libQtGui.so.4
#24 0x00007fc79601fe93 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) () at /usr/lib64/libQtGui.so.4
#25 0x00007fc79601aed8 in QItemSelectionModel::select(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () at /usr/lib64/libQtGui.so.4
#26 0x00007fc79601a2b7 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () at /usr/lib64/libQtGui.so.4
#27 0x00007fc795fc64ca in QAbstractItemView::setCurrentIndex(QModelIndex const&) () at /usr/lib64/libQtGui.so.4
#28 0x00007fc799862745 in KoResourceItemChooser::setCurrentItem(int, int) (this=this@entry=0xa29f660, row=row@entry=21, column=column@entry=1) at /home/boud/kde/src/psd/libs/widgets/KoResourceItemChooser.cpp:379
#29 0x00007fc79986350b in KoResourceItemChooser::slotButtonClicked(int) (this=0xa29f660, button=<optimized out>) at /home/boud/kde/src/psd/libs/widgets/KoResourceItemChooser.cpp:223
#30 0x00007fc7950dc1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0xa2bb4a0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffd8e67850) at kernel/qobject.cpp:3576
#31 0x00007fc79611f851 in QButtonGroup::buttonClicked(int) () at /usr/lib64/libQtGui.so.4
#32 0x00007fc795e8300c in  () at /usr/lib64/libQtGui.so.4
#33 0x00007fc795e84153 in  () at /usr/lib64/libQtGui.so.4
#34 0x00007fc795e8423c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#35 0x00007fc795b25c0a in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#36 0x00007fc795ad676c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#37 0x00007fc795adcdea in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#38 0x00007fc79c6819b7 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0xa2bc200, event=0x7fffd8e67d80) at /home/boud/kde/src/psd/krita/ui/KisApplication.cpp:488
#39 0x00007fc7950c82ad in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fffd8e687e0, receiver=0xa2bc200, event=0x7fffd8e67d80) at kernel/qcoreapplication.cpp:953
#40 0x00007fc795adc5e3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#41 0x00007fc795b4dfcc in  () at /usr/lib64/libQtGui.so.4
#42 0x00007fc795b4c70c in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#43 0x00007fc795b735c2 in  () at /usr/lib64/libQtGui.so.4
#44 0x00007fc78bf2ca04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#45 0x00007fc78bf2cc48 in  () at /usr/lib64/libglib-2.0.so.0
#46 0x00007fc78bf2ccec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#47 0x00007fc7950f50be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xc58e20, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#48 0x00007fc795b73676 in  () at /usr/lib64/libQtGui.so.4
#49 0x00007fc7950c6e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd8e68490, flags=...) at kernel/qeventloop.cpp:149
#50 0x00007fc7950c7165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd8e68490, flags=...) at kernel/qeventloop.cpp:204
#51 0x00007fc7950cc5b9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#52 0x0000000000402ad2 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/psd/krita/main.cc:179
Comment 2 mvowada 2015-03-16 20:59:41 UTC
Created attachment 91584 [details]
I get a crash of Krita and OS freeze, by *only* clicking on a generated tip in the tab "Predefined" (brush editor). See video in attachment (Ubuntu 14.04 Unity - Krita: 2.9.1)
Comment 3 Stefano Bonicatti 2015-08-08 09:11:32 UTC
Git commit d1a2c1fbbdd5544ecea3484c2d2d37be2864a16b by Stefano Bonicatti.
Committed on 08/08/2015 at 09:09.
Pushed by stefanobonicatti into branch 'calligra/2.9'.

Brush editor Stamp and Clipboard refactoring

The Stamp and Clipboard tabs are removed and they become buttons
in the Predefined tab, so that the user must add a predefined
brush tip to use it first.
This solves some issues and inconsistencies with
temporary brush tips by removing the need of them.

Fixes a crash that happened when selecting a temporary brush
after adding the respective clone to the predefined or
when deleting the cloned brush.

Fixes a crash when attempting to add a Clipboard brush tip when the
clipboard is empty.
REVIEW: 124048
CCMAIL: kimageshop@kde

M  +1    -2    krita/libbrush/kis_imagepipe_brush.cpp
M  +31   -19   krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui
M  +31   -14   krita/plugins/paintops/libpaintop/forms/wdgcustombrush.ui
M  +57   -2    krita/plugins/paintops/libpaintop/kis_brush_chooser.cpp
M  +9    -0    krita/plugins/paintops/libpaintop/kis_brush_chooser.h
M  +1    -15   krita/plugins/paintops/libpaintop/kis_brush_selection_widget.cpp
M  +0    -2    krita/plugins/paintops/libpaintop/kis_brush_selection_widget.h
M  +19   -31   krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
M  +5    -7    krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.h
M  +5    -27   krita/plugins/paintops/libpaintop/kis_custom_brush_widget.cpp
M  +4    -7    krita/plugins/paintops/libpaintop/kis_custom_brush_widget.h
M  +24   -11   libs/widgets/KoResourceItemChooser.cpp
M  +3    -0    libs/widgets/KoResourceItemChooser.h

http://commits.kde.org/calligra/d1a2c1fbbdd5544ecea3484c2d2d37be2864a16b