https://bugs.kde.org/show_bug.cgi?id=520893
Bug ID: 520893
Summary: Stack Overflow crash in layout loop during large-scale
document workspace layout shifts and node activation
Classification: Applications
Product: krita
Version First 5.3.1.1
Reported In:
Platform: Microsoft Windows
OS: Microsoft Windows
Status: REPORTED
Severity: crash
Priority: NOR
Component: General
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
Crash with StackOverflow when loading many documents. (in my case, loading many
recovered files during startup, but could just as well apply after startup)
Depending on the active renderer the crash surfaced in one of Qt5Gui.dll /
USER32.dll / dxgi.dll
STEPS TO REPRODUCE
1. Create/load like 20/30+ documents in the workspace, in my case multi-layered
(some have over 10 layers)
2. Do a minor action for each, wait for autosave. Then kill Krita in task
manager and restart it to trigger recovery Window. Leave all checked. Repeat
this process if needed, so the amount of different versions of the autosaved
documents increases to a point where loading them all during startup results in
the mentioned crash.
There may be other situations where it would not happen during startup but
simply loading an additional document where a lot are already loaded.
Autosaves stacking up in my situation in the first place came from another
problem where my current installation with the AI diffusion plugin is not
stable and makes Krita crash in unexpected moments too, but that is independent
of this issue.
OBSERVED RESULT
Crash with log entry in `kritacrash.log` in module (depending of the used
renderer:
Sometimes when it surfaces in `Qt5Gui.dll`, a stack trace is logged as well:
```
krita.exe caused a Stack Overflow at location 00007FFED29BF37E in module
Qt5Gui.dll.
AddrPC Params
00007FFED29BF37E 00000087F76E4780 00007FFED2640D26 000001F8F95C8478
Qt5Gui.dll!___chkstk_ms+0x16
0000000000008B68 00007FFED2640D26 000001F8F95C8478 0000000000000006
00000087F76E4780 000001F8F95C8478 0000000000000006 00000087F76DC1B0
00007FFED2640D26 0000000000000000 0000000000000000 0000000000000000
Qt5Gui.dll!QTextEngine::itemize+0x16
00007FFED264390F 0000000000000000 00000087F76E46D8 0000000000000884
Qt5Gui.dll!QTextEngine::itemize+0x2bff
00007FFED2650550 0000000000000000 0000000000000000 0000000000000000
Qt5Gui.dll!QTextLayout::beginLayout+0x20
00007FFED27EC3ED 000001F758A4D030 000001F758A4D440 000001F75E9C0000
Qt5Gui.dll!qt_format_text+0xbcd
00007FFED27EB71B 028600FF02FA0001 028600FF00000000 02BE00FF02FC0001
Qt5Gui.dll!QPainter::drawText+0xeb
00007FFED2CEC8EC 02CE01FF02FD0001 02CF00FF02FD0001 02D000FF02FD0001
Qt5Widgets.dll!QFusionStyle::drawItemText+0x10c
00007FFED2CA61A7 40012BEC33304B50 400CAFB0CCC12D3F 400143160AA7A3C8
Qt5Widgets.dll!QCommonStyle::drawControl+0x42e7
00007FFED2CF2405 0000000000000005 00007FFF376DB3C7 000001F75E9C0000
Qt5Widgets.dll!QFusionStyle::drawControl+0x1245
00007FFED2CF140A 4001CA75DDD61E2A 4040800000000000 4000000000000000
Qt5Widgets.dll!QFusionStyle::drawControl+0x24a
00007FFED2DA5D16 000001F7724E5780 000001F897133FD0 0000000500000003
Qt5Widgets.dll!QPushButton::paintEvent+0x76
00007FFED3D3FAB8 00000087F76E8318 00007FFED2D7F0DE 000001F700000000
libkritaui.dll!KisMemoryReportButton::paintEvent+0x668
00007FFED2C65577 0000000000000000 0000000000000030 3FF0000000000000
Qt5Widgets.dll!QWidget::event+0x537
00007FFED2DA6741 000001F7744847A8 000001F8F95C8820 0000008700000000
Qt5Widgets.dll!QPushButton::event+0xb1
00007FFED2C2C382 0000000000000000 0000000000000000 0000000000000000
Qt5Widgets.dll!QApplicationPrivate::notify_helper+0x102
00007FFED2C2D613 0000000000000286 00000087F76E8318 00000087F76E8318
Qt5Widgets.dll!QApplication::notify+0x1e3
00007FFED3E633FA 3FF0000000000000 0000000000000000 0000000000000000
libkritaui.dll!KisApplication::notify+0xaa
00007FFED218BCA5 000002DA0000024E 00000087F76E8320 000001F772532EF4
Qt5Core.dll!QCoreApplication::notifyInternal2+0x95
00007FFED2C577BB 000001F75E9C0000 0000000000000000 0000000000000030
Qt5Widgets.dll!QWidgetPrivate::drawWidget+0xd5b
00007FFED2C5FBFC 000001F8F9846070 000001F8F983A010 00007FFED2BD3858
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x48c
00007FFED2C5FA96 000001F7724E4E40 00007FFED2C6BC16 00000087F76E86C0
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 000000440000004B 00000087F76E8800 000001F770FB4EC4
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C56FDD 0000000000000000 000003F90695120D 000000000000033F
Qt5Widgets.dll!QWidgetPrivate::drawWidget+0x57d
00007FFED2C5FBFC 0000000000000000 0000000000000000 00000087F76E8B38
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x48c
00007FFED2C5FA96 0000000004920056 000000000000000D 000001F7586D58F0
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 0000000000000000 00007FFF376D5BA1 00000087F76E8D68
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 0000000000000000 0000000000000008 00000087F76E9301
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 00000087F76E9301 00000087F76E8EF8 000001F771CF2A88
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 3FF0000000000000 0000000000000000 0000000000000000
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 00000087F76E91A0 000001F770EE03D0 000001F77F14D770
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 000001F770EE03D0 00007FFED2C6BC16 000001F761750600
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C5FA96 41E0000000000000 0000000000000000 7FFFFFFFFFFFFFFF
Qt5Widgets.dll!QWidgetPrivate::paintSiblingsRecursive+0x326
00007FFED2C56FDD 000001F75E9C02C0 00007FFE00000000 0000000000000080
Qt5Widgets.dll!QWidgetPrivate::drawWidget+0x57d
00007FFED2C37A31 00000087F76E9880 00007FFED2C985B2 000001F77E1DAFE0
Qt5Widgets.dll!QWidgetRepaintManager::paintAndFlush+0x1291
00007FFED2C37C14 0000000E00000001 0000000000010081 0000000000000000
Qt5Widgets.dll!QWidgetRepaintManager::sync+0x114
00007FFED2C65AAA 000001F7606F43F0 00007FFED23A08D0 0000000000000000
Qt5Widgets.dll!QWidget::event+0xa6a
00007FFED2D6597B 000001F77C0482A0 0000000000000000 000001F77C0482A0
Qt5Widgets.dll!QMainWindow::event+0x16b
00007FFED1AF0E02 000001F8F9840BF0 00000087F77CF510 000000000000004C
libkritawidgetutils.dll!KisKMainWindow::event+0x2c2
00007FFED2C2C382 0000000000000000 0000000000000000 0000000000000000
Qt5Widgets.dll!QApplicationPrivate::notify_helper+0x102
00007FFED2C2D613 0000000000000001 00007FFF3359E12A 000001F8BC65E100
Qt5Widgets.dll!QApplication::notify+0x1e3
00007FFED3E633FA 0000003B00000000 000001F75E7F0000 0000000000000000
libkritaui.dll!KisApplication::notify+0xaa
00007FFED218BCA5 0000000000000000 00007FFF00000000 0000000000000000
Qt5Core.dll!QCoreApplication::notifyInternal2+0x95
00007FFED218CAA3 0000000000000001 000001F7616A7560 0000000000000000
Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents+0x193
00007FFED0FC7C3E 00007FFF3774D500 000000000026185A 0000000000000113
qwindows.dll!QWindowsGuiEventDispatcher::sendPostedEvents+0xe
00007FFED21DF34C 00007FFE19BD5DA0 00007FFED218C13E 00007FFE19BA65C0
Qt5Core.dll!QEventDispatcherWin32::processEvents+0x5c
00007FFED0FC7C25 0000000000000000 0000000000000001 00007FFE3DC91A80
qwindows.dll!QWindowsGuiEventDispatcher::processEvents+0x15
00007FFED565F06F 00000087F76ED0A8 00007FFE3C9ACDE7 00000087F76ED0A8
libkritaglobal.dll!KisSynchronizedConnectionBase::forceDeliverAllSynchronizedEvents+0xf
00007FFE388C8828 000001F77544C2F0 000001F76EAE2E98 000001F77544C2F0
libkritalibkis.dll!Document::activeNode+0x18
```
EXPECTED RESULT
Documents loading without a crash or in case of insufficient heap memory for
those documents, graceful error handling which avoids limitless recursion or
event loops.
SOFTWARE/OS VERSIONS
Krita Version: 5.3.1 (git 9069dbc) (5.3.1.1 was mentioned on the download page)
Operating System : MS Windows 10 Pro 22H2
KDE Plasma Version: N/A
KDE Frameworks Version: N/A
Qt Version: compiled: 5.15.7, loaded: 5.15.7.
Installed plugin: Krita AI diffusion (not sure if it's relevant, but might be
worth mentioning)
DEVICE DETAILS
Model: Lenovo Thinkpad X1 Yoga gen7
Processor 12th Gen Intel(R) Core(TM) i7-1265U 1.80 GHz
Installed RAM 16,0 GB
Storage 4TB Samsung SSD 990 PRO
Graphics Card Intel(R) Iris(R) Xe Graphics (128 MB)
ADDITIONAL INFORMATION
Possible cause(s)/analysis:
Subsystem Exposure Points:
Depending on the active graphics backend, document viewing mode, and lifecycle
stage, this exact same underlying structural loop surfaces across three
distinct system modules before breaching the thread stack frame limit:
Qt5Gui.dll!QTextEngine::itemize: The final native crash point when rendering
widget layouts and status bar string geometries
(KisMemoryReportButton::paintEvent) recursively under OpenGL or internal Qt
fallbacks.
USER32.dll: Flooded by un-throttled Win32 window resizing and grid-negotiation
messages when running in standard MDI Tabbed layout (mdi_viewmode=1).
dxgi.dll: Trapped during concurrent hardware-accelerated canvas context mapping
on startup when utilizing the default Direct3D 11 via ANGLE renderer. The
layout cascade causes a memory race condition while trying to spin up multiple
hardware-accelerated viewport swapchains simultaneously, crashing DXGI
asynchronously.
--
You are receiving this mail because:
You are watching all bug changes.