Bug 291441 - some issues with predefined brushes
Summary: some issues with predefined brushes
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 13:22 UTC by Adam C
Modified: 2012-02-10 10:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
image showing results (170.71 KB, image/jpeg)
2012-01-13 13:22 UTC, Adam C
Details
settings used for drawing (126.69 KB, image/jpeg)
2012-01-13 13:25 UTC, Adam C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam C 2012-01-13 13:22:20 UTC
Created attachment 67780 [details]
image showing results

Version:           svn trunk
OS:                Linux

i found some issues with predifined brushes (ie pixel masks, used for colour intensity of a brush).

* the scaling is wrong in hairy brush (see attachment)
* some of the masks are rotating, while drawing (triangle)
 - i didn't find a option to turn that of
 - the rotation doesn't work correctly, when drawing upwards, in pixel brush it doesn't rotate, in hatching it doesn't draw at all (see attachment)
* spray brush doesn't seem to use the masks and even crashes, when switching to text (backtrace in comment).


Reproducible: Always

Steps to Reproduce:
.

Actual Results:  
.

Expected Results:  
.

i used the mouse for drawing. didn't tested tablet, because it's not working right now.
Comment 1 Adam C 2012-01-13 13:25:14 UTC
Created attachment 67781 [details]
settings used for drawing
Comment 2 Adam C 2012-01-13 13:26:17 UTC
backtrace for the crash, while trying to draw spray with text mask
=====
Application: Krita (krita), signal: Aborted
[Current thread is 1 (Thread 0x7f672397a7a0 (LWP 14474))]

