Bug 330210 - Multibrush Tool crash.
Summary: Multibrush Tool crash.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-20 15:58 UTC by Paul Geraskin
Modified: 2014-01-24 08:33 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 Paul Geraskin 2014-01-20 15:58:22 UTC
Hi.

I get always crash when i try to baint with my preset:
- Create canvas 1920x1080
- Download my presets https://github.com/vascoalexander/krita-brushset-mifth/archive/master.zip
- select preset "mifth_grunge_16"
- Take MultyBrush Tool (Q key)
- Draw - CRASH!

Crash:
http://pastebin.com/fyh5YnzY

Thanks.
Comment 1 Halla Rempt 2014-01-20 16:00:31 UTC
Application: Krita (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f98f460d7c0 (LWP 32635))]

Thread 8 (Thread 0x7f98ceb2e700 (LWP 32636)):
#0  0x00007f98ef6a5ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f98f318c14b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f3188067 in QSemaphore::acquire(int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98dc400dce in KisTileDataPooler::waitForWork (this=this@entry=0x2d1d8c0) at /home/mifth/kde4/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007f98dc40117b in KisTileDataPooler::run (this=0x2d1d8c0) at /home/mifth/kde4/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#7  0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 7 (Thread 0x7f98ce32d700 (LWP 32637)):
#0  0x00007f98ef6a5ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f98f318c14b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f3188438 in QSemaphore::tryAcquire(int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98dc41f133 in KisTileDataSwapper::waitForWork (this=<optimized out>) at /home/mifth/kde4/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007f98dc41f42a in KisTileDataSwapper::run (this=0x2d1d8f8) at /home/mifth/kde4/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#7  0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 6 (Thread 0x7f98b6f4f700 (LWP 32644)):
#0  0x00007f98f1e8a233 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f98f32b44f3 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f32b9499 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98f32b9c82 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f98f328738f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f98f3287618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f98f3189410 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f98f3268edf in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#10 0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7f98b674e700 (LWP 32647)):
#0  0x00007f98ef6a605e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f98f318c0a7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f317f64f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#5  0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7f98cc84e700 (LWP 32648)):
#0  0x00007f98ef6a605e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f98f318c0a7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f317f64f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#5  0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f98bffff700 (LWP 32649)):
#0  0x00007f98ef6a5ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f98f318c14b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f2b1f7a6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#3  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#5  0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f98bf7fe700 (LWP 32650)):
#0  0x00007f98f1e8a233 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f98f32b44f3 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f98f32b9499 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f98f32b9c82 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f98f328738f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f98f3287618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f98f3189410 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f98f3268edf in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f98f318bbec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f98e283b764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#10 0x00007f98ef6a1f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007f98f1e91e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f98f460d7c0 (LWP 32635)):
[KCrash Handler]
#5  deref (this=0x21) at /usr/include/qt4/QtCore/qatomic_x86_64.h:133
#6  operator= (v=..., this=0x39cf128) at /usr/include/qt4/QtCore/qvector.h:394
#7  KisBoundary::generateBoundary (this=0x3b243f0) at /home/mifth/kde4/src/calligra/krita/plugins/paintops/libbrush/kis_boundary.cc:50
#8  0x00007f98cf883486 in KisBrush::generateBoundary (this=0x7f98c4003fe0) at /home/mifth/kde4/src/calligra/krita/plugins/paintops/libbrush/kis_brush.cpp:526
#9  0x00007f98cf8835cd in KisBrush::boundary (this=0x7f98c4003fe0) at /home/mifth/kde4/src/calligra/krita/plugins/paintops/libbrush/kis_brush.cpp:532
#10 0x00007f98cf8822d0 in KisBrush::outline (this=<optimized out>) at /home/mifth/kde4/src/calligra/krita/plugins/paintops/libbrush/kis_brush.cpp:558
#11 0x00007f98cfb2a087 in KisBrushBasedPaintOpSettings::brushOutline (this=0x38473c0, info=..., mode=<optimized out>) at /home/mifth/kde4/src/calligra/krita/plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp:66
#12 0x00007f98dd2a1950 in KisToolFreehandHelper::paintOpOutline (this=<optimized out>, savedCursorPos=..., event=event@entry=0x7fff76abc540, globalSettings=<optimized out>, mode=mode@entry=KisPaintOpSettings::CursorIsOutline) at /home/mifth/kde4/src/calligra/krita/ui/tool/kis_tool_freehand_helper.cpp:156
#13 0x00007f98dd29f81d in KisToolFreehand::getOutlinePath (this=0x5f9e860, documentPos=..., event=0x7fff76abc540, outlineMode=KisPaintOpSettings::CursorIsOutline) at /home/mifth/kde4/src/calligra/krita/ui/tool/kis_tool_freehand.cc:386
#14 0x00007f98dd2a7dc4 in KisToolPaint::requestUpdateOutline (this=0x5f9e860, outlineDocPoint=..., event=0x7fff76abc540) at /home/mifth/kde4/src/calligra/krita/ui/tool/kis_tool_paint.cc:506
#15 0x00007f98dd29f05f in KisToolFreehand::continuePrimaryAction (this=0x5f9e860, event=0x7fff76abc540) at /home/mifth/kde4/src/calligra/krita/ui/tool/kis_tool_freehand.cc:212
#16 0x00007f98dd13d7be in KisToolProxy::forwardToTool (this=this@entry=0x437c260, state=state@entry=KisToolProxy::CONTINUE, action=action@entry=KisTool::Primary, event=event@entry=0x7fff76abced0, docPoint=...) at /home/mifth/kde4/src/calligra/krita/ui/canvas/kis_tool_proxy.cpp:174
#17 0x00007f98dd13dc0b in KisToolProxy::forwardEvent (this=0x437c260, state=state@entry=KisToolProxy::CONTINUE, action=action@entry=KisTool::Primary, event=event@entry=0x7fff76abced0, originalEvent=originalEvent@entry=0x7fff76abced0, lastTabletEvent=lastTabletEvent@entry=0x0, canvasOriginWorkaround=...) at /home/mifth/kde4/src/calligra/krita/ui/canvas/kis_tool_proxy.cpp:134
#18 0x00007f98dd2ed585 in inputEvent (event=0x7fff76abced0, this=0x437ccb0) at /home/mifth/kde4/src/calligra/krita/ui/input/kis_tool_invocation_action.cpp:133
#19 KisToolInvocationAction::inputEvent (this=0x437ccb0, event=0x7fff76abced0) at /home/mifth/kde4/src/calligra/krita/ui/input/kis_tool_invocation_action.cpp:126
#20 0x00007f98dd2f4f30 in KisShortcutMatcher::mouseMoved (this=<optimized out>, event=event@entry=0x7fff76abced0) at /home/mifth/kde4/src/calligra/krita/ui/input/kis_shortcut_matcher.cpp:215
#21 0x00007f98dd2eab2c in KisInputManager::eventFilter (this=0x437c710, object=<optimized out>, event=0x7fff76abced0) at /home/mifth/kde4/src/calligra/krita/ui/input/kis_input_manager.cpp:635
#22 0x00007f98f32887a6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007f98f262e8bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007f98f2631a33 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007f98dcd31128 in KoApplication::notify (this=<optimized out>, receiver=0x2994fa0, event=0x7fff76abced0) at /home/mifth/kde4/src/calligra/libs/main/KoApplication.cpp:559
#26 0x00007f98f328863e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#27 0x00007f98f2634933 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007f98f26a9e54 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007f98f26a8e81 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007f98f26d4ac9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007f98f328738f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#32 0x00007f98f3287618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#33 0x00007f98f328ccf6 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00007f98dd5e6f74 in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/mifth/kde4/src/calligra/krita/main.cc:101
#35 0x00000000004084ea in _start ()
Comment 2 Dmitry Kazakov 2014-01-24 08:33:03 UTC
Git commit 791e7441181a31ebd33bf8385296201350a7d5ab by Dmitry Kazakov.
Committed on 24/01/2014 at 08:32.
Pushed by dkazakov into branch 'master'.

