Bug 285123 - Krita cannot adjust the alpha channel with a curve. (was: Krita crashes with: Adjust > Curves > Alpha channel)
Summary: Krita cannot adjust the alpha channel with a curve. (was: Krita crashes with:...
Status: RESOLVED DUPLICATE of bug 315365
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 19:08 UTC by Silvio Grosso
Modified: 2013-04-26 11:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
png image to crash Krita 2.4 (90.19 KB, image/png)
2011-10-27 19:08 UTC, Silvio Grosso
Details
Experimental patch (3.41 KB, patch)
2011-12-23 00:26 UTC, Sven Langkamp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silvio Grosso 2011-10-27 19:08:28 UTC
Created attachment 64950 [details]
png image to crash Krita 2.4

Version:           svn trunk
OS:                Linux

Ubuntu Oneiric Ocelot 11.10
Unity Shell
Krita 2.4 beta 3 (installed through: ppa Project-neon package)

Reproducible: Always

Steps to Reproduce:
1. Fire up Krita 2.4 beta 3;
2. Open an image (e.g. png). I have attached this image below BUT every image I use crashes Krita;
3. Filter > Adjust > Color adjustments curves;
4. Select the Channel: "Alpha".
5. Krita always crashes when selecting the channel alpha
Unfortunately, I can't ever get a backtrace :-(

Krita crashes and this is it...
Ubuntu Ocelot doesn't allow me to get a backtrace!

Actual Results:  
Krita 2.4 beta 3 crashes when selecting the Channel Alpha (Adjust > Color Adjustments curves).
This no matter what image I try

Expected Results:  
Krita shouldn't crash :-)
Comment 1 Halla Rempt 2011-10-28 09:15:10 UTC
Hi Silvio,

I can confirm the bug. Here is a backtrace:

[New Thread 0x7fffcd7c3700 (LWP 15279)]
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/QtCore/qlist.h, line 464

Program received signal SIGABRT, Aborted.
0x00007fffeef3dab5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007fffeef3dab5 in raise () from /lib64/libc.so.6
#1  0x00007fffeef3efb6 in abort () from /lib64/libc.so.6
#2  0x00007ffff7600e44 in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>)
    at global/qglobal.cpp:2291
#3  0x00007ffff760100d in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=
    0x7ffff7752f38 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fffffffbae0) at global/qglobal.cpp:2337
#4  0x00007ffff76011a5 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2520
#5  0x00007ffff76011ce in qt_assert_x (where=0x3b9e <Address 0x3b9e out of bounds>, what=0x6 <Address 0x6 out of bounds>, 
    file=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>, line=-134613152) at global/qglobal.cpp:2044
#6  0x00007fffdd83c639 in operator[] (this=0x7fffc8233020, ch=3) at /usr/include/QtCore/qlist.h:464
#7  KisPerChannelConfigWidget::setActiveChannel (this=0x7fffc8233020, ch=3)
    at /home/boud/kde/src/calligra/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:165
#8  0x00007fffdd83a8a4 in KisPerChannelConfigWidget::qt_metacall (this=0x7fffc8233020, _c=QMetaObject::InvokeMetaMethod, 
    _id=<value optimized out>, _a=0x7fffffffbe80)
    at /home/boud/kde/build/calligra/krita/plugins/filters/colorsfilters/kis_perchannel_filter.moc:124
#9  0x00007ffff7707e8f in QMetaObject::activate (sender=0x7fffc8455c90, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0x7fffffffbe80) at kernel/qobject.cpp:3287
#10 0x00007ffff08fcd51 in QComboBox::activated (this=<value optimized out>, _t1=3)
    at .moc/release-shared/moc_qcombobox.cpp:274
#11 0x00007ffff08fcddc in QComboBoxPrivate::emitActivated (this=<value optimized out>, index=...)
    at widgets/qcombobox.cpp:1252
#12 0x00007ffff08fddd7 in QComboBoxPrivate::_q_itemSelected (this=0x7fffc845b340, item=...) at widgets/qcombobox.cpp:1243
#13 0x00007ffff09011f7 in QComboBox::qt_metacall (this=0x7fffc8455c90, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=
    0x7fffffffc010) at .moc/release-shared/moc_qcombobox.cpp:191
#14 0x00007ffff7707e8f in QMetaObject::activate (sender=0x4979770, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0x7fffffffc010) at kernel/qobject.cpp:3287
#15 0x00007ffff0b9e272 in QComboBoxPrivateContainer::itemSelected (this=<value optimized out>, _t1=<value optimized out>)
    at .moc/release-shared/moc_qcombobox_p.cpp:213
#16 0x00007ffff08f83da in QComboBoxPrivateContainer::eventFilter (this=0x4979770, o=0xa76dd40, e=<value optimized out>)
    at widgets/qcombobox.cpp:687
#17 0x00007ffff76f3957 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=
    0xa76dd40, event=0x7fffffffc8b0) at kernel/qcoreapplication.cpp:902
#18 0x00007ffff052c231 in QApplicationPrivate::notify_helper (this=0x7b11d0, receiver=0xa76dd40, e=0x7fffffffc8b0)
    at kernel/qapplication.cpp:4477
---Type <return> to continue, or q <return> to quit---
Comment 2 Sven Langkamp 2011-12-23 00:26:28 UTC
Created attachment 67035 [details]
Experimental patch

I have tried the fix the problem. The attached patch solves the problem by using channel count instead of color channel count. That solves the patch, but alpha adjustments still don't work.
Comment 3 Sven Langkamp 2011-12-24 14:48:28 UTC
Git commit f7bda38e33885321b1b17fde5a5076ef92e96307 by Sven Langkamp.
Committed on 24/12/2011 at 15:45.
Pushed by langkamp into branch 'master'.

show only color channels in per channel filter, lcms can't transform alpha anyway
Related: bug 285123

M  +7    -1    krita/plugins/filters/colorsfilters/kis_perchannel_filter.cpp

http://commits.kde.org/calligra/f7bda38e33885321b1b17fde5a5076ef92e96307
Comment 4 Halla Rempt 2012-11-07 14:18:11 UTC
Still, users want this functionality, so I'm reopening the bug, changing the status and title. It should be possible to add the alpha channel to the gui, but process the adjustment ourselves, instead of through lcms.
Comment 5 Halla Rempt 2013-04-26 11:45:27 UTC
Sven's patch won't work since lcms doesn't handle alpha, but Sahil has a good patch in the duplicate bug, 315365 .

*** This bug has been marked as a duplicate of bug 315365 ***