Bug 471439

Summary: Konsole and other KDE applications crash on startup with global app menu enabled and more than one monitor connected
Product: [Applications] konsole Reporter: Basti <baschi29>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WORKSFORME    
Severity: crash CC: baschi29, christoph, fanzhuyifan, jean.claveau, meierluis, qiao0junfeng, tmoerschell, yurii.zinko
Priority: HI Keywords: drkonqi
Version: 23.04.1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=472428
https://bugs.kde.org/show_bug.cgi?id=458535
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
Multimonitor setup
Display configuration

Description Basti 2023-06-25 15:53:10 UTC
Application: konsole (23.04.1)

Qt Version: 5.15.9
Frameworks Version: 5.106.0
Operating System: Linux 6.1.31-2-MANJARO x86_64
Windowing System: X11
Distribution: Manjaro Linux
DrKonqi: 5.27.5 [KCrashBackend]

-- Information about the crash:
When enabling the kde global app menu widget Konsole is unable to start anymore. Windows opened beforehand continue to work. Turning off the global menu again fixes this. This bug also applies to other KDE software such as the settings or okular, but not to Kalendar for example.

Steps to reproduce:
1) add the kde global app menu widget
2) try to open konsole/okular/settings/dolphin etc.

The crash can be reproduced every time.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fde355a7d14 in QWidget::hide() () from /usr/lib/libQt5Widgets.so.5
#5  0x00007fde35700c46 in ?? () from /usr/lib/libQt5Widgets.so.5
#6  0x00007fde35701381 in QMenuBar::changeEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#7  0x00007fde355aeecf in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#8  0x00007fde35578b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007fde3488e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#10 0x00007fde355a318c in QWidgetPrivate::updateFont(QFont const&) () from /usr/lib/libQt5Widgets.so.5
#11 0x00007fde355af380 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007fde35578b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007fde3488e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#14 0x00007fde355ccb18 in ?? () from /usr/lib/libQt5Widgets.so.5
#15 0x00007fde355ccb48 in ?? () from /usr/lib/libQt5Widgets.so.5
#16 0x00007fde355cd206 in ?? () from /usr/lib/libQt5Widgets.so.5
#17 0x00007fde348becf0 in ?? () from /usr/lib/libQt5Core.so.5
#18 0x00007fde34d4ef94 in QWindow::screenChanged(QScreen*) () from /usr/lib/libQt5Gui.so.5
#19 0x00007fde34d431d4 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) () from /usr/lib/libQt5Gui.so.5
#20 0x00007fde3559c974 in QWidgetPrivate::create() () from /usr/lib/libQt5Widgets.so.5
#21 0x00007fde3559cca4 in QWidget::create(unsigned long long, bool, bool) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007fde356feb2f in ?? () from /usr/lib/libQt5Widgets.so.5
#23 0x00007fde356fef68 in QMenuBar::QMenuBar(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#24 0x00007fde356c442c in QMainWindow::menuBar() const () from /usr/lib/libQt5Widgets.so.5
#25 0x00007fde35e86b4b in Konsole::MainWindow::setupActions() () from /usr/lib/libkonsoleapp.so.1
#26 0x00007fde35e89bb2 in Konsole::MainWindow::MainWindow() () from /usr/lib/libkonsoleapp.so.1
#27 0x00007fde35e8a513 in Konsole::Application::newMainWindow() () from /usr/lib/libkonsoleapp.so.1
#28 0x00007fde35e8aab9 in Konsole::Application::processWindowArgs(bool&) () from /usr/lib/libkonsoleapp.so.1
#29 0x00007fde35e8adc3 in Konsole::Application::newInstance() () from /usr/lib/libkonsoleapp.so.1
#30 0x000055ba59590c2e in ?? ()
#31 0x00007fde34039850 in ?? () from /usr/lib/libc.so.6
#32 0x00007fde3403990a in __libc_start_main () from /usr/lib/libc.so.6
#33 0x000055ba59591445 in ?? ()
[Inferior 1 (process 11525) detached]

Reported using DrKonqi
Comment 1 Basti 2023-06-26 16:22:28 UTC
Nvm, seems like I was just missing some necessary dbus packages
Comment 2 Basti 2023-06-26 18:25:21 UTC
Sorry for the inconvenience, it seems that I closed this issue too early.

The crash does not happen, while only using the Laptop display. When connecting an external monitor via thunderbolt/usb-c, all applications again crash on startup.
Comment 3 Basti 2023-06-26 19:06:58 UTC
For comparison - Backtrace of Okular crash:

Application: Okular (okular), signal: Segmentation fault

