Bug 321616

Summary: Krita crashes when using selection tool
Product: [Applications] krita Reporter: Christina <thepurplegem>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 2.8 Pre-Alpha   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christina 2013-06-26 00:14:04 UTC
Application: krita (2.8 Pre-Alpha)
KDE Platform Version: 4.10.3
Qt Version: 4.8.4
Operating System: Linux 3.8.0-25-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
I was using the Krita Lime version that I just compiled today (6/25). I had switched from one selection tool (continuous color selection) to another (similar color selection) when it crashed unexpectedly. Hope that helps!

-- 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 0x7ff06ce537c0 (LWP 7627))]

Thread 7 (Thread 0x7ff057731700 (LWP 7629)):
#0  0x00007ff06c2fa3cd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ff06591c1dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff06591c6ba in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff05c3364f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ff06593feb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff065deef8e in start_thread (arg=0x7ff057731700) at pthread_create.c:311
#6  0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 6 (Thread 0x7ff03f895700 (LWP 7630)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ff06a27b14b in wait (time=18446744073709551615, this=0x30ffcf0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x30ffca0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007ff06a277067 in QSemaphore::acquire (this=this@entry=0x30ff9f0, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x00007ff04c5da444 in waitForWork (this=0x30ff9e0) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/kis_tile_data_pooler.cc:162
#5  KisTileDataPooler::run (this=0x30ff9e0) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/kis_tile_data_pooler.cc:184
#6  0x00007ff06a27abec in QThreadPrivate::start (arg=0x30ff9e0) at thread/qthread_unix.cpp:338
#7  0x00007ff065deef8e in start_thread (arg=0x7ff03f895700) at pthread_create.c:311
#8  0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7ff03f094700 (LWP 7631)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ff06a27b14b in wait (time=18446744073709551615, this=0x3100080) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x3100030, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007ff06a277438 in QSemaphore::tryAcquire (this=0x30ffd60, n=n@entry=1, timeout=timeout@entry=-1) at thread/qsemaphore.cpp:221
#4  0x00007ff04c607f03 in KisTileDataSwapper::waitForWork (this=this@entry=0x30ffa18) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007ff04c60818a in KisTileDataSwapper::run (this=0x30ffa18) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007ff06a27abec in QThreadPrivate::start (arg=0x30ffa18) at thread/qthread_unix.cpp:338
#7  0x00007ff065deef8e in start_thread (arg=0x7ff03f094700) at pthread_create.c:311
#8  0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7ff03c930700 (LWP 7637)):
#0  0x00007ff06c2ff233 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ff06a3a34f3 in qt_safe_select (nfds=37, fdread=0x7ff020000ac8, fdwrite=0x7ff020000d60, fdexcept=0x7ff020000ff8, orig_timeout=0x0) at kernel/qcore_unix.cpp:83
#2  0x00007ff06a3a8499 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7ff020000910, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007ff06a3a8c82 in QEventDispatcherUNIX::processEvents (this=0x7ff0200008f0, flags=...) at kernel/qeventdispatcher_unix.cpp:937
#4  0x00007ff06a37638f in QEventLoop::processEvents (this=this@entry=0x7ff03c92fd90, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ff06a376618 in QEventLoop::exec (this=this@entry=0x7ff03c92fd90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ff06a278410 in QThread::exec (this=this@entry=0x2df3830) at thread/qthread.cpp:542
#7  0x00007ff06a357edf in QInotifyFileSystemWatcherEngine::run (this=0x2df3830) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007ff06a27abec in QThreadPrivate::start (arg=0x2df3830) at thread/qthread_unix.cpp:338
#9  0x00007ff065deef8e in start_thread (arg=0x7ff03c930700) at pthread_create.c:311
#10 0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7ff03da33700 (LWP 7651)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ff06a27b14b in wait (time=18446744073709551615, this=0x6b807b0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x6b80338, mutex=mutex@entry=0x6b80330, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007ff06b251636 in QFileInfoGatherer::run (this=0x6b80320) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007ff06a27abec in QThreadPrivate::start (arg=0x6b80320) at thread/qthread_unix.cpp:338
#5  0x00007ff065deef8e in start_thread (arg=0x7ff03da33700) at pthread_create.c:311
#6  0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7ff03d131700 (LWP 7652)):
#0  0x00007ff06c2ff233 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ff06a3a34f3 in qt_safe_select (nfds=31, fdread=0x7ff050010878, fdwrite=0x7ff050010b10, fdexcept=0x7ff050010da8, orig_timeout=0x0) at kernel/qcore_unix.cpp:83
#2  0x00007ff06a3a8499 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7ff0500106c0, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007ff06a3a8c82 in QEventDispatcherUNIX::processEvents (this=0x7ff0500054a0, flags=...) at kernel/qeventdispatcher_unix.cpp:937
#4  0x00007ff06a37638f in QEventLoop::processEvents (this=this@entry=0x7ff03d130d90, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ff06a376618 in QEventLoop::exec (this=this@entry=0x7ff03d130d90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ff06a278410 in QThread::exec (this=this@entry=0x6b80a50) at thread/qthread.cpp:542
#7  0x00007ff06a357edf in QInotifyFileSystemWatcherEngine::run (this=0x6b80a50) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007ff06a27abec in QThreadPrivate::start (arg=0x6b80a50) at thread/qthread_unix.cpp:338
#9  0x00007ff065deef8e in start_thread (arg=0x7ff03d131700) at pthread_create.c:311
#10 0x00007ff06c306e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7ff06ce537c0 (LWP 7627)):
[KCrash Handler]
#6  0x00007ff06c244037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007ff06c247698 in __GI_abort () at abort.c:90
#8  0x00007ff06a2705c2 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=0xa1307a8 "ASSERT: \"w > 0\" in file /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/kis_hline_iterator.cpp, line 29") at global/qglobal.cpp:2347
#9  0x00007ff06a270938 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7ff06a3da548 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7fff1b2a9da8) at global/qglobal.cpp:2393
#10 0x00007ff06a270ac4 in qFatal (msg=msg@entry=0x7ff06a3da548 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2576
#11 0x00007ff06a270b06 in qt_assert (assertion=assertion@entry=0x7ff04c82e3cc "w > 0", file=file@entry=0x7ff04c82e338 "/build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/kis_hline_iterator.cpp", line=line@entry=29) at global/qglobal.cpp:2021
#12 0x00007ff04c5f56fb in KisHLineIterator2::KisHLineIterator2 (this=0x3936670, dataManager=0x6e92ab0, x=2147483647, y=2147483647, w=<optimized out>, offsetX=<optimized out>, offsetY=0, writable=false, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/tiles3/kis_hline_iterator.cpp:29
#13 0x00007ff04c755351 in KisPaintDevice::createHLineConstIteratorNG (this=0x71f93b0, x=x@entry=2147483647, y=y@entry=2147483647, w=w@entry=0) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/image/kis_paint_device.cc:777
#14 0x00007ff03579af75 in selectByColor (dev=..., selection=..., c=c@entry=0x7e782f0 "", fuzziness=fuzziness@entry=20) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/plugins/tools/selectiontools/kis_tool_select_similar.cc:52
#15 0x00007ff03579cc81 in KisToolSelectSimilar::mousePressEvent (this=0x76a0060, event=<optimized out>) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/plugins/tools/selectiontools/kis_tool_select_similar.cc:113
#16 0x00007ff068e6098c in KoToolProxy::tabletEvent (this=0x6cfc830, event=event@entry=0x3769190, point=...) at /build/buildd/krita-testing-2+git20130613+r73967-40/libs/flake/KoToolProxy.cpp:173
#17 0x00007ff04d18b60b in KisToolInvocationAction::begin (this=this@entry=0x6cfce00, shortcut=<optimized out>, event=event@entry=0x7fff1b2aab70) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/ui/input/kis_tool_invocation_action.cpp:61
#18 0x00007ff04d193173 in KisShortcutMatcher::tryRunReadyShortcut (this=this@entry=0x6cfcd80, button=<optimized out>, event=event@entry=0x7fff1b2aab70) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/ui/input/kis_shortcut_matcher.cpp:291
#19 0x00007ff04d194027 in KisShortcutMatcher::buttonPressed (this=this@entry=0x6cfcd80, button=Qt::LeftButton, event=event@entry=0x7fff1b2aab70) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/ui/input/kis_shortcut_matcher.cpp:131
#20 0x00007ff04d188f62 in KisInputManager::eventFilter (this=0x6cfcc80, object=<optimized out>, event=0x7fff1b2aab70) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/ui/input/kis_input_manager.cpp:403
#21 0x00007ff06a3777a6 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x25ecc30, receiver=receiver@entry=0x6d0b000, event=event@entry=0x7fff1b2aab70) at kernel/qcoreapplication.cpp:1056
#22 0x00007ff06ad608bc in QApplicationPrivate::notify_helper (this=this@entry=0x25ecc30, receiver=receiver@entry=0x6d0b000, e=e@entry=0x7fff1b2aab70) at kernel/qapplication.cpp:4563
#23 0x00007ff06ad63a33 in QApplication::notify (this=<optimized out>, receiver=receiver@entry=0x6d0b000, e=e@entry=0x7fff1b2aab70) at kernel/qapplication.cpp:4110
#24 0x00007ff06beebc28 in KoApplication::notify (this=<optimized out>, receiver=0x6d0b000, event=0x7fff1b2aab70) at /build/buildd/krita-testing-2+git20130613+r73967-40/libs/main/KoApplication.cpp:556
#25 0x00007ff06a37763e in QCoreApplication::notifyInternal (this=0x7fff1b2ab620, receiver=receiver@entry=0x6d0b000, event=event@entry=0x7fff1b2aab70) at kernel/qcoreapplication.cpp:946
#26 0x00007ff06ad66933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#27 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x6d0b000, event=event@entry=0x7fff1b2aab70, alienWidget=alienWidget@entry=0x6d0b000, nativeWidget=nativeWidget@entry=0x3c46790, buttonDown=buttonDown@entry=0x7ff06b83e308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#28 0x00007ff06addbec4 in QETWidget::translateMouseEvent (this=this@entry=0x3c46790, event=event@entry=0x7fff1b2ab300) at kernel/qapplication_x11.cpp:4631
#29 0x00007ff06addaef1 in QApplication::x11ProcessEvent (this=0x7fff1b2ab620, event=event@entry=0x7fff1b2ab300) at kernel/qapplication_x11.cpp:3746
#30 0x00007ff06ae06b39 in QEventDispatcherX11::processEvents (this=0x2550b30, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#31 0x00007ff06a37638f in QEventLoop::processEvents (this=this@entry=0x7fff1b2ab570, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007ff06a376618 in QEventLoop::exec (this=this@entry=0x7fff1b2ab570, flags=...) at kernel/qeventloop.cpp:204
#33 0x00007ff06a37bcf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#34 0x00007ff06ad5effc in QApplication::exec () at kernel/qapplication.cpp:3828
#35 0x00007ff06c8103f2 in kdemain (argc=<optimized out>, argv=<optimized out>) at /build/buildd/krita-testing-2+git20130613+r73967-40/krita/main.cc:79
#36 0x00007ff06c22eea5 in __libc_start_main (main=0x4006e0 <main(int, char**)>, argc=1, ubp_av=0x7fff1b2ab738, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff1b2ab728) at libc-start.c:260
#37 0x0000000000400711 in _start ()

Possible duplicates by query: bug 316495, bug 313194, bug 313047, bug 311441, bug 310887.

Reported using DrKonqi
Comment 1 Sven Langkamp 2013-06-27 12:15:16 UTC
Git commit 6efb2a407c3775c633a3ef20acb5224eb6322cea by Sven Langkamp.
Committed on 27/06/2013 at 12:03.
Pushed by langkamp into branch 'master'.

handle default color correctly in select similar, fixes crash on empty paintdevices

M  +14   -4    krita/plugins/tools/selectiontools/kis_tool_select_similar.cc

http://commits.kde.org/calligra/6efb2a407c3775c633a3ef20acb5224eb6322cea