Summary: | Krita 2.3 final crashes on startup | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Mario Locati <mario> |
Component: | General | Assignee: | Halla Rempt <halla> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | halla, takpeh |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Mario Locati
2011-01-03 11:18:56 UTC
I suspect an issue with the ubuntu packages then. Almost as if some parts of 2.2. remain installed after upgrading to 2.3. Okay, probably not... We're investigating. Okay, with the help of Sven Langkamp we figured out what causes the crash: if you have used Krita before 2.3 _and_ checked "always use this template" for a template, then you get a crash on startup. I'm investigating a fix. If you want to run krita, please add the following line to your .kde/share/config/kritarc firstRun=false or remove the kritarc file altogether. commit eb493aa2b562b0a384899b2327501ac058171aaf branch master Author: Boudewijn Rempt <boud@valdyas.org> Date: Wed Jan 5 10:36:19 2011 +0100 check whether the image wsp is valid We should check whether a weak shared pointer is valid, instead of checking the pointer -- which isn't set to 0 after the corresponding shared pointer is deleted. Should be backported to 2.3. CCMAIL:kimageshop@kde.org BUG:261940 diff --git a/krita/image/kis_layer.cc b/krita/image/kis_layer.cc index c28983c..f661142 100644 --- a/krita/image/kis_layer.cc +++ b/krita/image/kis_layer.cc @@ -140,7 +140,7 @@ KisLayer::~KisLayer() const KoColorSpace * KisLayer::colorSpace() const { - if (m_d->image) + if (m_d->image.isValid()) return m_d->image->colorSpace(); return 0; } @@ -252,7 +252,7 @@ KisSelectionSP KisLayer::selection() const if (layer->selectionMask()) return layer->selectionMask()->selection(); - else if (m_d->image) + else if (m_d->image.isValid()) return m_d->image->globalSelection(); else return KisSelectionSP(new KisSelection()); diff --git a/krita/ui/canvas/kis_coordinates_converter.cpp b/krita/ui/canvas/kis_coordinates_converter.cpp index c922b24..e7158f9 100644 --- a/krita/ui/canvas/kis_coordinates_converter.cpp +++ b/krita/ui/canvas/kis_coordinates_converter.cpp @@ -45,7 +45,7 @@ struct KisCoordinatesConverter::Private { void KisCoordinatesConverter::recalculateTransformations() const { - if(!m_d->image) return; + if(!m_d->image.isValid()) return; m_d->imageToDocument = QTransform::fromScale(1 / m_d->image->xRes(), 1 / m_d->image->yRes()); @@ -238,19 +238,19 @@ void KisCoordinatesConverter::getOpenGLCheckersInfo(QTransform *textureTransform QRectF KisCoordinatesConverter::imageRectInWidgetPixels() const { - if(!m_d->image) return QRectF(); + if(!m_d->image.isValid()) return QRectF(); return viewportToWidget(imageToViewport(m_d->image->bounds())); } QRectF KisCoordinatesConverter::imageRectInViewportPixels() const { - if(!m_d->image) return QRectF(); + if(!m_d->image.isValid()) return QRectF(); return imageToViewport(m_d->image->bounds()); } QSizeF KisCoordinatesConverter::imageSizeInFlakePixels() const { - if(!m_d->image) return QSizeF(); + if(!m_d->image.isValid()) return QSizeF(); qreal scaleX, scaleY; imageScale(&scaleX, &scaleY); diff --git a/krita/ui/flake/kis_shape_controller.cpp b/krita/ui/flake/kis_shape_controller.cpp index 1ee800f..25f87f6 100644 --- a/krita/ui/flake/kis_shape_controller.cpp +++ b/krita/ui/flake/kis_shape_controller.cpp @@ -162,7 +162,7 @@ KisShapeController::~KisShapeController() void KisShapeController::setImage(KisImageWSP image) { - if (m_d->image) { + if (m_d->image.isValid()) { m_d->image->disconnect(this); m_d->removeNodeShape(m_d->rootNode); SVN commit 1211995 by rempt: Do not crash when loading the tutorial if always start with template is checked CCBUG:261911 CCBUG:261940 M +2 -2 image/kis_layer.cc M +5 -0 image/kis_node.cpp M +4 -4 ui/canvas/kis_coordinates_converter.cpp M +1 -1 ui/flake/kis_shape_controller.cpp M +6 -0 ui/kis_doc2.cc M +0 -1 ui/kis_node_model.cpp M +1 -1 ui/kis_view2.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1211995 *** Bug 262205 has been marked as a duplicate of this bug. *** |