Thread 8 (Thread 0x7f670898a700 (LWP 14478)):
#0  0x00007f6722ebf38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f672314bbbb in wait (this=<value optimized out>, mutex=0x1cd3740, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1cd3740, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f67231484c5 in QSemaphore::acquire (this=0x1cd3370, n=1) at thread/qsemaphore.cpp:144
#4  0x00007f672244e686 in KisTileDataPooler::waitForWork (this=0x1cd3360) at /home/damdam/progn/kde/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#5  0x00007f672244e715 in KisTileDataPooler::run (this=0x1cd3360) at /home/damdam/progn/kde/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#6  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x1cd3360) at thread/qthread_unix.cpp:331
#7  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#8  0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#9  0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f6708189700 (LWP 14479)):
#0  0x00007f6722ebf38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f672314bbbb in wait (this=<value optimized out>, mutex=0x1cd3c00, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1cd3c00, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f67231486f9 in QSemaphore::tryAcquire (this=0x1c82280, n=1, timeout=-1) at thread/qsemaphore.cpp:221
#4  0x00007f672246f1e6 in KisTileDataSwapper::waitForWork (this=0x1cd3398) at /home/damdam/progn/kde/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007f672246f200 in KisTileDataSwapper::run (this=0x1cd3398) at /home/damdam/progn/kde/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x1cd3398) at thread/qthread_unix.cpp:331
#7  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#8  0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#9  0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f66fdd92700 (LWP 14491)):
#0  0x00007f6722ebf38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f672314bbbb in wait (this=<value optimized out>, mutex=0x3fd1cc8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x3fd1cc8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f671c4b2a84 in ?? () from /usr/lib64/libQtGui.so.4
#4  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x3fd1cb8) at thread/qthread_unix.cpp:331
#5  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#7  0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f66fd591700 (LWP 14492)):
#0  0x00007f671aa38d13 in select () from /lib64/libc.so.6
#1  0x00007f672325c6b1 in qt_safe_select (nfds=22, fdread=0x41ff450, fdwrite=0x41ff6e8, fdexcept=0x41ff980, orig_timeout=<value optimized out>) at kernel/qcore_unix.cpp:82
#2  0x00007f672326162d in QEventDispatcherUNIXPrivate::doSelect (this=0x41ff290, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:219
#3  0x00007f672326288f in QEventDispatcherUNIX::processEvents (this=0x4200340, flags=...) at kernel/qeventdispatcher_unix.cpp:933
#4  0x00007f6723233c22 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f6723233e35 in QEventLoop::exec (this=0x7f66fd590ce0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f6723148be4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:498
#7  0x00007f6723215358 in QInotifyFileSystemWatcherEngine::run (this=0x3fd24a0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x3fd24a0) at thread/qthread_unix.cpp:331
#9  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#10 0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#11 0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f67070f1700 (LWP 14498)):
#0  0x00007f6722ebf6f9 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f672314bb22 in wait (this=<value optimized out>, mutex=0x28e0060, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x28e0060, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f6723140458 in QThreadPoolThread::run (this=0x4ec7010) at concurrent/qthreadpool.cpp:140
#4  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x4ec7010) at thread/qthread_unix.cpp:331
#5  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#7  0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f66fcd90700 (LWP 14499)):
#0  0x00007f6722ebf6f9 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f672314bb22 in wait (this=<value optimized out>, mutex=0x28e0060, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x28e0060, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f6723140458 in QThreadPoolThread::run (this=0x7f66f032f650) at concurrent/qthreadpool.cpp:140
#4  0x00007f672314b4d5 in QThreadPrivate::start (arg=0x7f66f032f650) at thread/qthread_unix.cpp:331
#5  0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#7  0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f66ede8a700 (LWP 14500)):
[KCrash Handler]
#6  0x00007f671a99eab5 in raise () from /lib64/libc.so.6
#7  0x00007f671a99ffb6 in abort () from /lib64/libc.so.6
#8  0x00007f6723141e44 in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>) at global/qglobal.cpp:2291
#9  0x00007f672314200d in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f6723293f68 "ASSERT: \"%s\" in file %s, line %d", ap=0x7f66ede891f0) at global/qglobal.cpp:2337
#10 0x00007f67231421a5 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2520
#11 0x00007f67231421ea in qt_assert (assertion=0x38a4 <Address 0x38a4 out of bounds>, file=0x6 <Address 0x6 out of bounds>, line=-1) at global/qglobal.cpp:2036
#12 0x00007f67092aeeeb in KisBrush::setImage (this=0x7f66f991a280, image=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_brush.cpp:237
#13 0x00007f67092d763b in KisTextBrush::updateBrush (this=0x7f66f991a280) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_text_brush.cpp:108
#14 0x00007f67092d6eaa in KisTextBrush::KisTextBrush (this=0x7f66f991a280, txt=..., font=..., pipe=false) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_text_brush.cpp:45
#15 0x00007f67092db1b6 in KisTextBrushFactory::getOrCreateBrush (this=0x480b280, brushDefinition=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_text_brush_factory.cpp:34
#16 0x00007f67092b7a74 in KisBrushRegistry::getOrCreateBrush (this=0x480bab0, element=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_brush_registry.cpp:81
#17 0x00007f67092af017 in KisBrush::fromXML (element=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libbrush/kis_brush.cpp:264
#18 0x00007f67095465ce in KisBrushOption::readOptionSetting (this=0x7f66f991a0a8, setting=0x4ef0210) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libpaintop/kis_brush_option.cpp:49
#19 0x00007f670515bab9 in KisSprayPaintOp::KisSprayPaintOp (this=0x7f66f9919ff0, settings=0x4ef0210, painter=0x4f513c0, image=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/spray/kis_spray_paintop.cpp:55
#20 0x00007f670515b498 in KisSimplePaintOpFactory<KisSprayPaintOp, KisSprayPaintOpSettings, KisSprayPaintOpSettingsWidget>::createOp (this=0x1d021c0, settings=..., painter=0x4f513c0, image=...) at /home/damdam/progn/kde/calligra/krita/plugins/paintops/libpaintop/kis_simple_paintop_factory.h:56
#21 0x00007f6722494ed2 in KisPaintOpRegistry::paintOp (this=0x1ce3790, id=..., settings=..., painter=0x4f513c0, image=...) at /home/damdam/progn/kde/calligra/krita/image/brushengine/kis_paintop_registry.cc:101
#22 0x00007f67224951cd in KisPaintOpRegistry::paintOp (this=0x1ce3790, preset=..., painter=0x4f513c0, image=...) at /home/damdam/progn/kde/calligra/krita/image/brushengine/kis_paintop_registry.cc:117
#23 0x00007f672247eac2 in KisPainter::setPaintOpPreset (this=0x4f513c0, preset=..., image=...) at /home/damdam/progn/kde/calligra/krita/image/kis_painter.cc:2412
#24 0x00007f6722b4783c in KisResourcesSnapshot::setupPainter (this=0x55e7aa0, painter=0x4f513c0) at /home/damdam/progn/kde/calligra/krita/ui/tool/kis_resources_snapshot.cpp:106
#25 0x00007f6722b4a0d6 in KisPainterBasedStrokeStrategy::initPainters (this=0x55e64c0, targetDevice=..., selection=..., hasIndirectPainting=true) at /home/damdam/progn/kde/calligra/krita/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp:82
#26 0x00007f6722b4a70a in KisPainterBasedStrokeStrategy::initStrokeCallback (this=0x55e64c0) at /home/damdam/progn/kde/calligra/krita/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp:136
#27 0x00007f67224fec21 in SimpleStrokeJobStrategy::run (this=0x488b210, data=0x0) at /home/damdam/progn/kde/calligra/krita/image/kis_simple_stroke_strategy.cpp:40
#28 0x00007f672244869e in KisStrokeJob::run (this=0x47f8160) at /home/damdam/progn/kde/build/krita/image/../../../calligra/krita/image/kis_stroke_job.h:39
#29 0x00007f6722448912 in KisUpdateJobItem::run (this=0x28e0130) at /home/damdam/progn/kde/build/krita/image/../../../calligra/krita/image/kis_update_job_item.h:59
#30 0x00007f67231403c8 in QThreadPoolThread::run (this=0x7f66f9970320) at concurrent/qthreadpool.cpp:106
#31 0x00007f672314b4d5 in QThreadPrivate::start (arg=0x7f66f9970320) at thread/qthread_unix.cpp:331
#32 0x00007f67218c32da in ?? () from /usr/X11R6/lib64/libGL.so.1
#33 0x00007f6722ebaa3f in start_thread () from /lib64/libpthread.so.0
#34 0x00007f671aa3f71d in clone () from /lib64/libc.so.6
#35 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f672397a7a0 (LWP 14474)):
#0  0x00007f671aa365a3 in poll () from /lib64/libc.so.6
#1  0x00007f6715fb2c2a in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f6715fb31a3 in ?? () from /usr/lib64/libxcb.so.1
#3  0x00007f6715fb3234 in xcb_writev () from /usr/lib64/libxcb.so.1
#4  0x00007f67210fccc6 in _XSend () from /usr/lib64/libX11.so.6
#5  0x00007f67210f10c7 in ?? () from /usr/lib64/libX11.so.6
#6  0x00007f67210f0317 in ?? () from /usr/lib64/libX11.so.6
#7  0x00007f67210f12ad in XPutImage () from /usr/lib64/libX11.so.6
#8  0x00007f671c0b0ee4 in QX11PixmapData::fromImage(QImage const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib64/libQtGui.so.4
#9  0x00007f671c09b4cf in QPixmap::fromImage(QImage const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib64/libQtGui.so.4
#10 0x00007f671c0f7e75 in QPaintEngine::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib64/libQtGui.so.4
#11 0x00007f671c1c0792 in ?? () from /usr/lib64/libQtGui.so.4
#12 0x00007f671c110927 in QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib64/libQtGui.so.4
#13 0x00007f67229aeab1 in QPainter::drawImage (this=0x7fff789410b0, targetRect=..., image=..., sourceRect=..., flags=...) at /usr/include/QtGui/qpainter.h:890
#14 0x00007f67229ad357 in KisQPainterCanvas::paintEvent (this=0x44ba150, ev=0x7fff78941a40) at /home/damdam/progn/kde/calligra/krita/ui/canvas/kis_qpainter_canvas.cpp:159
#15 0x00007f671c014dce in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#16 0x00007f67229ad47c in KisQPainterCanvas::event (this=0x44ba150, e=0x7fff78941a40) at /home/damdam/progn/kde/calligra/krita/ui/canvas/kis_qpainter_canvas.cpp:167
#17 0x00007f671bfc3264 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#18 0x00007f671bfcb81a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#19 0x00007f671ccdae36 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#20 0x00007f67232347cc in QCoreApplication::notifyInternal (this=0x7fff78942ce0, receiver=0x44ba150, event=0x7fff78941a40) at kernel/qcoreapplication.cpp:787
#21 0x00007f671c011ca2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4
#22 0x00007f671c1d70d8 in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00007f671c0078c0 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/libQtGui.so.4
#24 0x00007f671c0152d2 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#25 0x00007f671c3d698b in QMainWindow::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#26 0x00007f671cdd7550 in KXmlGuiWindow::event(QEvent*) () from /usr/lib64/libkdeui.so.5
#27 0x00007f671bfc3264 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#28 0x00007f671bfcb81a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#29 0x00007f671ccdae36 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#30 0x00007f67232347cc in QCoreApplication::notifyInternal (this=0x7fff78942ce0, receiver=0x871d00, event=0x21dde00) at kernel/qcoreapplication.cpp:787
#31 0x00007f6723237fc5 in sendEvent (receiver=0x0, event_type=0, data=0x6506a0) at kernel/qcoreapplication.h:215
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x6506a0) at kernel/qcoreapplication.cpp:1428
#33 0x00007f6723262820 in QEventDispatcherUNIX::processEvents (this=0x6502d0, flags=...) at kernel/qeventdispatcher_unix.cpp:905
#34 0x00007f671c069fcc in ?? () from /usr/lib64/libQtGui.so.4
#35 0x00007f6723233c22 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007f6723233e35 in QEventLoop::exec (this=0x7fff78942c80, flags=...) at kernel/qeventloop.cpp:201
#37 0x00007f672323827b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#38 0x00007f672356fab0 in kdemain (argc=1, argv=0x7fff78942ee8) at /home/damdam/progn/kde/calligra/krita/main.cc:71
#39 0x0000000000400a26 in main (argc=1, argv=0x7fff78942ee8) at /home/damdam/progn/kde/build/krita/krita_dummy.cpp:3
Comment 3 LukasT 2012-01-14 14:30:29 UTC
1. The hairy brush scaling is not a bug, I suppose you used default hairy brush preset and that sets the scaling of the bristles to 4x. I think plassy changed it when doing default preset for hairy or something. You can change it back to 1 under "Bristle options"

