Bug 480614 - Long String of Unicode Characters in Virtual Desktop Name Crashes plasmashell
Summary: Long String of Unicode Characters in Virtual Desktop Name Crashes plasmashell
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.92.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-31 18:08 UTC by Paxriel
Modified: 2024-02-03 04:13 UTC (History)
2 users (show)

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


Attachments
journalctl logs from boot till blank screen (232.12 KB, text/plain)
2024-01-31 18:08 UTC, Paxriel
Details
Raw gdb log of plasmashell for the crash (1.68 MB, text/plain)
2024-02-02 06:37 UTC, Paxriel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paxriel 2024-01-31 18:08:38 UTC
Created attachment 165406 [details]
journalctl logs from boot till blank screen

SUMMARY
Attempting to use an extremely long string of characters from the UTF-8 test file at https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html as the name of a virtual desktop immediately crashes kwin when applied. This issue also persists when rebooted.

EXAMPLE STRING
∮ E⋅da = Q,  n → ∞, ∑ f(i) = ∏ g(i), ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β),  ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (A ⇔ B),  2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mmði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn  Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ]((V⍳V)=⍳⍴V)/V←,V    ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι,  ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς  λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ  τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿   εἰς τοῦτο προήκοντα,  ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ  πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν  οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι,  οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν  ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον  τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι  γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν  προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους  σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ  τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ  τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς  τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო  კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს,  ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს  ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი,  ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება  ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში,  ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში.Зарегистрируйтесь сейчас на ДесятуюМеждународную Конференцию по  Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии.  Конференция соберет широкий круг экспертов по  вопросам глобального  Интернета и Unicode, локализации и интернационализации, воплощению и  применению Unicode в различных операционных системах и программных  приложениях, шрифтах, верстке и многоязычных компьютерных системах.ሰማይ አይታረስ ንጉሥ አይከሰስ። ብላ ካለኝ እንደአባቴ በቆመጠኝ።ጌጥ ያለቤቱ ቁምጥና ነው።ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው።የአፍ ወለምታ በቅቤ አይታሽም።አይጥ በበላ ዳዋ ተመታ።ሲተረጉሙ ይደረግሙ።ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል።ድር ቢያብር አንበሳ ያስር።ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም።እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም።የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ ሥራ ከመፍታት ልጄን ላፋታት።ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል።የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ።ተንጋሎ ቢተፉ ተመልሶ ባፉ።ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው።እግርህን በፍራሽህ ልክ ዘርጋ።ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ

STEPS TO REPRODUCE
1. Go to KSettings -> Virtual Desktops
2. Rename a virtual desktop as the above string and click 'Apply'.

OBSERVED RESULT
The bottom panel freezes for a short while then disappears along with the background, but the remaining applications remain open. Rebooting results in a blank screen with a cursor once the user logs in. This behaviour does not change upon repeated reboots.

EXPECTED RESULT
The virtual desktop is renamed as the above string.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 40 RC 20240131 / Kernel 6.8.0-0 rc0
(available in About System)
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
The journalctl logs from boot till the user's login screen is entered is included as an attachment.
Comment 1 Nate Graham 2024-02-01 20:41:27 UTC
If something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?

Thanks!
Comment 2 Paxriel 2024-02-02 06:36:01 UTC
I tried retrieving the logs via coredumpctl but no luck:

TIME                         PID  UID  GID SIG     COREFILE EXE             SIZE
Fri 2024-02-02 13:21:41 +08 5839 1000 1000 SIGSEGV present  /usr/bin/kmail 38.7M

(The crash for kmail is just me closing the kmail window beforehand and not related)

Trying to run plasmashell in gdb also doesn't produce any useful results either:

[Thread 0x7fffe0a006c0 (LWP 7248) exited]
[Thread 0x7fffb60006c0 (LWP 7247) exited]
[Thread 0x7fffb56006c0 (LWP 7235) exited]
[Thread 0x7fffb6a006c0 (LWP 7233) exited]
[Thread 0x7fffbfe006c0 (LWP 7218) exited]
[Thread 0x7fffafe006c0 (LWP 7249) exited]
[Thread 0x7fffd0c006c0 (LWP 7194) exited]
[Thread 0x7fffd16006c0 (LWP 7193) exited]
[Thread 0x7fffd20006c0 (LWP 7192) exited]
[Thread 0x7fffd2a006c0 (LWP 7191) exited]
[Thread 0x7fffd34006c0 (LWP 7190) exited]
[Thread 0x7fffd3e006c0 (LWP 7189) exited]
[Thread 0x7fffd8e006c0 (LWP 7188) exited]
[Thread 0x7fffd98006c0 (LWP 7187) exited]
[Thread 0x7fffe14006c0 (LWP 7150) exited]
[Thread 0x7fffe22006c0 (LWP 7145) exited]
[Thread 0x7ffff0036b00 (LWP 7069) exited]
[Thread 0x7fffc4c006c0 (LWP 7195) exited]
[New process 7069]
[Inferior 1 (process 7069) exited with code 0377]
No stack.
The program is not being run.

