Bug 503420

Summary: "QLayout: Cannot add a null widget to QHBoxLayout/" error is output to journal when launching Konsole
Product: [Applications] konsole Reporter: Jim Fischer <jfischer_5809>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: minor CC: christoph, john.kizer
Priority: NOR    
Version First Reported In: 25.04.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 25.08.0
Sentry Crash Report:

Description Jim Fischer 2025-04-27 08:29:51 UTC
SUMMARY
When I spawn a new konsole instance via a shell prompt, and the konsole command line uses the `-e` option to invoke an SSH command line, the newly created konsole process emits the following diagnostic message:

QLayout: Cannot add a null widget to QHBoxLayout/

STEPS TO REPRODUCE
1. Open any command shell window, e.g., xterm, konsole
2. At the shell prompt, type a command line that spawns a new konsole process, and uses the `-e` option to invoke an SSH command line, such as:

/usr/bin/konsole -e /usr/bin/ssh -A -X -i ~/.ssh/id_ed25519 -p 22 pi@192.168.1.3

[Note 1.  In this example, the SSH command performs a remote login as user 'pi' on a Raspberry Pi whose IPv4 address is 192.168.1.3. --end note]

OBSERVED RESULT
$ /usr/bin/konsole -e /usr/bin/ssh -A -X -i ~/.ssh/id_ed25519 -p 22 pi@192.168.1.3
QLayout: Cannot add a null widget to QHBoxLayout/
QThreadStorage: Thread 0x563588e32bc0 exited after QThreadStorage 9 destroyed

A new konsole window opens, the SSH command line runs and successfully logs in as user 'pi' on the remote host.  I can now use the new konsole window to run commands on the remote host.

EXPECTED RESULT
The same as above, but without the Qt diagnostic message
QLayout: Cannot add a null widget to QHBoxLayout/

[Note 1.  I've filed a separate but report regarding the second Qt diagnostic message,
QThreadStorage: Thread 0x563588e32bc0 exited after QThreadStorage 9 destroyed
--end note]

SOFTWARE/OS VERSIONS
$ kinfo
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.14.3-200.fc41.x86_64 (64-bit)
Graphics Platform: X11
Processors: 4 × 13th Gen Intel® Core™ i7-13700
Memory: 5.7 GiB of RAM
Graphics Processor: llvmpipe

ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-04-28 04:55:32 UTC
Hi - I can reproduce on my Fedora KDE 42 device. It doesn't appear to require anything specific about launching Konsole in order to trigger - ex. just starting Konsole normally from the Application Launcher causes that message to be written to the system journal.

Thanks!
Comment 2 Christoph Cullmann 2025-08-17 20:54:38 UTC
That is fixed in 25.08:

https://invent.kde.org/utilities/konsole/-/commit/e67e3226c6317aa1b2247704a11ae1e9d34d7b93