Summary: | krita segfaults on start after displaying the splash screen when a whole log of packages are disabled - part2 | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Timo Gurr <timo.gurr> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | halla |
Priority: | NOR | ||
Version First Reported In: | 4.4.8 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/acd7219d31ee3c15381c0f3ef014422aa92daeb7 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | coredump.txt |
Description
Timo Gurr
2021-11-10 16:29:38 UTC
Please try this: diff --git a/plugins/dockers/smallcolorselector/kis_small_color_widget.cc b/plugins/dockers/smallcolorselector/kis_small_color_widget.cc index 99106fa1c1..4b23367cb6 100644 --- a/plugins/dockers/smallcolorselector/kis_small_color_widget.cc +++ b/plugins/dockers/smallcolorselector/kis_small_color_widget.cc @@ -72,8 +72,11 @@ struct KisSmallColorWidget::Private { } // PQ color space we deliniearize into linear one - if (result && result->colorModelId() == RGBAColorModelID && - result->profile()->uniqueId() == KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId()) { + if (result + && result->colorModelId() == RGBAColorModelID + && result->profile() + && KoColorSpaceRegistry::instance()->p2020PQProfile() + && result->profile()->uniqueId() == KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId()) { result = KoColorSpaceRegistry::instance()-> colorSpace(RGBAColorModelID.id(), Float32BitsColorDepthID.id(), Note that it's easier to figure out where a crash happens if you build with the DEBUG cmake build type. (In reply to Halla Rempt from comment #1) > Please try this: > > diff --git a/plugins/dockers/smallcolorselector/kis_small_color_widget.cc > b/plugins/dockers/smallcolorselector/kis_small_color_widget.cc > index 99106fa1c1..4b23367cb6 100644 > --- a/plugins/dockers/smallcolorselector/kis_small_color_widget.cc > +++ b/plugins/dockers/smallcolorselector/kis_small_color_widget.cc > @@ -72,8 +72,11 @@ struct KisSmallColorWidget::Private { > } > > // PQ color space we deliniearize into linear one > - if (result && result->colorModelId() == RGBAColorModelID && > - result->profile()->uniqueId() == > KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId()) { > + if (result > + && result->colorModelId() == RGBAColorModelID > + && result->profile() > + && KoColorSpaceRegistry::instance()->p2020PQProfile() > + && result->profile()->uniqueId() == > KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId()) { > > result = KoColorSpaceRegistry::instance()-> > colorSpace(RGBAColorModelID.id(), > Float32BitsColorDepthID.id(), > > > Note that it's easier to figure out where a crash happens if you build with > the DEBUG cmake build type. I can confirm that the patch you've provided fixes the issue. Thank you very much again and also for the hint about the build type, I'll make sure to compile with Debug (or RelWithDebInfo) next time before I'll report an issue. Git commit 382d300c788a3ba68e6bdf3a75fe5ccb5c3454f5 by Halla Rempt. Committed on 11/11/2021 at 10:39. Pushed by rempt into branch 'master'. Check pointers before derefencing M +5 -2 plugins/dockers/smallcolorselector/kis_small_color_widget.cc https://invent.kde.org/graphics/krita/commit/382d300c788a3ba68e6bdf3a75fe5ccb5c3454f5 Git commit acd7219d31ee3c15381c0f3ef014422aa92daeb7 by Halla Rempt. Committed on 11/11/2021 at 10:39. Pushed by rempt into branch 'krita/5.0'. Check pointers before derefencing (cherry picked from commit 382d300c788a3ba68e6bdf3a75fe5ccb5c3454f5) M +5 -2 plugins/dockers/smallcolorselector/kis_small_color_widget.cc https://invent.kde.org/graphics/krita/commit/acd7219d31ee3c15381c0f3ef014422aa92daeb7 Fix pushed, let's see what else you uncover... |