Bug 340334

Summary: I just clicked on 'crayon colours' in the colour selector window, and it crashed.
Product: [Applications] krita Reporter: tim-kde
Component: Color SelectorsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla, sven.langkamp
Priority: NOR    
Version: 2.8.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description tim-kde 2014-10-25 14:04:44 UTC
Additionally, while trying to report this through Krita's crash reporter, it took my password, seemed to have logged me in, and then decided I wasn't logged in after all but the back button was greyed out, so I couldn't go back to fix it. So I'm copying the text into the web system.

Application: krita (2.8.1)
KDE Platform Version: 4.13.3
Qt Version: 4.8.6
Operating System: Linux 3.13.0-32-generic x86_64
Distribution: Ubuntu 14.04 LTS

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

I just clicked on 'crayon colours' in the colour selector window, and it crashed.

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

Thread 5 (Thread 0x7f883da46700 (LWP 3122)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f885cc66816 in wait (time=18446744073709551615, this=0x1bbf6e0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x1bb7cb0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f885cc6295b in QSemaphore::acquire (this=this@entry=0x1bbf3e0, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x00007f885b8ab67e in KisTileDataPooler::waitForWork (this=this@entry=0x1bbf3d0) at /build/buildd/calligra-2.8.1-1/krita/image/tiles3/kis_tile_data_pooler.cc:162
#5  0x00007f885b8aba4d in KisTileDataPooler::run (this=0x1bbf3d0) at /build/buildd/calligra-2.8.1-1/krita/image/tiles3/kis_tile_data_pooler.cc:184
#6  0x00007f885cc6632f in QThreadPrivate::start (arg=0x1bbf3d0) at thread/qthread_unix.cpp:349
#7  0x00007f88567e1182 in start_thread (arg=0x7f883da46700) at pthread_create.c:312
#8  0x00007f885f28430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f883d245700 (LWP 3123)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f885cc66816 in wait (time=18446744073709551615, this=0x1bbfa90) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x1bbfa40, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f885cc62d63 in QSemaphore::tryAcquire (this=0x1bbf750, n=n@entry=1, timeout=timeout@entry=-1) at thread/qsemaphore.cpp:221
#4  0x00007f885b8c8543 in KisTileDataSwapper::waitForWork (this=this@entry=0x1bbf408) at /build/buildd/calligra-2.8.1-1/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007f885b8c87ca in KisTileDataSwapper::run (this=0x1bbf408) at /build/buildd/calligra-2.8.1-1/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007f885cc6632f in QThreadPrivate::start (arg=0x1bbf408) at thread/qthread_unix.cpp:349
#7  0x00007f88567e1182 in start_thread (arg=0x7f883d245700) at pthread_create.c:312
#8  0x00007f885f28430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f87f37fe700 (LWP 7015)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f885cc66816 in wait (time=18446744073709551615, this=0xbef02b0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0xbeefe18, mutex=mutex@entry=0xbeefe10, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f885dc37d96 in QFileInfoGatherer::run (this=0xbeefe00) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007f885cc6632f in QThreadPrivate::start (arg=0xbeefe00) at thread/qthread_unix.cpp:349
#5  0x00007f88567e1182 in start_thread (arg=0x7f87f37fe700) at pthread_create.c:312
#6  0x00007f885f28430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f8801e63700 (LWP 7016)):
#0  __pthread_mutex_unlock_usercnt (decr=1, mutex=0x7f87d8c38620) at pthread_mutex_unlock.c:57
#1  __GI___pthread_mutex_unlock (mutex=0x7f87d8c38620) at pthread_mutex_unlock.c:310
#2  0x00007f88563439c1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8856301ef6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f88563020ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f885cd957be in QEventDispatcherGlib::processEvents (this=0x7f87d90be2d0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007f885cd670af in QEventLoop::processEvents (this=this@entry=0x7f8801e62de0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f885cd673a5 in QEventLoop::exec (this=this@entry=0x7f8801e62de0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f885cc63c5f in QThread::exec (this=this@entry=0xbef03b0) at thread/qthread.cpp:537
#9  0x00007f885cd48823 in QInotifyFileSystemWatcherEngine::run (this=0xbef03b0) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007f885cc6632f in QThreadPrivate::start (arg=0xbef03b0) at thread/qthread_unix.cpp:349
#11 0x00007f88567e1182 in start_thread (arg=0x7f8801e63700) at pthread_create.c:312
#12 0x00007f885f28430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f885fa117c0 (LWP 3075)):
[KCrash Handler]
#6  0x00007f883dc9be30 in cmsDoTransform () from /usr/lib/x86_64-linux-gnu/liblcms2.so.2
#7  0x00007f883e332caf in KoLcmsColorConversionTransformation::transform (this=0xa67db20, src=0x3397520 "\340\224\200\200\200\200\377\377\377\377T_\210\177", dst=0xa3fd920 "", numPixels=1) at /build/buildd/calligra-2.8.1-1/plugins/colorengines/lcms2/IccColorSpaceEngine.cpp:82
#8  0x00007f8859a51a71 in KoColorSpace::convertPixelsTo (this=this@entry=0x1a0c2b0, src=src@entry=0x3397520 "\340\224\200\200\200\200\377\377\377\377T_\210\177", dst=dst@entry=0xa3fd920 "", dstColorSpace=dstColorSpace@entry=0xb033ea0, numPixels=numPixels@entry=1, renderingIntent=renderingIntent@entry=KoColorConversionTransformation::IntentPerceptual, conversionFlags=...) at /build/buildd/calligra-2.8.1-1/libs/pigment/KoColorSpace.cpp:238
#9  0x00007f883e0b1167 in KoColorSpaceAbstract<KoLabU16Traits>::convertPixelsTo (this=0x1a0c2b0, src=0x3397520 "\340\224\200\200\200\200\377\377\377\377T_\210\177", dst=0xa3fd920 "", dstColorSpace=0xb033ea0, numPixels=1, renderingIntent=KoColorConversionTransformation::IntentPerceptual, conversionFlags=...) at /build/buildd/calligra-2.8.1-1/libs/pigment/KoColorSpaceAbstract.h:197
#10 0x00007f8859a44bd9 in KoColor::KoColor (this=0x7fffe064a6b0, src=..., colorSpace=0xb033ea0) at /build/buildd/calligra-2.8.1-1/libs/pigment/KoColor.cpp:106
#11 0x00007f88214fb513 in KisSpecificColorSelectorWidget::setColorSpace (this=this@entry=0x3389ec0, cs=0xb033ea0) at /build/buildd/calligra-2.8.1-1/krita/plugins/extensions/dockers/specificcolorselector/kis_specific_color_selector_widget.cc:85
#12 0x00007f88214fbe2d in KisSpecificColorSelectorWidget::setCustomColorSpace (this=0x3389ec0, colorSpace=<optimized out>) at /build/buildd/calligra-2.8.1-1/krita/plugins/extensions/dockers/specificcolorselector/kis_specific_color_selector_widget.cc:164
#13 0x00007f88214f92ec in KisSpecificColorSelectorWidget::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /build/buildd/calligra-2.8.1-1/obj-x86_64-linux-gnu/krita/plugins/extensions/dockers/specificcolorselector/moc_kis_specific_color_selector_widget.cpp:66
#14 0x00007f885cd7c87a in QMetaObject::activate (sender=0x3397140, m=m@entry=0x7f885f177620 <KisColorSpaceSelector::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffe064a850) at kernel/qobject.cpp:3539
#15 0x00007f885ee5cec2 in KisColorSpaceSelector::colorSpaceChanged (this=<optimized out>, _t1=0xb033ea0) at /build/buildd/calligra-2.8.1-1/obj-x86_64-linux-gnu/krita/ui/kis_color_space_selector.moc:128
#16 0x00007f885cd7c87a in QMetaObject::activate (sender=sender@entry=0x3397e90, m=m@entry=0x7f885e210260 <QComboBox::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffe064a970) at kernel/qobject.cpp:3539
#17 0x00007f885db24565 in QComboBox::activated (this=this@entry=0x3397e90, _t1=...) at .moc/release-shared/moc_qcombobox.cpp:294
#18 0x00007f885db245b9 in QComboBoxPrivate::emitActivated (this=this@entry=0xd439b20, index=...) at widgets/qcombobox.cpp:1262
#19 0x00007f885db24b99 in QComboBoxPrivate::_q_itemSelected (this=0xd439b20, item=...) at widgets/qcombobox.cpp:1252
#20 0x00007f885cd7c87a in QMetaObject::activate (sender=sender@entry=0xdd930f0, m=m@entry=0x7f885e22f2a0 <QComboBoxPrivateContainer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffe064ab00) at kernel/qobject.cpp:3539
#21 0x00007f885dda9fe2 in QComboBoxPrivateContainer::itemSelected (this=this@entry=0xdd930f0, _t1=...) at .moc/release-shared/moc_qcombobox_p.cpp:252
#22 0x00007f885db20454 in QComboBoxPrivateContainer::eventFilter (this=0xdd930f0, o=0xde0adb0, e=0x7fffe064aff0) at widgets/qcombobox.cpp:691
#23 0x00007f885cd68646 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x172ad70, receiver=receiver@entry=0xde0adb0, event=event@entry=0x7fffe064aff0) at kernel/qcoreapplication.cpp:1063
#24 0x00007f885d75ae0c in QApplicationPrivate::notify_helper (this=this@entry=0x172ad70, receiver=receiver@entry=0xde0adb0, e=e@entry=0x7fffe064aff0) at kernel/qapplication.cpp:4563
#25 0x00007f885d7615dd in QApplication::notify (this=<optimized out>, receiver=receiver@entry=0xde0adb0, e=e@entry=0x7fffe064aff0) at kernel/qapplication.cpp:4110
#26 0x00007f885e8e6e07 in KoApplication::notify (this=<optimized out>, receiver=0xde0adb0, event=0x7fffe064aff0) at /build/buildd/calligra-2.8.1-1/libs/main/KoApplication.cpp:590
#27 0x00007f885cd684dd in QCoreApplication::notifyInternal (this=0x7fffe064b830, receiver=receiver@entry=0xde0adb0, event=event@entry=0x7fffe064aff0) at kernel/qcoreapplication.cpp:953
#28 0x00007f885d760d93 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#29 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0xde0adb0, event=event@entry=0x7fffe064aff0, alienWidget=alienWidget@entry=0xde0adb0, nativeWidget=nativeWidget@entry=0xdd930f0, buttonDown=buttonDown@entry=0x7f885e240318 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#30 0x00007f885d7d5cfc in QETWidget::translateMouseEvent (this=this@entry=0xdd930f0, event=event@entry=0x7fffe064b340) at kernel/qapplication_x11.cpp:4568
#31 0x00007f885d7d5269 in QApplication::x11ProcessEvent (this=0x7fffe064b830, event=event@entry=0x7fffe064b340) at kernel/qapplication_x11.cpp:3627
#32 0x00007f885d7fcb02 in x11EventSourceDispatch (s=0x172c670, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#33 0x00007f8856301e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f8856302048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f88563020ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f885cd957a1 in QEventDispatcherGlib::processEvents (this=0x166b900, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#37 0x00007f885d7fcbb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x00007f885cd670af in QEventLoop::processEvents (this=this@entry=0x7fffe064b710, flags=...) at kernel/qeventloop.cpp:149
#39 0x00007f885cd673a5 in QEventLoop::exec (this=this@entry=0x7fffe064b710, flags=...) at kernel/qeventloop.cpp:204
#40 0x00007f885cd6cb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#41 0x00007f885d75937c in QApplication::exec () at kernel/qapplication.cpp:3828
#42 0x00007f885f59f49c in kdemain (argc=<optimized out>, argv=<optimized out>) at /build/buildd/calligra-2.8.1-1/krita/main.cc:111
#43 0x00007f885f1aaec5 in __libc_start_main (main=0x4006d0 <main(int, char**)>, argc=1, argv=0x7fffe064b968, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffe064b958) at libc-start.c:287
#44 0x00000000004006fe in _start ()

Report to https://bugs.kde.org/

Reproducible: Didn't try

Steps to Reproduce:
1. Tell it I want to see the colour selector
2. Click a few of the panels to see what they do
3. Then click on crayon colours.

Actual Results:  
Boom

Expected Results:  
No boom
Comment 1 Halla Rempt 2014-10-25 14:41:59 UTC
Hi Tim,

Thanks for your report. I suspect it's fixed in later bugfix releases of 2.8, but I've got some questions so I can test:

* which color selector window did you use? There are so many of them...
* when I check 2.8, I don't see any "crayon colours" palette. Did you download this yourself?
* what was the colorspace of your image?
* the crash happens in the specific color selector: did you select a different colorspace from the image there?
Comment 2 tim-kde 2014-10-26 20:36:41 UTC
Hi.

The 'Specific Colour Selector' docker has an 'L a* b*' model, with a profile 'crayon colours'.

I just selected it again, and Krita crashed again immediately - no drawing or anything.
Comment 3 Sven Langkamp 2014-10-26 21:36:24 UTC
Confirmed, crashes here too. 

krita(30702)/koffice: Lcms2 error:  13 Channel count doesn't match. Profile is corrupted 
ASSERT: "d->defaultTransformations->fromRGB" in file /home/sven/kde/src/calligra/plugins/colorengines/lcms2/LcmsColorSpace.h, line 207
Comment 4 Halla Rempt 2014-11-04 10:06:03 UTC
Wait... Those aren't profiles... Those are palette files. How the !@#$% can they end up in the profile selector!
Comment 5 Halla Rempt 2014-11-04 10:19:56 UTC
And the files are part of colord. They are marked as cmsSIgLabData, but they seem to be broken. We'll have to either blacklist them or do some runtime checks that we can create a colorspace with a profile.
Comment 6 Halla Rempt 2014-11-04 11:18:02 UTC
Git commit 8ace94af29f7df5a75d32c42b5bed421f5f2458f by Boudewijn Rempt.
Committed on 04/11/2014 at 11:16.
Pushed by rempt into branch 'master'.

The Crayons and X11-colors profiles installed by colord claim to be
LAB profiles, but contain named colors and cannot be used in Krita
to convert colors, so skip those.

M  +7    -2    plugins/colorengines/lcms2/colorprofiles/LcmsColorProfileContainer.cpp

http://commits.kde.org/calligra/8ace94af29f7df5a75d32c42b5bed421f5f2458f