Bug 463475 - Konsole crashes when monitor goes to sleep
Summary: Konsole crashes when monitor goes to sleep
Status: RESOLVED DUPLICATE of bug 473602
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.12.1
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 466695 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-26 06:35 UTC by Shmerl
Modified: 2023-10-04 10:26 UTC (History)
8 users (show)

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


Attachments
konsole crash backtrace (6.78 KB, text/plain)
2022-12-26 06:35 UTC, Shmerl
Details
27_01_2023_crash_with_current_logline (12.70 KB, text/plain)
2023-01-27 16:35 UTC, Lukas Bergdoll
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shmerl 2022-12-26 06:35:50 UTC
Created attachment 154824 [details]
konsole crash backtrace

After recent update (to konsole 22.12.0) it started crashing any time monitor goes to sleep. In my case it causes a display disconnect event (due to how the monitor behaves) and Qt tries to create a fake monitor according to the logs, but that doesn't prevent konsole from crashing.

OS: Debian testing.
Konsole: 22.12.0
Plasma: 5.26.4
Frameworks: 5.101.0
Qt: 5.15.7 (also happened with 5.15.6).

See attached crash backtrace.

The logs that can be seen when running konsole from xterm:

```
user:~> konsole
kf.xmlgui: Shortcut for action  "" "Show SSH Manager" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
kf.xmlgui: Shortcut for action  "" "Show Quick Commands" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
21 -- exe=/usr/bin/konsole
17 -- platform=wayland
16 -- appname=konsole
17 -- apppath=/usr/bin
10 -- signal=11
11 -- pid=221047
19 -- appversion=22.12.0
20 -- programname=Konsole
31 -- bugaddress=submit@bugs.kde.org
12 -- startupid=0
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = konsole path = /usr/bin pid = 221047
KCrash: Arguments: /usr/bin/konsole 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kf5idletime_kwayland: This plugin does not support polling idle time

[1]+  Stopped                 konsole
```
Comment 1 Shmerl 2022-12-26 06:38:18 UTC
Just to add, I'm running it in KDE Wayland session, Wayland mode.
Comment 2 Shmerl 2023-01-08 19:51:51 UTC
Crash still happens with konsole 22.12.1.
Comment 3 Matan Ziv-Av 2023-01-09 14:05:47 UTC
It seems that the crash happens in bidiMap function.