[KCrash Handler]
#4  0x00007efd2e7a7d14 in QWidget::hide() () from /usr/lib/libQt5Widgets.so.5
#5  0x00007efd2e900c46 in ?? () from /usr/lib/libQt5Widgets.so.5
#6  0x00007efd2e901381 in QMenuBar::changeEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#7  0x00007efd2e7aeecf in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#8  0x00007efd2e778b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007efd2da8e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#10 0x00007efd2e7a318c in QWidgetPrivate::updateFont(QFont const&) () from /usr/lib/libQt5Widgets.so.5
#11 0x00007efd2e7af380 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007efd2e778b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007efd2da8e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#14 0x00007efd2e7ccb18 in ?? () from /usr/lib/libQt5Widgets.so.5
#15 0x00007efd2e7ccb48 in ?? () from /usr/lib/libQt5Widgets.so.5
#16 0x00007efd2e7cd206 in ?? () from /usr/lib/libQt5Widgets.so.5
#17 0x00007efd2dabecf0 in ?? () from /usr/lib/libQt5Core.so.5
#18 0x00007efd2df4ef94 in QWindow::screenChanged(QScreen*) () from /usr/lib/libQt5Gui.so.5
#19 0x00007efd2df431d4 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) () from /usr/lib/libQt5Gui.so.5
#20 0x00007efd2e79c974 in QWidgetPrivate::create() () from /usr/lib/libQt5Widgets.so.5
#21 0x00007efd2e79cca4 in QWidget::create(unsigned long long, bool, bool) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007efd2e8feb2f in ?? () from /usr/lib/libQt5Widgets.so.5
#23 0x00007efd2e8fef68 in QMenuBar::QMenuBar(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#24 0x00007efd2e8c442c in QMainWindow::menuBar() const () from /usr/lib/libQt5Widgets.so.5
#25 0x00007efd08cdf2c2 in Okular::Part::setupActions() () from /usr/lib/qt/plugins/okularpart.so
#26 0x00007efd08ce4d2c in Okular::Part::Part(QWidget*, QObject*, QList<QVariant> const&) () from /usr/lib/qt/plugins/okularpart.so
#27 0x00007efd08cf3f97 in ?? () from /usr/lib/qt/plugins/okularpart.so
#28 0x00007efd2edb67a5 in KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) () from /usr/lib/libKF5CoreAddons.so.5
#29 0x000055e03ee22bb6 in ?? ()
#30 0x000055e03ee1f661 in ?? ()
#31 0x00007efd2d239850 in __libc_start_call_main (main=main@entry=0x55e03ee1e060, argc=argc@entry=1, argv=argv@entry=0x7fffe036bad8) at ../sysdeps/nptl/libc_start_call_main.h:58
#32 0x00007efd2d23990a in __libc_start_main_impl (main=0x55e03ee1e060, argc=1, argv=0x7fffe036bad8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffe036bac8) at ../csu/libc-start.c:360
#33 0x000055e03ee20345 in ?? ()
[Inferior 1 (process 5787) detached]
Comment 4 Basti 2023-06-27 06:48:26 UTC
Might be related to bug 466730 as the problem stops to occur when changing the global scale from 125% back to 100%.

Also bug 458535 sounds like the same problem.
Comment 5 fanzhuyifan 2023-09-16 23:41:24 UTC
Created attachment 161662 [details]
New crash information added by DrKonqi

konsole (23.08.1) using Qt 5.15.10

Connect external display via HDMI kernel, then a lot of kde apps wouldn't start (konsole, settings, dolphin are the ones I tested)

