Created attachment 156276 [details] An python script which opens a empty window with Tkinter, setting the title of that window to ~7000 characters. SUMMARY If an application's title is too long, plasmashell will quit for whatever reason. (Not crash) This issue seems to be Wayland only, X11 will work fine. This has become a problem as some (rather niche) web developer puts thousands of characters into the HTML <title> tag for fun, and plasmashell would quit everytime you visit the website. (Notably with Chromium based browser/Firefox, Falkon seems unaffected, Firefox may not be able to reproduce this, see below). The length required to reproduce this seems to vary between system, but on my main system it's exactly 4074 characters. STEPS TO REPRODUCE 1. Switch to Wayland session 2. Visit a website with very long title (https://freeplay.codeberg.page), or run the python code attached, which opens an empty Tkinter window with a very long title (7000 char-ish). OBSERVED RESULT plasmashell will quit shortly after with only the following message: "The Wayland connection broke. Did the Wayland compositor die?" As long as the Window with a long title still persist, plasmashell would refuse to start with the message above. EXPECTED RESULT Plasmashell should continue functioning normally. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian GNU/Linux KDE Plasma Version: 5.26.90 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 Graphics Platform: Wayland ADDITIONAL INFORMATION I assume there is some integration between Firefox and Plasma that prevents this from happening under Firefox. The Window title will change to "-" on the Plasma Panel's window preview if the title is too long on an officially branded Firefox browser, and plasmashell would not crash. But on any non-Firefox branded browser. (Firefox ESR, Unbranded Firefox CI build, Librewolf etc), the panel's window preview would still display the full title, then the entire plasmashell would quit. (Might not be caused by the panel itself, but still should be worth noting) Also able to reproduce this in an KDE Neon VM (Plasma 5.27.0).
The window title is to big for the buffer Feb 16 13:48:35 david-thinkpad kwin_wayland_wrapper[1496]: Data too big for buffer (7468 > 4096). Feb 16 13:48:35 david-thinkpad kwin_wayland_wrapper[1496]: error in client communication (pid 13429)
Your observed 4074 characters is close to the 4096 Byte wayland buffer size
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3818
Git commit f88ff99d82f3e2f9811d174838d28fc4339e2284 by David Edmundson. Committed on 17/03/2023 at 12:21. Pushed by davidedmundson into branch 'master'. wayland: Truncate strings sent via plasmawindowmanager interface Wayland has a limited size for strings in arguments. We should truncate any strings that come from user-defined data before sending. We keep the full title around within kwin as it keeps logic simpler. Size length logic is lifted from QWaylandWindow's setTitle M +13 -0 src/wayland/autotests/client/test_wayland_windowmanagement.cpp M +17 -4 src/wayland/plasmawindowmanagement_interface.cpp https://invent.kde.org/plasma/kwin/commit/f88ff99d82f3e2f9811d174838d28fc4339e2284
Git commit ec6a5e7945806afcc80f26950820a5307659fad0 by David Edmundson. Committed on 17/03/2023 at 20:01. Pushed by davidedmundson into branch 'Plasma/5.27'. wayland: Truncate strings sent via plasmawindowmanager interface Wayland has a limited size for strings in arguments. We should truncate any strings that come from user-defined data before sending. We keep the full title around within kwin as it keeps logic simpler. Size length logic is lifted from QWaylandWindow's setTitle (cherry picked from commit f88ff99d82f3e2f9811d174838d28fc4339e2284) M +13 -0 src/wayland/autotests/client/test_wayland_windowmanagement.cpp M +17 -4 src/wayland/plasmawindowmanagement_interface.cpp https://invent.kde.org/plasma/kwin/commit/ec6a5e7945806afcc80f26950820a5307659fad0
*** Bug 467612 has been marked as a duplicate of this bug. ***