Can you disable bidi and see if it still happens? If it still happens, please send a backtrace from such crash.
Comment 4 Shmerl 2023-01-09 15:28:07 UTC
How can I disable it?
Comment 5 Matan Ziv-Av 2023-01-09 15:37:49 UTC
(In reply to Shmerl from comment #4)
> How can I disable it?

Settings -> Edit current profile... -> Appearance -> Complex Text Layout -> Bi-Directional text rendering
Comment 6 Shmerl 2023-01-09 16:50:54 UTC
Looks like it didn't crash so far in such scenario with bi-directional text rendering option disabled! I'll test it a bit more to confirm further, but it looks like it indeed narrows it down.
Comment 7 Shmerl 2023-01-09 17:14:40 UTC
If that makes a difference, my current Konsole profile is using DejaVu Sans Mono font.
Comment 8 Shmerl 2023-01-09 17:42:24 UTC
Looks like when konsole is run in xcb mode (XWayland), there is still a freeze issue (not crash) that still happens even with bidirectional option disabled. But it might be another problem. I can open a separate bug.
Comment 9 Shmerl 2023-01-25 00:52:52 UTC
Looks like after Qt 5.15.8 this bug is gone. I'll keep watching if it happens and after a while not, I can close this.
Comment 10 Lukas Bergdoll 2023-01-26 08:42:05 UTC
I have the same issue, it keeps crashing it always crashes in TerminalDisplay.cpp:3165 `log2line[i] = pos;`. Disabling bidi did not help, nor did rolling back to konsole 22.08.
Comment 11 Shmerl 2023-01-26 08:48:39 UTC
(In reply to Lukas Bergdoll from comment #10)
> I have the same issue, it keeps crashing it always crashes in
> TerminalDisplay.cpp:3165 `log2line[i] = pos;`. Disabling bidi did not help,
> nor did rolling back to konsole 22.08.

What is your Qt version?
Comment 12 Lukas Bergdoll 2023-01-26 10:29:42 UTC
qt5-base 5.15.8+kde+r174-1 Arch Linux package. And I use X11.
Comment 13 Matan Ziv-Av 2023-01-26 10:53:49 UTC
(In reply to Lukas Bergdoll from comment #10)
> I have the same issue, it keeps crashing it always crashes in
> TerminalDisplay.cpp:3165 `log2line[i] = pos;`. Disabling bidi did not help,
> nor did rolling back to konsole 22.08.

Can you add a backtrace with 22.08?

Does the crash in X11 also occur when the monitor goes to sleep?
Comment 14 Lukas Bergdoll 2023-01-26 11:24:21 UTC
Yes, and only if the monitor goes to sleep.
Comment 15 Lukas Bergdoll 2023-01-26 11:39:52 UTC
New crash after turning off display shorty after crash

Thread 1 "konsole" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:273
273		VMOVU	(%rsi), %VEC(0)
(gdb) set pagination on
(gdb) bt
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:273
#1  0x00007ffff03286cb in memmove (__len=262112, __src=0x7ffb3ea4a810, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:36
#2  copy_unswapped (rect=<synthetic pointer>..., img=..., dstBytesPerLine=262112, dst=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:547
#3  native_sub_image (swap=false, rect=<synthetic pointer>..., src=..., dstStride=262112, buffer=0x555555f45400) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:590
#4  QXcbBackingStoreImage::flushPixmap (this=this@entry=0x555555f45380, region=..., fullRegion=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:669
#5  0x00007ffff0328a23 in QXcbBackingStoreImage::flushPixmap (fullRegion=fullRegion@entry=true, this=this@entry=0x555555f45380, region=..., fullRegion=fullRegion@entry=true)
    at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:690
#6  0x00007ffff0328c87 in QXcbBackingStoreImage::flushPixmap (fullRegion=false, region=..., this=0x555555f45380) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:627
#7  QXcbBackingStoreImage::put (this=0x555555f45380, dst=73400330, region=..., offset=...) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:741
#8  0x00007ffff03295de in QXcbBackingStore::flush (this=this@entry=0x5555557a62d0, window=window@entry=0x55555577a1a0, region=..., offset=...) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbwindow.h:120
#9  0x00007ffff6eddd45 in QBackingStore::flush (this=this@entry=0x5555557af780, region=..., window=0x55555577a1a0, offset=...) at painting/qbackingstore.cpp:252
#10 0x00007ffff7582e81 in QWidgetRepaintManager::flush (this=this@entry=0x555555f3c940, widget=0x55555599b2b0, region=..., widgetTextures=<optimized out>) at kernel/qwidgetrepaintmanager.cpp:1198
#11 0x00007ffff75833d5 in QWidgetRepaintManager::flush (this=this@entry=0x555555f3c940) at kernel/qwidgetrepaintmanager.cpp:1096
#12 0x00007ffff7584ab9 in QWidgetRepaintManager::paintAndFlush (this=0x555555f3c940) at kernel/qwidgetrepaintmanager.cpp:1028
#13 0x00007ffff75d0f09 in QWidgetWindow::handleResizeEvent (event=0x7fffffffd5b0, this=0x55555577a1a0) at kernel/qwidgetwindow.cpp:841
#14 QWidgetWindow::event (this=0x55555577a1a0, event=0x7fffffffd5b0) at kernel/qwidgetwindow.cpp:322
#15 0x00007ffff7578b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55555577a1a0, e=0x7fffffffd5b0) at kernel/qapplication.cpp:3640
#16 0x00007ffff688de08 in QCoreApplication::notifyInternal2 (receiver=0x55555577a1a0, event=0x7fffffffd5b0) at kernel/qcoreapplication.cpp:1064
#17 0x00007ffff6d40206 in QGuiApplicationPrivate::processGeometryChangeEvent (e=<optimized out>) at kernel/qguiapplication.cpp:2610
#18 0x00007ffff6d28885 in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#19 0x00007ffff032f9d0 in xcbSourceDispatch (source=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
#20 0x00007ffff4f1687b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x00007ffff4f6dc89 in ?? () from /usr/lib/libglib-2.0.so.0
#22 0x00007ffff4f15132 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#23 0x00007ffff68d8b2c in QEventDispatcherGlib::processEvents (this=0x555555652300, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#24 0x00007ffff68865ac in QEventLoop::exec (this=0x7fffffffd8a0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#25 0x00007ffff68910d9 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#26 0x0000555555559b65 in ?? ()
#27 0x00007ffff603c290 in __libc_start_call_main (main=main@entry=0x555555558020, argc=argc@entry=1, argv=argv@entry=0x7fffffffdbd8) at ../sysdeps/nptl/libc_start_call_main.h:58
#28 0x00007ffff603c34a in __libc_start_main_impl (main=0x555555558020, argc=1, argv=0x7fffffffdbd8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdbc8) at ../csu/libc-start.c:381
#29 0x000055555555a425 in ?? ()

The old crash happened after longer use, and that backtrace looked like a smashed stack. I have screenshots of that, will try to reproduce.
Comment 16 Lukas Bergdoll 2023-01-26 11:41:00 UTC
> New crash after turning off display shorty after crash

I meant to write:

New crash after turning off display. Then after turning it back on, I get this crash:
Comment 17 Matan Ziv-Av 2023-01-26 16:55:08 UTC
(In reply to Lukas Bergdoll from comment #15)
> New crash after turning off display shorty after crash
> 
> The old crash happened after longer use, and that backtrace looked like a
> smashed stack. I have screenshots of that, will try to reproduce.

There does not seem to be any konsole functions in this thread. Can you show a full backtrace (with all argumnets, and with local variables?
Comment 18 Matan Ziv-Av 2023-01-26 17:01:01 UTC
I had one crash which might be similar, out of 32 attempts of turning the monitor off and on. Unfortunately, without a core dump.

This is the error output:

qt.qpa.xcb: xcb_shm_create_segment() can't be called for size 17169122336, maximumallowed size is 4294967295
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setCompositionMode: Painter not active
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRect: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::setClipRegion: Painter not active
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::opacity: Painter not active
QPainter::hasClipping: Painter not active
QPainter::clipRegion: Painter not active
QPainter::setWorldTransform: Painter not active
Segmentation fault
Comment 19 Lukas Bergdoll 2023-01-26 18:26:12 UTC
I'll do more experiments tomorrow. What I found is, that adding a new tab and doing some work in the tabs, ls etc. helps with making it crash. Just opening konsole, without doing anything has yet to yield a crash when turning off the screen immediately after. I could try building konsole with asan and seeing where it explodes. Is there a guide on doing so somewhere?
Comment 20 Matan Ziv-Av 2023-01-27 11:16:04 UTC
Anyone that can reproduce this crash reliably is invited to test with this branch:
https://invent.kde.org/matan/konsole/-/commits/sleep-crash
Which tries to handle two issues that might cause this crash.
Comment 21 Lukas Bergdoll 2023-01-27 16:35:17 UTC
(In reply to Matan Ziv-Av from comment #20)
> Anyone that can reproduce this crash reliably is invited to test with this
> branch:
> https://invent.kde.org/matan/konsole/-/commits/sleep-crash
> Which tries to handle two issues that might cause this crash.

I'll try that next week. In the meantime, after installing konsole 22.12.1 I got the old crash again after longer usage and the display turning off at least once. I attached the whole bt which looks like a smashed stack, and the stack values I could read from frame 0 and frame 1.

27_01_2023_crash_with_current_logline.txt
Comment 22 Lukas Bergdoll 2023-01-27 16:35:52 UTC
Created attachment 155703 [details]
27_01_2023_crash_with_current_logline
Comment 23 Matan Ziv-Av 2023-01-27 18:27:35 UTC
> linewidth = 4093

This was my suspicion. It seems as if the fake screen created by Qt is very wide (or has a weird DPI that causes the font to be very narrow in pixels).

My patch should prevent bidi code from crashing. But possibly, there will be problems with wide lines.
Comment 24 Lukas Bergdoll 2023-02-28 09:09:50 UTC
Sorry for the late reply. I'm now using a custom release build version from your branch. And so far I've not seen crashes.

Also I want to add, that it was a pleasant surprise how easy it was to build konsole, clean simple CMake usage.
Comment 25 Matan Ziv-Av 2023-03-02 17:04:20 UTC
*** Bug 466695 has been marked as a duplicate of this bug. ***
Comment 26 Dick Tracey 2023-04-24 03:02:46 UTC
This is constantly happening to me to on Arch Linux, with dolphin (likely due to the embedded konsole in it), using 23.04.0. Virtually every time I come back to the computer and wake the screen up, dolphin crashes, super annoying...

I filed this for Dolphin https://bugs.kde.org/show_bug.cgi?id=464967


Application: Dolphin (dolphin), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
#7  0x00007f04a9c535d3 in memmove (__len=262112, __src=0x7effc58be810, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:36
#8  copy_unswapped (rect=<synthetic pointer>..., img=..., dstBytesPerLine=262112, dst=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:547
#9  native_sub_image (swap=false, rect=<synthetic pointer>..., src=..., dstStride=262112, buffer=0x5613f67151a0) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:590
#10 QXcbBackingStoreImage::flushPixmap(QRegion const&, bool) (this=this@entry=0x5613f6715120, region=..., fullRegion=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:669
#11 0x00007f04a9c53913 in QXcbBackingStoreImage::flushPixmap(QRegion const&, bool) (fullRegion=<optimized out>, this=this@entry=0x5613f6715120, region=..., fullRegion=fullRegion@entry=true) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:690
#12 0x00007f04a9c53b77 in QXcbBackingStoreImage::flushPixmap(QRegion const&, bool) (fullRegion=false, region=..., this=0x5613f6715120) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:627
#13 QXcbBackingStoreImage::put(unsigned int, QRegion const&, QPoint const&) (this=0x5613f6715120, dst=62914569, region=..., offset=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp:741
#14 0x00007f04a9c544ce in QXcbBackingStore::flush(QWindow*, QRegion const&, QPoint const&) (this=this@entry=0x5613f6684640, window=window@entry=0x5613f66e3d60, region=..., offset=...) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbwindow.h:120
#15 0x00007f04afce45a5 in QBackingStore::flush(QRegion const&, QWindow*, QPoint const&) (this=this@entry=0x7f049c001f70, region=..., window=0x5613f66e3d60, offset=...) at painting/qbackingstore.cpp:252
#16 0x00007f04b0382e81 in QWidgetRepaintManager::flush(QWidget*, QRegion const&, QPlatformTextureList*) (this=this@entry=0x5613f6774d70, widget=0x5613f6367760, region=..., widgetTextures=<optimized out>) at kernel/qwidgetrepaintmanager.cpp:1198
#17 0x00007f04b03833d5 in QWidgetRepaintManager::flush() (this=this@entry=0x5613f6774d70) at kernel/qwidgetrepaintmanager.cpp:1096
#18 0x00007f04b0384ab9 in QWidgetRepaintManager::paintAndFlush() (this=0x5613f6774d70) at kernel/qwidgetrepaintmanager.cpp:1028
#19 0x00007f04b03d0f79 in QWidgetWindow::handleResizeEvent(QResizeEvent*) (event=0x7ffff75f8300, this=0x5613f66e3d60) at kernel/qwidgetwindow.cpp:842
#20 QWidgetWindow::event(QEvent*) (this=0x5613f66e3d60, event=0x7ffff75f8300) at kernel/qwidgetwindow.cpp:322
#21 0x00007f04b0378b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5613f66e3d60, e=0x7ffff75f8300) at kernel/qapplication.cpp:3640
#22 0x00007f04af68e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5613f66e3d60, event=0x7ffff75f8300) at kernel/qcoreapplication.cpp:1064
#23 0x00007f04af68e0b3 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#24 0x00007f04afb41276 in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) (e=<optimized out>) at kernel/qguiapplication.cpp:2610
#25 0x00007f04afb298c5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#26 0x00007f04a9c5a8c0 in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
#27 0x00007f04ad50f53b in g_main_dispatch (context=0x7f04a4000ee0) at ../glib/glib/gmain.c:3460
#28 g_main_context_dispatch (context=0x7f04a4000ee0) at ../glib/glib/gmain.c:4200
#29 0x00007f04ad56c219 in g_main_context_iterate.constprop.0 (context=0x7f04a4000ee0, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#30 0x00007f04ad50e1a2 in g_main_context_iteration (context=0x7f04a4000ee0, may_block=1) at ../glib/glib/gmain.c:4343
#31 0x00007f04af6d8d3c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5613f5e381a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#32 0x00007f04af68668c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffff75f85f0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#33 0x00007f04af6912f9 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#34 0x00007f04afb3b052 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#35 0x00007f04b0376f2a in QApplication::exec() () at kernel/qapplication.cpp:2832
#36 0x00005613f43b1dab in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin/dolphin-23.04.0/src/main.cpp:249
[Inferior 1 (process 3829) detached]
Comment 27 Bernhard Übelacker 2023-06-14 08:47:28 UTC
The same crash I reported already in:
https://bugs.kde.org/show_bug.cgi?id=461723

Which led to this Qt bug report:
https://bugreports.qt.io/browse/QTBUG-109226

Unfortunately this change in Qt did not reach the 5.15 branch?
https://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/xcb/qxcbwindow.cpp?id=6a3627b6c5aa5109a80024f3d7b0f938504f7ffe

But it made it at least into the Debian package:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025997
https://sources.debian.org/src/qtbase-opensource-src/5.15.10%2Bdfsg-1/debian/patches/qxcbwindow_set_geometry.diff/

But the bad thing is, I still receive this crash with the Debian package (yesterday with kate).
Therefore this patch is not sufficient.

Other notes:
- This happens for me just for just for maximized windows. As a workaround having them just near full screen seems avoiding the crash.
- My last crash was with two monitors connected, but one was switched off. (Monitors of different brand, different size, same resolution.)
- Initially I reported it when doing explicit changes to dual monitor setup,
   but the last crash was when monitor just went to standby and woke up again.
Comment 28 Bernhard Übelacker 2023-06-14 09:06:13 UTC
Some short additions:
- I am getting this with X server.

The resize event way up in the stack looks like
the new width should change from 1920 to 65528 and the height from 996 to 65504.
With 4 bytes per pixel this would explain the later `dstBytesPerLine=262112`.
Having a buffer with this dimensions in memory would need ~16 GB.

#8  copy_unswapped (..., dstBytesPerLine=262112, ...) at ./src/plugins/platforms/xcb/qxcbbackingstore.cpp:547
...
#18 0x00007fa7f3bbd421 in QWidgetWindow::handleResizeEvent () at kernel/qwidgetwindow.cpp:841
(gdb) print event->s
$4 = {wd = 65528, ht = 65504}
(gdb) print event->olds
$5 = {wd = 1920, ht = 996}
Comment 29 Bernhard Übelacker 2023-08-28 12:43:22 UTC
Added some details about the possible source of this problematic huge dimensions to https://bugs.kde.org/show_bug.cgi?id=473602.
Comment 30 Nicolas Fella 2023-10-04 10:26:29 UTC

*** This bug has been marked as a duplicate of bug 473602 ***