Bug 321769 - Assert during painting
Summary: Assert during painting
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 2.8 Pre-Alpha
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 321782 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-29 16:27 UTC by Sven Langkamp
Modified: 2013-08-08 20:38 UTC (History)
2 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 Sven Langkamp 2013-06-29 16:27:15 UTC
Application: krita (2.8 Pre-Alpha)
KDE Platform Version: 4.9.5
Qt Version: 4.8.3
Operating System: Linux 3.5.0-31-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

-I created a brush from a custom brush
-changed the rotation of the brush and painted with it

Suddenly I got:
ASSERT: "velocity2 > 0" in file /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand_helper.cpp, line 203

-- Backtrace:
Application: Krita (krita), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffaa34f4780 (LWP 9291))]

Thread 7 (Thread 0x7ffa84ab4700 (LWP 9292)):
#0  0x00007ffa9c467d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffaa093104b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa092cf67 in QSemaphore::acquire(int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffa8d59ff54 in waitForWork (this=0x1888260) at /home/sven/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  KisTileDataPooler::run (this=0x1888260) at /home/sven/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7ffa842b3700 (LWP 9293)):
#0  0x00007ffa9c467d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffaa093104b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa092d338 in QSemaphore::tryAcquire(int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffa8d5cd97a in KisTileDataSwapper::run (this=0x1888298) at /home/sven/kde/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#4  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7ffa80f37700 (LWP 9298)):
#0  0x00007ffaa29a4033 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffaa0a59023 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa0a5d9e4 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffaa0a5e572 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffaa0a2c2bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffaa0a2c548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffaa092db10 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffaa0a0c9af in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7ffa8193a700 (LWP 9305)):
#0  0x00007ffaa29a4033 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffaa0a59023 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa0a5d9e4 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffaa0a5e572 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffaa0a2c2bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffaa0a2c548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffaa092db10 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffaa0a0c9af in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7ffa6088d700 (LWP 9317)):
#0  0x00007ffa9c467d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffaa093104b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa18fef16 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#3  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffa537fe700 (LWP 9318)):
#0  0x00007ffaa29a4033 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffaa0a59023 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffaa0a5d9e4 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007ffaa0a5e572 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffaa0a2c2bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffaa0a2c548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffaa092db10 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffaa0a0c9af in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffaa0930aec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffa9c463e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007ffaa29aaccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffaa34f4780 (LWP 9291)):
[KCrash Handler]
#5  0x00007ffaa28ed425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007ffaa28f0b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x00007ffaa09264c2 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffaa0926838 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffaa09269c4 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007ffa8e0d095c in KisToolFreehandHelper::paintBezierSegment (this=this@entry=0x4bf5dd0, pi1=..., pi2=..., tangent1=..., tangent2=...) at /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand_helper.cpp:203
#11 0x00007ffa8e0d117f in KisToolFreehandHelper::finishStroke (this=this@entry=0x4bf5dd0) at /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand_helper.cpp:416
#12 0x00007ffa8e0d31a0 in KisToolFreehandHelper::endPaint (this=0x4bf5dd0) at /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand_helper.cpp:376
#13 0x00007ffa8e0c6b00 in KisToolFreehand::endStroke (this=0x4bf4240) at /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand.cc:175
#14 0x00007ffa8e0ca279 in KisToolFreehand::mouseReleaseEvent (this=0x4bf4240, e=0x7fff89f680c0) at /home/sven/kde/src/calligra/krita/ui/tool/kis_tool_freehand.cc:281
#15 0x00007ffa9f5208a0 in KoToolProxy::mouseReleaseEvent (this=0x377d0f0, event=0x7fff89f68910, point=...) at /home/sven/kde/src/calligra/libs/flake/KoToolProxy.cpp:309
#16 0x00007ffa8e14ff79 in KisToolInvocationAction::end (this=0x377d6c0, event=0x7fff89f68910) at /home/sven/kde/src/calligra/krita/ui/input/kis_tool_invocation_action.cpp:99
#17 0x00007ffa8e1584a9 in KisShortcutMatcher::tryEndRunningShortcut (this=this@entry=0x377d640, button=button@entry=Qt::LeftButton, event=0x7fff89f68910) at /home/sven/kde/src/calligra/krita/ui/input/kis_shortcut_matcher.cpp:332
#18 0x00007ffa8e1592d0 in KisShortcutMatcher::buttonReleased (this=0x377d640, button=Qt::LeftButton, event=<optimized out>) at /home/sven/kde/src/calligra/krita/ui/input/kis_shortcut_matcher.cpp:149
#19 0x00007ffa8e14aa4b in KisInputManager::eventFilter (this=0x377d540, object=<optimized out>, event=0x7fff89f68910) at /home/sven/kde/src/calligra/krita/ui/input/kis_input_manager.cpp:410
#20 0x00007ffaa0a2d6d6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007ffaa140ee6c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffaa1413b6b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007ffaa2596b28 in KoApplication::notify (this=<optimized out>, receiver=0x3781110, event=0x7fff89f68910) at /home/sven/kde/src/calligra/libs/main/KoApplication.cpp:556
#24 0x00007ffaa0a2d56e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x00007ffaa140fcd3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007ffaa148d554 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffaa148c44f in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007ffaa14b49d9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffaa0a2c2bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#30 0x00007ffaa0a2c548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#31 0x00007ffaa0a31708 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#32 0x00007ffaa2eb13a2 in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/sven/kde/src/calligra/krita/main.cc:79
#33 0x00007ffaa28d876d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#34 0x00000000004006b1 in _start ()