-- Backtrace (Reduced):
#6  0x00007f384eba78d9 in QWidget::hide() (this=0x5590c209c9f0) at kernel/qwidget.cpp:7942
#7  0x00007f384ed00a66 in QMenuBarPrivate::updateGeometries() (this=this@entry=0x5590c1f69dd0) at widgets/qmenubar.cpp:256
#8  0x00007f384ed011a1 in QMenuBar::changeEvent(QEvent*) (this=0x5590c20cfa70, e=0x7ffcfb62c780) at widgets/qmenubar.cpp:1446
#9  0x00007f384ebaeb1f in QWidget::event(QEvent*) (this=0x5590c20cfa70, event=0x7ffcfb62c780) at kernel/qwidget.cpp:8987
#10 0x00007f384eb7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5590c20cfa70, e=0x7ffcfb62c780) at kernel/qapplication.cpp:3640
Comment 6 fanzhuyifan 2023-09-16 23:46:58 UTC
For me, the problem only occurs when I enable [NVIDIA early loading](https://wiki.archlinux.org/title/NVIDIA#Early_loading)
Comment 7 fanzhuyifan 2023-09-16 23:49:45 UTC
(In reply to fanzhuyifan from comment #6)
> For me, the problem only occurs when I enable [NVIDIA early
> loading](https://wiki.archlinux.org/title/NVIDIA#Early_loading)

For reference, I use an ASUS laptop with an intel iGPU, and a NVIDIA dGPU.
Comment 8 fanzhuyifan 2023-10-26 17:13:53 UTC
*** Bug 472428 has been marked as a duplicate of this bug. ***
Comment 9 fanzhuyifan 2023-10-26 17:17:14 UTC
Reporter of 472428 also has dual GPU setup (Nvidia + intel)
>  *-display                 
>       description: 3D controller
>       product: GA107M [GeForce RTX 3050 Ti Mobile]
>       vendor: NVIDIA Corporation
>       physical id: 0
>       bus info: pci@0000:01:00.0
>       logical name: /dev/fb0
>       version: a1
>       width: 64 bits
>       clock: 33MHz
>       capabilities: pm msi pciexpress bus_master cap_list rom fb
>       configuration: depth=32 driver=nvidia latency=0 mode=2880x1800 visual=truecolor xres=2880 yres=1800
>       resources: iomemory:600-5ff iomemory:610-60f irq:181 memory:5f000000-5fffffff memory:6000000000-60ffffffff memory:6100000000-6101ffffff ioport:3000(size=128) memory:60000000-6007ffff
>  *-display
>       description: VGA compatible controller
>       product: Alder Lake-P Integrated Graphics Controller
>       vendor: Intel Corporation
>       physical id: 2
>       bus info: pci@0000:00:02.0
>       logical name: /dev/fb0
>       version: 0c
>       width: 64 bits
>       clock: 33MHz
>       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
>       configuration: depth=32 driver=i915 latency=0 resolution=2880,1800
>       resources: iomemory:610-60f iomemory:400-3ff irq:162 memory:612c000000-612cffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
Comment 10 Laura David Hurka 2023-10-27 12:27:59 UTC
Can all of you describe your multi-monitor setup (e. g. with screenshot of System Settings), including arrangement, rotation, and scale?
Maybe there is something common like pixel (0, 0) not mapped to any screen.
Comment 11 Yurii 2023-10-27 13:19:25 UTC
Created attachment 162592 [details]
Multimonitor setup
Comment 12 Basti 2023-10-28 17:51:50 UTC
I actually cannot reproduce this bug anymore, but I also never used nvidia early loading and only have an intel integrated graphics card.

Current versions:

KDE-plasma 5.27.8
KDE-frameworks 5.110.0
Qt 5.15.11
Comment 13 Thomas Moerschell 2023-10-30 20:13:43 UTC
Created attachment 162740 [details]
Display configuration

Sorry that I'm only posting it now. Note that in my configuration the primary display is the external one, so the primary display changes when I plug in the external monitor.
Comment 14 Yurii 2023-10-31 11:21:30 UTC
For me it only happens when i plug in my second monitor via USB Type C/Thunderbolt dockstation. When monitor is connected directly to the laptop then there is no crashes.
Comment 15 fanzhuyifan 2023-11-03 02:21:59 UTC
*** Bug 474903 has been marked as a duplicate of this bug. ***
Comment 16 fanzhuyifan 2023-11-03 02:22:25 UTC
*** Bug 458535 has been marked as a duplicate of this bug. ***
Comment 17 fanzhuyifan 2023-11-03 02:26:54 UTC
Should the product/component be changed since people are reporting this for a lot of applications, not just konsole?
Comment 18 fanzhuyifan 2023-11-03 02:27:18 UTC
Marking as confirmed from the number of duplicate reports.
Comment 19 fanzhuyifan 2023-11-03 02:28:29 UTC
*** Bug 475804 has been marked as a duplicate of this bug. ***
Comment 20 Junfeng Qiao 2023-11-11 23:20:45 UTC
In my case, I am using a USB Type-C to HDMI adapter. Before plugging in the adapter everything works fine; after connecting to the external monitor, konsole, okular, and even the system settings crash with similar traceback.
This only happens on x11; with Wayland, it seems things are working well.
Comment 21 TraceyC 2024-07-15 21:59:16 UTC
*** Bug 490289 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Cullmann 2024-08-11 20:07:43 UTC
Please re-try this with an Qt 6 based release of this year, thanks!
Comment 23 Bug Janitor Service 2024-08-26 03:47:27 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 24 Bug Janitor Service 2024-09-10 03:47:01 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.