Bug 447597 - krita segfaults on start after displaying the splash screen
Summary: krita segfaults on start after displaying the splash screen
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 5.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 445348 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-28 11:25 UTC by Timo Gurr
Modified: 2022-07-12 10:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
coredump.txt (50.02 KB, text/plain)
2021-12-28 11:25 UTC, Timo Gurr
Details
krita-20211228-114604.kcrash (5.08 KB, text/vnd.kde.kcrash-report)
2021-12-28 11:26 UTC, Timo Gurr
Details
coredump.txt (49.83 KB, text/plain)
2021-12-30 08:57 UTC, Timo Gurr
Details
krita-20211230-093915.kcrash (5.08 KB, text/vnd.kde.kcrash-report)
2021-12-30 08:58 UTC, Timo Gurr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Gurr 2021-12-28 11:25:07 UTC
Created attachment 144903 [details]
coredump.txt

SUMMARY
Krita crashes right on start just after displaying the splash screen. While 4.4.8 works fine with the patches from

https://bugs.kde.org/show_bug.cgi?id=445276
https://bugs.kde.org/show_bug.cgi?id=445285

where you already helped fixing some segfaults I experienced and which are already part of 5.0.0.

STEPS TO REPRODUCE
1.  Compile Krita 5.0.0
2.  Try to run it

OBSERVED RESULT
Segfault

EXPECTED RESULT
No segfault

SOFTWARE/OS VERSIONS
Operating System: Exherbo
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2 (qtbase kde/5.15 branch fixes up to 5.15.2_p254)
Kernel Version: 5.15.1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6500 CPU @ 3.20GHz
Memory: 11.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530

ADDITIONAL INFORMATION
Used CMake options during build (note: most but not all of the optional packages are actually enabled):

cmake -DCMAKE_COLOR_MAKEFILE:BOOL=TRUE -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_C_FLAGS:STRING=-march=native -O2 -pipe -DCMAKE_CXX_FLAGS:STRING=-march=native -O2 -pipe -DCMAKE_AR:PATH=x86_64-pc-linux-gnu-ar -DCMAKE_RANLIB:PATH=x86_64-pc-linux-gnu-ranlib -DCMAKE_NM:PATH=x86_64-pc-linux-gnu-nm -DCMAKE_C_COMPILER:PATH=x86_64-pc-linux-gnu-cc -DCMAKE_CXX_COMPILER:PATH=x86_64-pc-linux-gnu-c++ -DCMAKE_INSTALL_PREFIX:PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_FIND_ROOT_PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING=NEVER -DCMAKE_SYSTEM_PREFIX_PATH:PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_DATAROOTDIR:PATH=/usr/share/ -DBUILD_COVERAGE:BOOL=FALSE -DBUILD_KRITA_QT_DESIGNER_PLUGINS:BOOL=FALSE -DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_KSeExpr:BOOL=TRUE -DCRASH_ON_SAFE_ASSERTS:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_LibMyPaint:BOOL=TRUE -DENABLE_BSYMBOLICFUNCTIONS:BOOL=FALSE -DENABLE_CPU_THROTTLE:BOOL=FALSE -DENABLE_UPDATERS:BOOL=FALSE -DFETCH_TRANSLATIONS:BOOL=FALSE -DHAVE_BACKTRACE_SUPPORT:BOOL=FALSE -DHAVE_MEMORY_LEAK_TRACKER:BOOL=FALSE -DHIDE_SAFE_ASSERTS:BOOL=TRUE -DINSTALL_BENCHMARKS:BOOL=FALSE -DKRITA_ENABLE_BROKEN_TESTS:BOOL=FALSE -DLIMIT_LONG_TESTS:BOOL=TRUE -DUSE_LOCK_FREE_HASH_TABLE:BOOL=TRUE -DFOUNDATION_BUILD:BOOL=FALSE -DENABLE_PYTHON_2:BOOL=FALSE -DKRITA_DEVS:BOOL=FALSE -DBUILD_SHARED_LIBS:BOOL=TRUE -DKDE_INSTALL_AUTOSTARTDIR=/etc/xdg/autostart -DKDE_INSTALL_CONFDIR=/etc/xdg -DKDE_INSTALL_DATAROOTDIR:PATH=/usr/share -DKDE_INSTALL_LIBEXECDIR=libexec -DKDE_INSTALL_SYSCONFDIR=/etc -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_OpenColorIO:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_HEIF:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_OpenJPEG:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_Poppler:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibrary:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_SIP:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_PyQt5:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_LibRaw:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_Vc:BOOL=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_WebP:BOOL=FALSE -DCMAKE_DISABLE_FIND_PACKAGE_TIFF:BOOL=FALSE -DBUILD_TESTING:BOOL=FALSE /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0