2. some brushes are so called gih (Gimp image hose) and the change as you paint. They might rotate, scale, change shape etc. You can't control that much in Krita.
Comment 4 LukasT 2012-01-14 20:56:16 UTC
3. regarding the spray brush, it's confusing UI, maybe fill separate bug report for it -- you have to uncheck "[x] Spray shape". 

When checked, it sprays basic shapes that are rendered by QPainter, custom algorithm is used instead of KisBrush interface. It should be solved by some KisCustomSprayBrush but it require refactoring of the KisBrush class.

There is also crash when you run krita, select spray brush, 
uncheck and paint. I have pending patch for it.
Comment 5 LukasT 2012-01-15 15:35:42 UTC
Git commit 8868c764a5b5170d57197bda0a60ffe55a2e7185 by Lukáš Tvrdý.
Committed on 15/01/2012 at 16:21.
Pushed by lukast into branch 'master'.

Fix crash when preset is invalid

o sometimes presets might be old or corrupted and does not contain
  defintion for KisBrush (e.g. current default preset for spray )
  In that case use the KisBrush definition set by brush editor
  GUI defaults.

o fixes crash when you start krita, select spray brush,
  uncheck "Spray shapes", paint, crash

M  +7    -5    krita/plugins/paintops/libpaintop/kis_brush_option.cpp

http://commits.kde.org/calligra/8868c764a5b5170d57197bda0a60ffe55a2e7185
Comment 6 Adam C 2012-01-15 17:29:08 UTC
ah, ok.
so i guess, that "when drawing upwards, in pixel brush it
doesn't rotate, in hatching it doesn't draw at all" is a bug of the brush?

the rotation doesn't work for hairy btw
Comment 7 Halla Rempt 2012-02-10 10:10:56 UTC
Okay, crash solved -- any other issues really need a separate bug.