Reported using DrKonqi
Comment 1 Dmitry Kazakov 2013-06-30 03:31:21 UTC
Hi, Sven!

Can you reproduce this bug? If you can, could you check what is the value of tangent1 and tangent2 variables? Actually, there is a isNull() check in the beginning of the function so the assert should not happen.
Comment 2 Dmitry Kazakov 2013-06-30 18:30:38 UTC
*** Bug 321782 has been marked as a duplicate of this bug. ***
Comment 3 Sven Langkamp 2013-06-30 18:45:05 UTC
I don't know how to reproduce it. According to the docs isNull might still return false if the point is (-0.0, +0.0) with length still being 0, maybe that's the problem
Comment 4 Dmitry Kazakov 2013-06-30 18:46:41 UTC
Git commit 438e34d52a75bfeeabf7290ddf4ba061d2aa8738 by Dmitry Kazakov.
Committed on 30/06/2013 at 18:46.
Pushed by dkazakov into branch 'master'.

Changed an assert to a warning

If someone sees a warning that velocity is zero, please let me know. I need
to find out why it happens.

M  +5    -2    krita/ui/tool/kis_tool_freehand_helper.cpp

http://commits.kde.org/calligra/438e34d52a75bfeeabf7290ddf4ba061d2aa8738
Comment 5 Dmitry Kazakov 2013-06-30 18:49:12 UTC
Changed Crash to Major, because of workaround
Comment 6 Dmitry Kazakov 2013-06-30 18:57:38 UTC
Updates with a workaround for Krita Lime will be ready in about 15 hours
Comment 7 Dmitry Kazakov 2013-07-01 08:17:33 UTC
Git commit 1b6ff83023d9365a52486d512fdfec3fea71d5a9 by Dmitry Kazakov.
Committed on 30/06/2013 at 18:46.
Pushed by dkazakov into branch 'krita-testing-kazakov'.

Changed an assert to a warning

If someone sees a warning that velocity is zero, please let me know. I need
to find out why it happens.

M  +5    -2    krita/ui/tool/kis_tool_freehand_helper.cpp

http://commits.kde.org/calligra/1b6ff83023d9365a52486d512fdfec3fea71d5a9
Comment 8 Dmitry Kazakov 2013-08-08 20:38:29 UTC
There is no assert now.