Version: 1.6.0 (using KDE 3.5.4, Debian Package 4:3.5.4-3 (testing/unstable)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.17.6 1. Open attached Krita Document with Krita 2. Choose Select => Color Range from the mainmenu 3. boom reproducable with Krita 1.6 compiled yesterday. backtrace; [KCrash handler] #5 0xb7220a59 in QImage::setPixel () from /usr/lib/libqt-mt.so.3 #6 0xb609086a in KisSelection::maskImage (this=0x9309190) at kis_selection.cc:102 #7 0xb0fcb977 in DlgColorRange::updatePreview (this=0x92e6dd0) at dlg_colorrange.cc:242 #8 0xb0fcc05c in DlgColorRange (this=0x92e6dd0, view=0x885dc10, dev=@0xbf97db04, parent=0x885dc10, name=0xb0fcf600 "ColorRange") at dlg_colorrange.cc:198 #9 0xb0fc9cb7 in ColorRange::slotActivated (this=0x89fbbf0) at colorrange.cc:75 #10 0xb0fc9d3f in ColorRange::qt_invoke (this=0x89fbbf0, _id=2, _o=0xbf97dbcc) at colorrange.moc:82 #11 0xb7256b87 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #12 0xb7257618 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #13 0xb6ca3759 in KAction::activated () from /usr/lib/libkdeui.so.4 #14 0xb6cd9fe1 in KAction::slotActivated () from /usr/lib/libkdeui.so.4 #15 0xb6db7f4e in KAction::slotPopupActivated () from /usr/lib/libkdeui.so.4 #16 0xb6db8221 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4 #17 0xb7256b87 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #18 0xb75dfc0b in QSignal::signal () from /usr/lib/libqt-mt.so.3 #19 0xb727670a in QSignal::activate () from /usr/lib/libqt-mt.so.3 #20 0xb737bba1 in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3 #21 0xb6ca8bae in KPopupMenu::mouseReleaseEvent () from /usr/lib/libkdeui.so.4 #22 0xb728d528 in QWidget::event () from /usr/lib/libqt-mt.so.3 #23 0xb71eeaea in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3 #24 0xb71f0c8d in QApplication::notify () from /usr/lib/libqt-mt.so.3 #25 0xb78ca52e in KApplication::notify () from /usr/lib/libkdecore.so.4 #26 0xb7182445 in QApplication::sendSpontaneousEvent ()
Created an attachment (id=18019) [details] Krita Document "KritaImage.kra" that crashes
hum weird, I can reproduce only with that image.
y, I am also able to reproduce it with the attached image. I guess the reason may, that the image was created that way; 1. 2 layers where 1th layer contains some paintings and 2th layer a drop shadow 2. Merge both layers into one 3. Save the image as Krita Document
I found a way to reproduce: - new image - translate the layer (up and left) - call Select > Color Range - badaboom
SVN commit 599746 by berger: forward port fix crash when using color range on translated images CCBUG:135148 M +9 -11 kis_selection.cc --- trunk/koffice/krita/image/kis_selection.cc #599745:599746 @@ -80,23 +80,21 @@ { // If part of a KisAdjustmentLayer, there may be no parent device. QImage img; - qint32 x, y, w, h, y2, x2; + QRect bounds; if (m_parentPaintDevice) { - m_parentPaintDevice->exactBounds(x, y, w, h); - img = QImage(w, h, QImage::Format_RGB32); + bounds = m_parentPaintDevice->exactBounds(); + bounds = bounds.intersect( m_parentPaintDevice->image()->bounds() ); + img = QImage(bounds.width(), bounds.height(), 32); } else { - x = 0; - y = 0; - w = image()->width(); - h = image()->width(); - img = QImage(w, h, QImage::Format_RGB32); + bounds = QRect( 0, 0, image()->width(), image()->height()); + img = QImage(bounds.width(), bounds.height(), 32); } - for (y2 = y; y2 < h - y; ++y2) { - KisHLineConstIteratorPixel it = createHLineConstIterator(x, y2, w); - x2 = 0; + KisHLineConstIteratorPixel it = createHLineConstIterator(bounds.x(), bounds.y(), bounds.width()); + for (int y2 = bounds.y(); y2 < bounds.height() - bounds.y(); ++y2) { + int x2 = 0; while (!it.isDone()) { quint8 s = MAX_SELECTED - *(it.rawData()); qint32 c = qRgb(s, s, s);
SVN commit 599747 by berger: fix crash when using color range on translated layer BUG:135148 M +10 -11 kis_selection.cc --- branches/koffice/1.6/koffice/krita/core/kis_selection.cc #599746:599747 @@ -79,23 +79,21 @@ { // If part of a KisAdjustmentLayer, there may be no parent device. QImage img; - Q_INT32 x, y, w, h, y2, x2; + QRect bounds; if (m_parentPaintDevice) { - m_parentPaintDevice->exactBounds(x, y, w, h); - img = QImage(w, h, 32); + bounds = m_parentPaintDevice->exactBounds(); + bounds = bounds.intersect( m_parentPaintDevice->image()->bounds() ); + img = QImage(bounds.width(), bounds.height(), 32); } else { - x = 0; - y = 0; - w = image()->width(); - h = image()->width(); - img = QImage(w, h, 32); + bounds = QRect( 0, 0, image()->width(), image()->height()); + img = QImage(bounds.width(), bounds.height(), 32); } - for (y2 = y; y2 < h - y; ++y2) { - KisHLineIteratorPixel it = createHLineIterator(x, y2, w, false); - x2 = 0; + KisHLineIteratorPixel it = createHLineIterator(bounds.x(), bounds.y(), bounds.width(), false); + for (int y2 = bounds.y(); y2 < bounds.height() - bounds.y(); ++y2) { + int x2 = 0; while (!it.isDone()) { Q_UINT8 s = MAX_SELECTED - *(it.rawData()); Q_INT32 c = qRgb(s, s, s); @@ -103,6 +101,7 @@ ++x2; ++it; } + it.nextRow(); } return img; }
You need to log in before you can comment on or make changes to this bug.