Attached you'll find, the hopefully useful, complete coredump and here's the KCrash Handler output:

Application: krita (krita), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f5f52168171 in KoColor::toSVG11 (this=this@entry=0x5654f0d903f8, profileList=profileList@entry=0x7ffc9d1752a8) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/pigment/KoColor.cpp:413
#5  0x00007f5f52320221 in KoStopGradient::saveSvgGradient (this=<optimized out>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/pigment/resources/KoStopGradient.cpp:599
#6  0x00007f5f52325749 in KoStopGradient::saveToDevice (this=0x5654f0d90a50, dev=<optimized out>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/pigment/resources/KoStopGradient.cpp:630
#7  0x00007f5f546a813c in KisMemoryStorage::addResource (this=<optimized out>, resourceType=..., resource=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KisMemoryStorage.cpp:244
#8  0x00007f5f5467c468 in KisResourceStorage::addResource (this=this@entry=0x5654f0e7b860, resource=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KisResourceStorage.cpp:217
#9  0x00007f5f546706b0 in KisResourceLocator::addResource (this=0x5654f0d91a50, resourceType=..., resource=..., storageLocation=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KisResourceLocator.cpp:639
#10 0x00007f5f54688c22 in KisAllResourcesModel::addResource (this=0x5654f0e22760, resource=..., storageId=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KisResourceModel.cpp:466
#11 0x00007f5f546865de in KisResourceModel::addResource (this=0x5654f0d1db50, resource=..., storageId=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KisResourceModel.cpp:862
#12 0x00007f5f5276eb44 in KoResourceServer<KoAbstractGradient>::addResource (this=0x5654f0ea6550, resource=..., save=<optimized out>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/resources/KoResourceServer.h:148
#13 0x00007f5f5276f314 in GradientResourceServer::insertSpecialGradients (this=this@entry=0x5654f0ea6550) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:54
#14 0x00007f5f5276c1cf in GradientResourceServer::GradientResourceServer (type=..., this=0x5654f0ea6550) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:36
#15 KoResourceServerProvider::KoResourceServerProvider (this=0x7f5f527f1f00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:117
#16 0x00007f5f5276c2f7 in (anonymous namespace)::Q_QGS_s_instance::Holder::Holder (this=0x7f5f527f1f00 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:140
#17 (anonymous namespace)::Q_QGS_s_instance::innerFunction () at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:140
#18 QGlobalStatic<KoResourceServerProvider, (anonymous namespace)::Q_QGS_s_instance::innerFunction, (anonymous namespace)::Q_QGS_s_instance::guard>::operator QGlobalStatic<KoResourceServerProvider, (anonymous namespace)::Q_QGS_s_instance::innerFunction, (anonymous namespace)::Q_QGS_s_instance::guard>::Type* (this=<optimized out>) at /usr/x86_64-pc-linux-gnu/include/qt5/QtCore/qglobalstatic.h:135
#19 KoResourceServerProvider::instance () at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/widgets/KoResourceServerProvider.cpp:144
#20 0x00007f5f5531330e in KisPart::KisPart (this=0x7f5f555914a0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/ui/KisPart.cpp:136
#21 0x00007f5f55313507 in (anonymous namespace)::Q_QGS_s_instance::Holder::Holder (this=0x7f5f555914a0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/ui/KisPart.cpp:72
#22 (anonymous namespace)::Q_QGS_s_instance::innerFunction () at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/ui/KisPart.cpp:72
#23 QGlobalStatic<KisPart, (anonymous namespace)::Q_QGS_s_instance::innerFunction, (anonymous namespace)::Q_QGS_s_instance::guard>::operator QGlobalStatic<KisPart, (anonymous namespace)::Q_QGS_s_instance::innerFunction, (anonymous namespace)::Q_QGS_s_instance::guard>::Type* (this=<optimized out>) at /usr/x86_64-pc-linux-gnu/include/qt5/QtCore/qglobalstatic.h:135
#24 KisPart::instance () at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/ui/KisPart.cpp:118
#25 0x00007f5f552c458d in KisApplication::start (this=this@entry=0x7ffc9d175d60, args=...) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/libs/ui/KisApplication.cpp:476
#26 0x00005654ee383dde in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/paludis/build/media-gfx-krita-5.0.0/work/krita-5.0.0/krita/main.cc:692
[Inferior 1 (process 569) detached]

