Bug 245143 - Krita hangs when you paint with Mixing Brush outside the canvas
Summary: Krita hangs when you paint with Mixing Brush outside the canvas
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: LukasT
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 16:02 UTC by Dmitry Kazakov
Modified: 2010-09-09 02:49 UTC (History)
5 users (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 Dmitry Kazakov 2010-07-19 16:02:35 UTC
Version:           svn trunk
OS:                Linux

Hangs with the following backtrace:
(gdb) info threads
  3 Thread 0x7f6871157710 (LWP 29023)  0x00007f688247039c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  2 Thread 0x7f685797d710 (LWP 29104)  Eigen::ei_matrix_storage<double, 2, 2, 1, 2>::cols () at /usr/include/eigen2/Eigen/src/Core/MatrixStorage.h:82
* 1 Thread 0x7f6882ebd760 (LWP 29022)  0x00007f688247039c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0

(gdb) thr 2
[Switching to thread 2 (Thread 0x7f685797d710 (LWP 29104))]#0  Eigen::ei_matrix_storage<double, 2, 2, 1, 2>::cols () at /usr/include/eigen2/Eigen/src/Core/MatrixStorage.h:82
82          inline static int cols(void) {return _Cols;}
(gdb) bt
#0  Eigen::ei_matrix_storage<double, 2, 2, 1, 2>::cols () at /usr/include/eigen2/Eigen/src/Core/MatrixStorage.h:82
#1  0x00007f6881c82e10 in Eigen::MatrixBase<Eigen::CwiseUnaryOp<Eigen::ei_scalar_multiple_op<double>, Eigen::Matrix<double, 2, 1, 2, 2, 1> > >::size() const ()
   from /home/devel/kde-install/koffice/lib64/libkritaimage.so.7
#2  0x00007f6881c82e78 in void Eigen::Matrix<double, 2, 1, 2, 2, 1>::resizeLike<Eigen::CwiseUnaryOp<Eigen::ei_scalar_multiple_op<double>, Eigen::Matrix<double, 2, 1, 2, 2, 1> > >(Eigen::MatrixBase<Eigen::CwiseUnaryOp<Eigen::ei_scalar_multiple_op<double>, Eigen::Matrix<double, 2, 1, 2, 2, 1> > > const&) ()
   from /home/devel/kde-install/koffice/lib64/libkritaimage.so.7
#3  0x00007f6881c83579 in Eigen::Matrix<double, 2, 1, 2, 2, 1>& Eigen::Matrix<double, 2, 1, 2, 2, 1>::_set<Eigen::CwiseUnaryOp<Eigen::ei_scalar_multiple_op<double>, Eigen::Matrix<double, 2, 1, 2, 2, 1> > >(Eigen::MatrixBase<Eigen::CwiseUnaryOp<Eigen::ei_scalar_multiple_op<double>, Eigen::Matrix<double, 2, 1, 2, 2, 1> > > const&) ()
   from /home/devel/kde-install/koffice/lib64/libkritaimage.so.7
#4  0x00007f6881c81d26 in KisPaintOp::paintLine (this=0x9738cd0, pi1=..., pi2=..., savedDist=<value optimized out>)
    at /home/devel/kde-src/koffice.TRUNK/krita/image/brushengine/kis_paintop.cc:180
#5  0x00007f6881c82011 in paintBezierCurve (paintOp=0x9738cd0, pi1=..., control1=..., control2=..., pi2=..., savedDist=...)
    at /home/devel/kde-src/koffice.TRUNK/krita/image/brushengine/kis_paintop.cc:121
#6  0x00007f6881c824aa in paintBezierCurve (paintOp=0x9738cd0, pi1=..., control1=<value optimized out>, control2=<value optimized out>, pi2=..., savedDist=...)
    at /home/devel/kde-src/koffice.TRUNK/krita/image/brushengine/kis_paintop.cc:135
#7  0x00007f6881c824aa in paintBezierCurve (paintOp=0x9738cd0, pi1=..., control1=<value optimized out>, control2=<value optimized out>, pi2=..., savedDist=...)
    at /home/devel/kde-src/koffice.TRUNK/krita/image/brushengine/kis_paintop.cc:135
#8  0x00007f6881c82559 in KisPaintOp::paintBezierCurve (this=0x9738cd0, pi1=..., control1=..., control2=<value optimized out>, pi2=<value optimized out>, 
    savedDist=<value optimized out>) at /home/devel/kde-src/koffice.TRUNK/krita/image/brushengine/kis_paintop.cc:148