(Full version included as attachment)
Comment 3 Paxriel 2024-02-02 06:37:31 UTC
Created attachment 165465 [details]
Raw gdb log of plasmashell for the crash
Comment 4 Paxriel 2024-02-02 06:50:52 UTC
Using valgrind produces the following output:
libEGL warning: egl: failed to create dri2 screen
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
kf.plasma.quick: Applet preload policy set to 1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:196:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
qt.qml.typeresolution.cycle: Cyclic dependency detected between "qrc:/qt/qml/org/kde/desktop/private/TextFieldContextMenu.qml" and "qrc:/qt/qml/org/kde/desktop/MenuItem.qml"
file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:162:21: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:162:21: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
qt.qml.typeresolution.cycle: Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationHeader.qml"
qt.qml.typeresolution.cycle: Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/ThumbnailStrip.qml"
qml: SystemTray ItemLoader: Invalid state, cannot determine source!
qt.dbus.integration: Could not connect "org.cups.cupsd.Notifier" to PrinterFinishingsChanged(QString, QString, QString, uint, QString, bool) : 
QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
The Wayland connection broke. Did the Wayland compositor die?
Comment 5 Vlad Zahorodnii 2024-02-02 09:50:58 UTC
"Long String of Unicode Characters in Virtual Desktop Name Crashes kwin" is not consistent with

> but the remaining applications remain open

if kwin crashes, then all apps would crash except some Qt ones
Comment 6 Bug Janitor Service 2024-02-02 10:06:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5092
Comment 7 Paxriel 2024-02-02 10:07:37 UTC
(In reply to Vlad Zahorodnii from comment #5)
> "Long String of Unicode Characters in Virtual Desktop Name Crashes kwin" is
> not consistent with
> 
> > but the remaining applications remain open
> 
> if kwin crashes, then all apps would crash except some Qt ones

Yes, I think I got kwin mixed up with plasmashell when I made the bug report.
Comment 8 Vlad Zahorodnii 2024-02-02 11:50:46 UTC
Git commit e58451fc01e4a7713a33474a7243f7489ace24a4 by Vlad Zahorodnii.
Committed on 02/02/2024 at 10:03.
Pushed by vladz into branch 'master'.

wayland: Truncate virtual desktop names

Virtual desktop names are user defined strings so they can exceed
the maximum size of a wayland message size.

M  +1    -0    src/wayland/CMakeLists.txt
M  +3    -2    src/wayland/plasmavirtualdesktop.cpp
M  +1    -13   src/wayland/plasmawindowmanagement.cpp
A  +27   -0    src/wayland/quirks.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]

https://invent.kde.org/plasma/kwin/-/commit/e58451fc01e4a7713a33474a7243f7489ace24a4
Comment 9 Vlad Zahorodnii 2024-02-02 11:51:03 UTC
Git commit aafce3b54e1c75f953f42f36d0f7f6bf762438d9 by Vlad Zahorodnii.
Committed on 02/02/2024 at 11:51.
Pushed by vladz into branch 'Plasma/6.0'.

wayland: Truncate virtual desktop names

Virtual desktop names are user defined strings so they can exceed
the maximum size of a wayland message size.


(cherry picked from commit e58451fc01e4a7713a33474a7243f7489ace24a4)

M  +1    -0    src/wayland/CMakeLists.txt
M  +3    -2    src/wayland/plasmavirtualdesktop.cpp
M  +1    -13   src/wayland/plasmawindowmanagement.cpp
A  +27   -0    src/wayland/quirks.h     [License: LGPL(3+eV) LGPL(v3.0) LGPL(v2.1)]

https://invent.kde.org/plasma/kwin/-/commit/aafce3b54e1c75f953f42f36d0f7f6bf762438d9