Fix the crash when using multihand tool with some complicated brushes

Right now the brush server returns the pointers to the brushes instead
of the copies of them, so when changing its parameters, the change is
shared among all their users. For now it is an acceptable behavior,
because even the Multihand Brush Tool uses the same brush for all the
"hands". But we should ensure that we don't reset internal state of
the brush when reloading it with the same config options.
Related: bug 330212, bug 330199

M  +17   -3    krita/plugins/paintops/libbrush/kis_gbr_brush.cpp
M  +3    -0    krita/plugins/paintops/libbrush/kis_predefined_brush_factory.cpp

http://commits.kde.org/calligra/791e7441181a31ebd33bf8385296201350a7d5ab
Comment 3 Dmitry Kazakov 2014-01-24 08:33:31 UTC
Git commit b8a3d81de72749c1736f18caf02f63a756b602c2 by Dmitry Kazakov.
Committed on 24/01/2014 at 08:32.
Pushed by dkazakov into branch 'calligra/2.8'.

Fix the crash when using multihand tool with some complicated brushes

Right now the brush server returns the pointers to the brushes instead
of the copies of them, so when changing its parameters, the change is
shared among all their users. For now it is an acceptable behavior,
because even the Multihand Brush Tool uses the same brush for all the
"hands". But we should ensure that we don't reset internal state of
the brush when reloading it with the same config options.
Related: bug 330212, bug 330199

M  +17   -3    krita/plugins/paintops/libbrush/kis_gbr_brush.cpp
M  +3    -0    krita/plugins/paintops/libbrush/kis_predefined_brush_factory.cpp

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