| Summary: | Crash When Deleting Texture | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Justice Watch <earthexe.24254> |
| Component: | Brush engines | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | antti.savo, earthexe.24254, halla, tamtamy.tymona, tomw.82008 |
| Priority: | NOR | ||
| Version First Reported In: | 4.4.1 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Justice Watch
2020-12-29 00:28:08 UTC
Video demonstration https://drive.google.com/file/d/1_FG6AloxL8ZNrPxbdq-R5_tPMYM9FiX0/view?usp=sharing I was able to duplicate this bug... The crash occurs before a log is created. Below are some details found during debugging: A segfault occurs inside the call to setCurrentItem() within KoResourceItemChooser during texture removal. The row/col indices being passed in appear to be valid. The segfault generally happens on a different thread, so the issue could be concurrency-related. Commenting out that line (239) avoids crashing Krita but leaves nothing selected after deleting a texture. Just wanted to document these findings in case it helps a dev address the root cause. I am able to reproduce this on Linux and on 4.4.2. Does not need to be a newly created texture. Demonstrative video: https://youtu.be/6BM5zsXuIwU Goddamn desktop froze when trying to get a backtrace out of this Backtrace: Thread 30 "Thread (pooled)" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffa1ffb640 (LWP 3589)] 0x00007ffff38fe38d in QByteArray::isEmpty (this=<optimized out>) at /usr/include/qt/QtCore/qbytearray.h:507 507 { return d->size == 0; } #0 0x00007ffff38fe38d in QByteArray::isEmpty (this=<optimized out>) at /usr/include/qt/QtCore/qbytearray.h:507 #1 KoResource::md5 (this=0x55555e97ea80) at /usr/src/debug/krita-4.4.2/libs/pigment/resources/KoResource.cpp:80 #2 0x00007fffdeb689b5 in operator== (lhs=..., rhs=...) at /usr/src/debug/krita-4.4.2/plugins/paintops/libpaintop/KisTextureMaskInfo.cpp:70 #3 0x00007fffdeb69a6e in boost::operators_impl::operator!= (y=..., x=...) at /usr/include/boost/operators.hpp:169 #4 KisTextureMaskInfoCache::fetchCachedTextureInfo (this=0x7fffdebaa460 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>, info=...) at /usr/src/debug/krita-4.4.2/plugins/paintops/libpaintop/KisTextureMaskInfo.cpp:270 #5 0x00007fffdeb66301 in KisTextureProperties::fillProperties (this=this@entry=0x7fff8c01bd80, setting=...) at /usr/src/debug/krita-4.4.2/plugins/paintops/libpaintop/kis_texture_option.cpp:232 #6 0x00007fffdeb2821b in KisBrushBasedPaintOp::KisBrushBasedPaintOp (this=0x7fff8c01bd50, settings=..., painter=<optimized out>) at /usr/src/debug/krita-4.4.2/plugins/paintops/libpaintop/kis_brush_based_paintop.cpp:106 #7 0x00007fffdea90eaa in KisBrushOp::KisBrushOp (this=0x7fff8c01bd50, settings=..., painter=0x555564c41db0, node=..., image=...) at /usr/src/debug/krita-4.4.2/plugins/paintops/defaultpaintops/brush/kis_brushop.cpp:67 #8 0x00007fffdea8f933 in KisSimplePaintOpFactory<KisBrushOp, KisBrushOpSettings, KisBrushOpSettingsWidget>::createOp (this=<optimized out>, settings=..., painter=0x555564c41db0, node=..., image=...) at /usr/src/debug/krita-4.4.2/plugins/paintops/libpaintop/kis_simple_paintop_factory.h:85 #9 0x00007ffff5eff927 in KisPaintOpRegistry::paintOp (this=0x7fffa1ffa828, id=..., settings=..., painter=0x555564c41db0, node=..., image=...) at /usr/src/debug/krita-4.4.2/libs/image/brushengine/kis_paintop_registry.cc:104 #10 0x00007ffff5effdfd in KisPaintOpRegistry::paintOp (this=0x7ffff61e56e0 <(anonymous namespace)::Q_QGS_s_registryInstance::innerFunction()::holder>, preset=..., painter=0x555564c41db0, node=..., image=...) at /usr/src/debug/krita-4.4.2/libs/image/brushengine/kis_paintop_registry.cc:120 #11 0x00007ffff5ee0a25 in KisPainter::setPaintOpPreset (this=this@entry=0x555564c41db0, preset=..., node=..., image=...) at /usr/src/debug/krita-4.4.2/libs/image/kis_painter.cc:2743 #12 0x00007ffff6f898d3 in KisResourcesSnapshot::setupPainter (this=0x555564abdcc0, painter=painter@entry=0x555564c41db0) at /usr/src/debug/krita-4.4.2/libs/ui/tool/kis_resources_snapshot.cpp:201 #13 0x00007ffff6f90e25 in KisPainterBasedStrokeStrategy::initPainters (this=0x5555651e51c0, targetDevice=..., maskingDevice=..., selection=..., hasIndirectPainting=true, indirectPaintingCompositeOp=...) at /usr/src/debug/krita-4.4.2/libs/global/kis_shared_ptr.h:179 #14 0x00007ffff6f91644 in KisPainterBasedStrokeStrategy::initStrokeCallback (this=this@entry=0x5555651e51c0) at /usr/src/debug/krita-4.4.2/libs/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp:286 #15 0x00007ffff6f8eeaa in FreehandStrokeStrategy::initStrokeCallback (this=0x5555651e51c0) at /usr/src/debug/krita-4.4.2/libs/ui/tool/strokes/freehand_stroke.cpp:135 #16 0x00007ffff5eb5708 in KisStrokeJob::run (this=<optimized out>) at /usr/src/debug/build/libs/image/kritaimage_autogen/EWIEGA46WW/../../../../../krita-4.4.2/libs/image/kis_stroke_job.h:44 #17 KisUpdateJobItem::run (this=0x555561a98960) at /usr/src/debug/build/libs/image/kritaimage_autogen/EWIEGA46WW/../../../../../krita-4.4.2/libs/image/kis_update_job_item.h:102 #18 0x00007ffff492f302 in ?? () from /usr/lib/libQt5Core.so.5 #19 0x00007ffff492bf0f in ?? () from /usr/lib/libQt5Core.so.5 #20 0x00007ffff29013e9 in start_thread () from /usr/lib/libpthread.so.0 #21 0x00007ffff459e293 in clone () from /usr/lib/libc.so.6 The desktop will likely have frozen because the crash happened when a popup was showing; ordinarily the app then closes, but when running in gdb, it will stay open for investigation. But X11 is weird when it comes to popup windows, it won't allow clicks anywhere else. Does it happen in Krita 5.0-beta1? No, it's fixed in 5.0 |