#9  0x00007f6881c72b58 in KisPainter::paintBezierCurve (this=0xbd64750, pi1=..., control1=..., control2=..., pi2=..., savedDist=...)
    at /home/devel/kde-src/koffice.TRUNK/krita/image/kis_painter.cc:705
#10 0x00007f688217696a in FreehandPaintBezierJob::run (this=0x7f684096e090) at /home/devel/kde-src/koffice.TRUNK/krita/ui/tool/kis_tool_freehand_p.cpp:110
#11 0x00007f68826f0035 in ?? () from /usr/lib64/libQtCore.so.4
#12 0x00007f68826f9bf5 in ?? () from /usr/lib64/libQtCore.so.4
#13 0x00007f688246ba4f in start_thread () from /lib64/libpthread.so.0
#14 0x00007f687aa2382d in clone () from /lib64/libc.so.6
#15 0x0000000000000000 in ?? ()
(gdb)(gdb) thr 1
[Switching to thread 1 (Thread 0x7f6882ebd760 (LWP 29022))]#0  0x00007f688247039c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00007f688247039c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f68826fa2bb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f68826ef5fc in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f68826f0b5d in QThreadPool::waitForDone() () from /usr/lib64/libQtCore.so.4
#4  0x00007f6882174330 in KisToolFreehand::endPaint (this=0x5999620) at /home/devel/kde-src/koffice.TRUNK/krita/ui/tool/kis_tool_freehand.cc:426
#5  0x00007f68821717f9 in KisToolFreehand::mouseReleaseEvent (this=0x5999620, e=0x7fffb174ebd0) at /home/devel/kde-src/koffice.TRUNK/krita/ui/tool/kis_tool_freehand.cc:322
#6  0x00007f687eedfa47 in KoToolProxy::mouseReleaseEvent (this=0x55d4b60, event=0x7fffb174f5a0, point=...) at /home/devel/kde-src/koffice.TRUNK/libs/flake/KoToolProxy.cpp:221
#7  0x00007f688208bb73 in KisCanvasWidgetBase::processMouseReleaseEvent (this=0x55d5048, e=0x7fffb174f5a0)
    at /home/devel/kde-src/koffice.TRUNK/krita/ui/canvas/kis_canvas_widget_base.cpp:317
#8  0x00007f687bf5fdbc in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#9  0x00007f687bf0f4d4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#10 0x00007f687bf1834a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#11 0x00007f687cb33c06 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#12 0x00007f68827e0e4c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#13 0x00007f687bf111e5 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#14 0x00007f687bf8b6c8 in ?? () from /usr/lib64/libQtGui.so.4
#15 0x00007f687bf89e19 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#16 0x00007f687bfb0bf4 in ?? () from /usr/lib64/libQtGui.so.4
#17 0x00007f68827e0292 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#18 0x00007f68827e0495 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#19 0x00007f68827e488b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#20 0x00007f6882afa8da in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /home/devel/kde-src/koffice.TRUNK/krita/main.cc:49
#21 0x00007f687a971b7d in __libc_start_main () from /lib64/libc.so.6
#22 0x0000000000400909 in _start () at ../sysdeps/x86_64/elf/start.S:113

Reproducible: Didn't try
Comment 1 Halla Rempt 2010-08-15 14:59:04 UTC
BUGDAY
Comment 2 Dmitry Kazakov 2010-08-20 17:50:30 UTC
There is an infinite loop in KisPaintOp::paintLine, because 'double sp = savedDist.spacing;' returns *zero*, so no incrementing happens.
Comment 3 Kubuntiac 2010-08-22 17:08:13 UTC
Confirmed, using:
Krita revision 1166713
Kubuntu 10.04 32bit
KDE 4.5
QT 4.7.0 beta 2
Comment 4 George Goldberg 2010-08-22 23:11:05 UTC
Confirmed. I get a deadlock. Debian unstable + KDE ~4.5 + krita trunk + Intel graphics
Comment 5 Halla Rempt 2010-08-30 16:56:07 UTC
Should be easy to fix then.
Comment 6 pentalis 2010-09-04 07:22:15 UTC
SVN commit 1171519 fixed this.
Comment 7 Halla Rempt 2010-09-04 08:44:33 UTC
Feel free to close :-)