Summary: | Crash when converting image color space while softproofing | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | wolthera <griffinvalley> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | lnicola |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/413376726265eda75864eca9899c110ee7d5354e | Version Fixed In: |
Description
wolthera
2021-08-19 10:50:20 UTC
Here's an ASAN report: ``` ==27869==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f42a3fbe26b bp 0x0fffcb1d3d92 sp 0x7ffe58e9ec70 T0) ==27869==The signal is caused by a READ memory access. ==27869==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used. #0 0x7f42a3fbe26b in boost::simple_segregated_storage<unsigned long>::malloc() /usr/include/boost/pool/simple_segregated_storage.hpp:155 #1 0x7f42a3fbe26b in boost::pool<boost::default_user_allocator_new_delete>::malloc() /usr/include/boost/pool/pool.hpp:430 #2 0x7f42a3fbe26b in KisTextureTileInfoPoolSingleSize::malloc() ~/Projects/krita/libs/ui/opengl/kis_texture_tile_info_pool.h:58 #3 0x7f42a3fbe26b in KisTextureTileInfoPool::malloc(int) ~/Projects/krita/libs/ui/opengl/kis_texture_tile_info_pool.h:152 #4 0x7f42a3fc126e in DataBuffer::allocate(int) ~/Projects/krita/libs/ui/opengl/kis_texture_tile_update_info.h:78 #5 0x7f42a3fc126e in DataBuffer::DataBuffer(int, QSharedPointer<KisTextureTileInfoPool>) ~/Projects/krita/libs/ui/opengl/kis_texture_tile_update_info.h:52 #6 0x7f42a3fc126e in KisTextureTileUpdateInfo::proofTo(KoColorSpace const*, QFlags<KoColorConversionTransformation::ConversionFlag>, KoColorConversionTransformation*) ~/Projects/krita/libs/ui/opengl/kis_texture_tile_update_info.h:210 #7 0x7f42a3fb7f02 in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisPaintDevice>, QRect const&, int, bool) ~/Projects/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:146 #8 0x7f42a3fbbc1f in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisImage>, bool) ~/Projects/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:49 #9 0x7f42a3f905a2 in KisOpenGLImageTextures::updateCacheImpl(QRect const&, KisSharedPtr<KisImage>, bool) ~/Projects/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:254 #10 0x7f42a3f90898 in KisOpenGLImageTextures::updateCache(QRect const&, KisSharedPtr<KisImage>) ~/Projects/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:242 #11 0x7f42a3f648b4 in KisOpenGLCanvas2::startUpdateCanvasProjection(QRect const&, QBitArray const&) ~/Projects/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:1137 #12 0x7f42a38f4e68 in KisCanvas2::startUpdateCanvasProjection(QRect const&) ~/Projects/krita/libs/ui/canvas/kis_canvas2.cpp:812 #13 0x7f42a38f521c in KisCanvas2::startUpdateInPatches(QRect const&) ~/Projects/krita/libs/ui/canvas/kis_canvas2.cpp:675 #14 0x7f42a3f65a39 in KisOpenGLCanvas2::notifyImageColorSpaceChanged(KoColorSpace const*) ~/Projects/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:254 #15 0x7f42a38f9240 in KisCanvas2::slotImageColorSpaceChanged() ~/Projects/krita/libs/ui/canvas/kis_canvas2.cpp:716 #16 0x7f429d32078f (/usr/lib/libQt5Core.so.5+0x2f078f) #17 0x7f42a1ff9c9c in KisImage::sigColorSpaceChanged(KoColorSpace const*) ~/Projects/krita/build/libs/image/kritaimage_autogen/EWIEGA46WW/moc_kis_image.cpp:799 #18 0x7f42a2002d31 in KisImage::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ~/Projects/krita/build/libs/image/kritaimage_autogen/EWIEGA46WW/moc_kis_image.cpp:363 #19 0x7f429d3164fe in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2e64fe) #20 0x7f429ddc6d61 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15ad61) #21 0x7f42a4628ae5 in KisApplication::notify(QObject*, QEvent*) ~/Projects/krita/libs/ui/KisApplication.cpp:703 #22 0x7f429d2e93a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2b93a9) #23 0x7f429d2ec4a8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2bc4a8) #24 0x7f429d3429a3 (/usr/lib/libQt5Core.so.5+0x3129a3) #25 0x7f429b73a10b in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x5410b) #26 0x7f429b78db98 (/usr/lib/libglib-2.0.so.0+0xa7b98) #27 0x7f429b737870 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x51870) #28 0x7f429d341fd5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x311fd5) #29 0x7f429d2e7d1b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2b7d1b) #30 0x7f429d2f0283 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2c0283) #31 0x559bd44f523a in main ~/Projects/krita/krita/main.cc:677 #32 0x7f429caf3b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #33 0x559bd44f8f7d in _start (~/Projects/krita/install/bin/krita+0x19f7d) ``` Git commit d05ba9448eda7464ba5a6b0a06c8a8a7e87c9c0d by Dmitry Kazakov, on behalf of Mathias Wein. Committed on 01/12/2021 at 10:06. Pushed by dkazakov into branch 'master'. Fix issues when soft proofing is active during colorspace conversion The color transform needs to be reset before updating the canvas. Also, there was an odd workaround to set new channel flags for the root layer, but this was an async signal that caused an update in the middle of invalidating the image data during conversion. Instead, simply fetch the (after the previous fix valid) new channel flags when the canvas gets notified about the color space change. Related: bug 426641, bug 329336 M +6 -0 libs/ui/canvas/kis_canvas2.cpp M +2 -0 libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp M +0 -1 plugins/dockers/channeldocker/channeldocker_dock.cpp https://invent.kde.org/graphics/krita/commit/d05ba9448eda7464ba5a6b0a06c8a8a7e87c9c0d Git commit 413376726265eda75864eca9899c110ee7d5354e by Dmitry Kazakov, on behalf of Mathias Wein. Committed on 01/12/2021 at 10:16. Pushed by dkazakov into branch 'krita/5.0'. Fix issues when soft proofing is active during colorspace conversion The color transform needs to be reset before updating the canvas. Also, there was an odd workaround to set new channel flags for the root layer, but this was an async signal that caused an update in the middle of invalidating the image data during conversion. Instead, simply fetch the (after the previous fix valid) new channel flags when the canvas gets notified about the color space change. Related: bug 426641, bug 329336 (cherry picked from commit d05ba9448eda7464ba5a6b0a06c8a8a7e87c9c0d) M +6 -0 libs/ui/canvas/kis_canvas2.cpp M +2 -0 libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp M +0 -1 plugins/dockers/channeldocker/channeldocker_dock.cpp https://invent.kde.org/graphics/krita/commit/413376726265eda75864eca9899c110ee7d5354e |