Note: This *might* be a duplicate of the previous bug I reported for scm version back then (https://bugs.kde.org/show_bug.cgi?id=445348) after you helped fixing the segfaults for 4.4.8 (https://bugs.kde.org/show_bug.cgi?id=445276 & https://bugs.kde.org/show_bug.cgi?id=445285).
Comment 1 Timo Gurr 2021-12-28 11:26:52 UTC
Created attachment 144904 [details]
krita-20211228-114604.kcrash
Comment 2 Dmitry Kazakov 2021-12-28 13:19:39 UTC
The crash looks weird, though it might be related to the fact that Krita is built against Qt 5.15, which is unsupported officially. Could you check if Krita Appimage package runs fine on your system?
Comment 3 Timo Gurr 2021-12-28 14:38:59 UTC
Krita Appimage works on my system but does not solve my problem, I'm trying to update our distribution package to the latest Krita version (4.4.8 -> 5.0.0). My previous reports for Krita 4.4.8 were also on a system using/running qt 5.15 already which is in fact the supported qt version by KDE getting bugfixes (https://invent.kde.org/qt/qt/qtbase/-/commits/kde/5.15) and which is used by basically any distributions nowadays afaiks even on Debian 10.
Comment 4 Bug Janitor Service 2021-12-29 04:35:06 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Timo Gurr 2021-12-30 08:57:15 UTC
Created attachment 144955 [details]
coredump.txt

Adding another kcrash/coredump from krita rebuilt after updating system to the latest versions of related components, e.g. frameworks, plasma, qtbase.

SOFTWARE/OS VERSIONS
Operating System: Exherbo Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2 (qtbase kde/5.15 branch fixes up to 5.15.2_p263)
Kernel Version: 5.15.1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6500 CPU @ 3.20GHz
Memory: 11.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Comment 6 Timo Gurr 2021-12-30 08:58:21 UTC
Created attachment 144956 [details]
krita-20211230-093915.kcrash
Comment 7 Halla Rempt 2022-03-08 12:04:45 UTC
It's another case of where KoColorSpaceRegistry::instance()->p709SRGBProfile() returns 0, I think. I don't understand the check in any case: sRGB is only true if

(colorSpace()->profile()->uniqueId() == KoColorSpaceRegistry::instance()->p709SRGBProfile()->uniqueId())

which doesn't look like a correct way to determine whether the colorspace is sRGB?
Comment 8 Halla Rempt 2022-03-08 12:55:30 UTC
Git commit b61faec61a081d27b11be1d1929ed51da95e6bb8 by Halla Rempt.
Committed on 08/03/2022 at 12:53.
Pushed by rempt into branch 'krita/5.0'.

Properly check whether the profile is sRGB

M  +8    -2    libs/pigment/KoColor.cpp

https://invent.kde.org/graphics/krita/commit/b61faec61a081d27b11be1d1929ed51da95e6bb8
Comment 9 Halla Rempt 2022-03-08 12:57:09 UTC
Git commit 23e23f871bc8a9f13c3272b09c640f3bf21bb395 by Halla Rempt.
Committed on 08/03/2022 at 12:55.
Pushed by rempt into branch 'master'.

Properly check whether the profile is sRGB
(cherry picked from commit b61faec61a081d27b11be1d1929ed51da95e6bb8)

M  +8    -2    libs/pigment/KoColor.cpp

https://invent.kde.org/graphics/krita/commit/23e23f871bc8a9f13c3272b09c640f3bf21bb395
Comment 10 Halla Rempt 2022-07-12 10:14:29 UTC
*** Bug 445348 has been marked as a duplicate of this bug. ***