Version: 1.6.0 (using KDE 3.5.5, Debian Package 4:3.5.5a.dfsg.1-2 (testing/unstable)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.17-2-686 To reproduce: - create a new YCbCr 16 bit/channel image - select the transform tool, do some transformation Result: - crashes with backtrace: Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1232029472 (LWP 3301)] [KCrash handler] #5 0xb60774d3 in KisU16BaseColorSpace::setAlpha (this=0x889a8c0, U8_pixel=0xb3985ffc "��", alpha=0 '\0', nPixels=1) at /tmp/buildd/koffice-1.6.0/./krita/kritacolor/kis_u16_base_colorspace.cc:46 #6 0xb62d5f67 in KisTransformWorker::transformPass<KisHLineIteratorPixel> ( this=0xbffe253c, src=0x890e900, dst=0x8b1af28, floatscale=1, shear=-0, dx=0, filterStrategy=0x8b7f500) at /tmp/buildd/koffice-1.6.0/./krita/core/kis_transform_worker.cc:369 #7 0xb62d4480 in KisTransformWorker::run (this=0xbffe253c) at /tmp/buildd/koffice-1.6.0/./krita/core/kis_transform_worker.cc:517 #8 0xb5cc1126 in KisToolTransform::transform (this=0x8b41da8) at /tmp/buildd/koffice-1.6.0/./krita/plugins/tools/tool_transform/kis_tool_transform.cc:777 #9 0xb5cc1a6d in KisToolTransform::buttonRelease (this=0x8b41da8) at /tmp/buildd/koffice-1.6.0/./krita/plugins/tools/tool_transform/kis_tool_transform.cc:655 #10 0xb61b7688 in KisView::canvasGotButtonReleaseEvent (this=0x8915b28, e=0xbffe2988) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_view.cc:2441 #11 0xb61cc29a in KisView::qt_invoke (this=0x8915b28, _id=88, _o=0xbffe2854) at ./kis_view.moc:639 #12 0xb72c0cb3 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #13 0xb6134e64 in KisCanvas::sigGotButtonReleaseEvent (this=0x89aed00, t0=0xbffe2988) at ./kis_canvas.moc:587 #14 0xb61358c1 in KisCanvas::qt_emit (this=0x89aed00, _id=12, _o=0xbffe2914) at ./kis_canvas.moc:621 #15 0xb72c0c87 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #16 0xb6135b31 in KisCanvasWidget::sigGotButtonReleaseEvent (this=0x89aaad8, t0=0xbffe2988) at ./kis_canvas.moc:280 #17 0xb6135b84 in KisCanvasWidget::buttonReleaseEvent (this=0x89aaad8, e=0xbffe2988) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:290 #18 0xb6136068 in KisCanvasWidget::translateTabletEvent (this=0x89aaad8, e=0xbffe2c58) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:323 #19 0xb6136884 in KisCanvasWidget::x11Event (this=0x89aaad8, event=0xbffe30e8, x11Display=0x80a1770, winId=31458423, widgetOriginPos= {xp = 62, yp = 107}) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:1033 #20 0xb619232c in KisQPaintDeviceCanvasWidget::x11Event (this=0x89aaad8, event=0xbffe30e8) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_qpaintdevice_canvas.cc:103 #21 0xb71e930a in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3 #22 0xb71ffcb2 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #23 0xb72730a1 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #24 0xb725a7da in QApplication::processEvents () from /usr/lib/libqt-mt.so.3 #25 0xb725a805 in QApplication::processEvents () from /usr/lib/libqt-mt.so.3 #26 0xb6170d4a in KisLabelProgress::update (this=0x89a5728, percent=1) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_label_progress.cc:174 #27 0xb61710a8 in KisLabelProgress::qt_invoke (this=0x89a5728, _id=57, _o=0xbffe3358) at ./kis_label_progress.moc:101 #28 0xb72c0cb3 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #29 0xb72c15ba in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #30 0xb6441d70 in KisProgressSubject::notifyProgress (this=0xbffe392c, t0=1) at ./kis_progress_subject.moc:95 #31 0xb62d6250 in KisTransformWorker::transformPass<KisHLineIteratorPixel> ( this=0xbffe392c, src=0x890e900, dst=0x8bb66c0, floatscale=1, shear=-0, dx=0, filterStrategy=0x8b7f500) at /tmp/buildd/koffice-1.6.0/./krita/core/kis_transform_worker.cc:428 #32 0xb62d4480 in KisTransformWorker::run (this=0xbffe392c) at /tmp/buildd/koffice-1.6.0/./krita/core/kis_transform_worker.cc:517 #33 0xb5cc1126 in KisToolTransform::transform (this=0x8b41da8) at /tmp/buildd/koffice-1.6.0/./krita/plugins/tools/tool_transform/kis_tool_transform.cc:777 #34 0xb5cc1a6d in KisToolTransform::buttonRelease (this=0x8b41da8) at /tmp/buildd/koffice-1.6.0/./krita/plugins/tools/tool_transform/kis_tool_transform.cc:655 #35 0xb61b7688 in KisView::canvasGotButtonReleaseEvent (this=0x8915b28, e=0xbffe3d78) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_view.cc:2441 #36 0xb61cc29a in KisView::qt_invoke (this=0x8915b28, _id=88, _o=0xbffe3c44) at ./kis_view.moc:639 #37 0xb72c0cb3 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #38 0xb6134e64 in KisCanvas::sigGotButtonReleaseEvent (this=0x89aed00, t0=0xbffe3d78) at ./kis_canvas.moc:587 #39 0xb61358c1 in KisCanvas::qt_emit (this=0x89aed00, _id=12, _o=0xbffe3d04) at ./kis_canvas.moc:621 #40 0xb72c0c87 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #41 0xb6135b31 in KisCanvasWidget::sigGotButtonReleaseEvent (this=0x89aaad8, t0=0xbffe3d78) at ./kis_canvas.moc:280 #42 0xb6135b84 in KisCanvasWidget::buttonReleaseEvent (this=0x89aaad8, e=0xbffe3d78) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:290 #43 0xb6136068 in KisCanvasWidget::translateTabletEvent (this=0x89aaad8, e=0xbffe40d8) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:323 #44 0xb6136b21 in KisCanvasWidget::x11Event (this=0x89aaad8, event=0xbffe44d8, x11Display=0x80a1770, winId=31458423, widgetOriginPos= {xp = 62, yp = 107}) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_canvas.cc:1024 #45 0xb619232c in KisQPaintDeviceCanvasWidget::x11Event (this=0x89aaad8, event=0xbffe44d8) at /tmp/buildd/koffice-1.6.0/./krita/ui/kis_qpaintdevice_canvas.cc:103 #46 0xb71e930a in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3 #47 0xb71ffcb2 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #48 0xb7273129 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #49 0xb7272f4a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #50 0xb725a76f in QApplication::exec () from /usr/lib/libqt-mt.so.3 #51 0xb7fa8095 in kdemain (argc=1, argv=0x8082420) at /tmp/buildd/koffice-1.6.0/./krita/main.cc:41 #52 0xb7faa524 in kdeinitmain (argc=1, argv=0x8082420) at krita_dummy.cc:3 #53 0x0804e457 in launch (argc=1, _name=0x8080134 "krita", args=0x808013a "\001", cwd=0x0, envc=1, envs=0x808014a "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x808014f "jedi;1162407991;927653;3008_TIME2766821903") at /home/sid-user/kdelibs/kdelibs-3.5.5/./kinit/kinit.cpp:673 #54 0x0804ecf9 in handle_launcher_request (sock=9) at /home/sid-user/kdelibs/kdelibs-3.5.5/./kinit/kinit.cpp:1240 #55 0x0804f092 in handle_requests (waitForPid=0) at /home/sid-user/kdelibs/kdelibs-3.5.5/./kinit/kinit.cpp:1443 #56 0x080502b1 in main (argc=5, argv=0xbffe4e04, envp=0xbffe4e1c) at /home/sid-user/kdelibs/kdelibs-3.5.5/./kinit/kinit.cpp:1909 #57 0xb7d22ea8 in __libc_start_main () from /lib/tls/libc.so.6 #58 0x0804b911 in _start () at ../sysdeps/i386/elf/start.S:119
I can't reproduce on the other I have noticed some weird stuff with YCbCr16, it might be a memory corruption that for some reason doesn't affect me.
I don't get a crash, but neither seems Krita capable of actually showing me my ycbcr image (except in the layer thumbnail).
The bug happens reliably on two different Debian machines, packages from unstable. I'll try to compile it from source.
16 bit ycbcr had a wrong channel size definition, leading to lots of problems. I've fixed this, which should have fixed this bug (and many others). Still, Krita doesn't show anything but the transparency checks when I try a 16 bit ycbcr image.
Oh, and ycbcr8 shows blue as green.
It's not a crash anymore.
SVN commit 602765 by berger: - disable profiles, as the only ycbcr profile we have seems to cause a lot more of trouble than it solves, lets see in 2.0 if I can find why. (that also explain why I never saw the problem until now, I allways test ycbcr with image without profile) - fix various problem of memory initialization as well BUG:136673 M +10 -19 ycbcr_u16/kis_ycbcr_u16_colorspace.cc M +4 -13 ycbcr_u8/kis_ycbcr_u8_colorspace.cc --- branches/koffice/1.6/koffice/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc #602764:602765 @@ -26,8 +26,8 @@ const Q_INT32 MAX_CHANNEL_YCbCr = 3; const Q_INT32 MAX_CHANNEL_YCbCrA = 4; -KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p) - : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, parent, p) +KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/) + : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, parent, 0) { m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); @@ -35,6 +35,7 @@ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + KisAbstractColorSpace::init(); } @@ -67,7 +68,7 @@ { if(getProfile()) { - KisYCbCrU16ColorSpace::fromQColor(c, dstU8, profile); + KisU16BaseColorSpace::fromQColor(c, dstU8, profile); } else { Pixel *dst = reinterpret_cast<Pixel *>(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -80,7 +81,7 @@ { if(getProfile()) { - KisYCbCrU16ColorSpace::fromQColor(c, opacity, dstU8, profile); + KisU16BaseColorSpace::fromQColor(c, opacity, dstU8, profile); } else { Pixel *dst = reinterpret_cast<Pixel *>(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -94,7 +95,7 @@ { if(getProfile()) { - KisYCbCrU16ColorSpace::toQColor(srcU8, c, profile); + KisU16BaseColorSpace::toQColor(srcU8, c, profile); } else { const Pixel *src = reinterpret_cast<const Pixel *>(srcU8); @@ -106,7 +107,7 @@ { if(getProfile()) { - KisYCbCrU16ColorSpace::toQColor(srcU8, c, opacity, profile); + KisU16BaseColorSpace::toQColor(srcU8, c, opacity, profile); } else { const Pixel *src = reinterpret_cast<const Pixel *>(srcU8); c->setRgb(computeRed(src->Y,src->Cb,src->Cr) >> 8, computeGreen(src->Y,src->Cb,src->Cr) >> 8, computeBlue(src->Y,src->Cb,src->Cr) >> 8); @@ -117,7 +118,7 @@ Q_UINT8 KisYCbCrU16ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) { if(getProfile()) - return KisYCbCrU16ColorSpace::difference(src1U8, src2U8); + return KisU16BaseColorSpace::difference(src1U8, src2U8); const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8); const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8); @@ -180,7 +181,7 @@ QImage KisYCbCrU16ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile * dstProfile, Q_INT32 renderingIntent, float exposure ) { if(getProfile()) - return KisYCbCrU16ColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure); + return KisU16BaseColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure); QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); img.setAlphaBuffer(true); @@ -192,22 +193,12 @@ Q_UINT16 Y = *( data + i + PIXEL_Y ); Q_UINT16 Cb = *( data + i + PIXEL_Cb ); Q_UINT16 Cr = *( data + i + PIXEL_Cr ); -#ifdef __BIG_ENDIAN__ - *( j + 0) = *( data + i + PIXEL_ALPHA ) >> 8; - *( j + 1 ) = computeRed(Y,Cb,Cr) >> 8; - *( j + 2 ) = computeGreen(Y,Cb,Cr) >> 8; - *( j + 3 ) = computeBlue(Y,Cr,Cr) >> 8; -#else *( j + 3) = *( data + i + PIXEL_ALPHA ) >> 8; *( j + 2 ) = computeRed(Y,Cb,Cr) >> 8; *( j + 1 ) = computeGreen(Y,Cb,Cr) >> 8; *( j + 0 ) = computeBlue(Y,Cb,Cr) >> 8; -/* *( j + 2 ) = Y; - *( j + 1 ) = Cb; - *( j + 0 ) = Cr;*/ -#endif i += MAX_CHANNEL_YCbCrA; - j += MAX_CHANNEL_YCbCrA; + j += 4; } return img; } --- branches/koffice/1.6/koffice/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc #602764:602765 @@ -26,8 +26,8 @@ const Q_INT32 MAX_CHANNEL_YCbCr = 3; const Q_INT32 MAX_CHANNEL_YCbCrA = 4; -KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p) - : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, parent, p) +KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/) + : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, parent, 0) { m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8))); m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8))); @@ -35,6 +35,7 @@ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT8), KisChannelInfo::ALPHA, KisChannelInfo::UINT8, sizeof(Q_UINT8))); m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT8); + KisAbstractColorSpace::init(); } @@ -192,22 +193,12 @@ Q_UINT8 Y = *( data + i + PIXEL_Y ); Q_UINT8 Cb = *( data + i + PIXEL_Cb ); Q_UINT8 Cr = *( data + i + PIXEL_Cr ); -#ifdef __BIG_ENDIAN__ - *( j + 0) = *( data + i + PIXEL_ALPHA ); - *( j + 1 ) = computeRed(Y,Cb,Cr); - *( j + 2 ) = computeGreen(Y,Cb,Cr); - *( j + 3 ) = computeBlue(Y,Cr,Cr); -#else *( j + 3) = *( data + i + PIXEL_ALPHA ); *( j + 2 ) = computeRed(Y,Cb,Cr); *( j + 1 ) = computeGreen(Y,Cb,Cr); *( j + 0 ) = computeBlue(Y,Cb,Cr); -/* *( j + 2 ) = Y; - *( j + 1 ) = Cb; - *( j + 0 ) = Cr;*/ -#endif i += MAX_CHANNEL_YCbCrA; - j += MAX_CHANNEL_YCbCrA; + j += 4; } return img; }
You need to log in before you can comment on or make changes to this bug.