https://bugs.kde.org/show_bug.cgi?id=497274

            Bug ID: 497274
           Summary: Plasmashell crashes with wayland protocol error
                    "xdg_surface#215: error -1: invalid window geometry
                    size (0x0)" after adding and clicking on memory usage
                    applet
    Classification: Plasma
           Product: plasmashell
           Version: 6.2.4
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: generic-crash
          Assignee: plasma-b...@kde.org
          Reporter: m.k...@irregular.at
  Target Milestone: 1.0

Created attachment 176490
  --> https://bugs.kde.org/attachment.cgi?id=176490&action=edit
STEPS TO REPRODUCE

SUMMARY
See title, should say it all.
I can reproduce 100% each time.

STEPS TO REPRODUCE
1. Siehe Attached Screenshot: Basically just add a "Memory Usage" Applet to the
task bar and click on it.

FYI: I think you need to make sure that you do not have any "Memory Usage"
applet or widget or a related one (one from the system monitor / ksystemstats)
shown yet. If you do so, remove them all, log out and log in again. Then follow
the steps in the screenshot.

Bug 493572 seems similar, but not sure if it's the same cause. (I am on a
MacBook Pro M1 Pro with Asahi Linux and not sure how my display is handled. I
did read somewhere on this devices the Laptop screen is treated like an
external display (?) not sure though.)
Anyway.
I was digging into this and it seems that libplasma has a fix in place in its
master branch:
https://invent.kde.org/plasma/libplasma/-/merge_requests/1205/diffs
Since I use Arch btw, I built the current libplasma `Plasma/6.2` branch with
https://invent.kde.org/plasma/libplasma/-/commit/ee773fa669f91b34115a123c89055857bb52f04c
cherry-picked on top. Now... In theory this fixed the problem, but actually now
plasmashell crashes even more and often, after login already, on the
`Q_ASSERT(!size.isEmpty());` line, because we do _not_ build with the
`QT_NO_DEBUG` flag (see
https://doc.qt.io/qt-6/qtassert-qtcore-proxy.html#Q_ASSERT and also
https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-base/-/blob/main/PKGBUILD).
When I build again, removing that Q_ASSERT line, things just work now, I can
also click on the applet and a popup with memory details appear.
See logs I copy/pasted at the end of this report.

However... that still means there is a bug I guess? Since you assert that size
should not be empty but it is, this might need to be locked into?

Also, would be great to resolve this problem in Plasma 6.2. Thanks!

OBSERVED RESULT
plasmashell crashes

EXPECTED RESULT
When clicking on the "Memory Usage" Applet plasmashell should of course not
crash, but a popup with more details on memory usage should be shown.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux ARM 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.12.3-asahi-1-1-ARCH (64-bit)
Graphics Platform: Wayland
Processors: 8 × Apple Firestorm (M1 Pro), 2 × Apple Icestorm (M1 Pro)
Memory: 31.0 GiB of RAM
Graphics Processor: Apple M1 Pro
Product Name: Apple MacBook Pro (14-inch, M1 Pro, 2021)
U-Boot Version: 2024.10

$ pacman -Q | grep -E 'llvm|clang|mesa|rust|gcc|glibc'
clang 18.1.8-4
gcc 14.1.1+r1+g43b730b9134-1
gcc-libs 14.1.1+r1+g43b730b9134-1
glibc 2.39+r52+gf8e4623421-1
llvm 18.1.8-4
llvm-libs 18.1.8-4
mesa-asahi 25.0.0_pre20241204-1
mesa-asahi-debug 25.0.0_pre20241204-1
mesa-utils 9.0.0-5
rust-bindgen 0.71.1-1
rustup 1.27.1-1
spirv-llvm-translator 18.1.7-1

ADDITIONAL INFORMATION

The original log with Plasma 6.2.4 when the error occurs:

> Dez 10 11:29:22 mkurz-macbook-pro kwin_wayland_wrapper[908]: error in client 
> communication (pid 1060)
> Dez 10 11:29:22 mkurz-macbook-pro plasmashell[1060]: xdg_surface#215: error 
> -1: invalid window geometry size (0x0)
> Dez 10 11:29:22 mkurz-macbook-pro plasmashell[1060]: The Wayland connection 
> experienced a fatal error: Protocol error
> Dez 10 11:29:22 mkurz-macbook-pro systemd[853]: plasma-plasmashell.service: 
> Main process exited, code=exited, status=255/EXCEPTION
> Dez 10 11:29:22 mkurz-macbook-pro systemd[853]: plasma-plasmashell.service: 
> Failed with result 'exit-code'.
> Dez 10 11:29:22 mkurz-macbook-pro systemd[853]: plasma-plasmashell.service: 
> Consumed 50.539s CPU time, 2.4G memory peak.
> Dez 10 11:29:22 mkurz-macbook-pro systemd[853]: plasma-plasmashell.service: 
> Scheduled restart job, restart counter is at 1.

The log after cherry-picked merge request 1205 on top of Plasma/6.2. Now the
assertion makes things crash:

> Dez 09 22:46:20 mkurz-macbook-pro plasmashell[1058]: ASSERT: 
> "!size.isEmpty()" in file 
> /home/mkurz/Arch-Linux-Packages/libplasma/src/libplasma/src/>
> Dez 09 22:46:20 mkurz-macbook-pro plasmashell[1058]: KCrash: Application 
> 'plasmashell' crashing... crashRecursionCounter = 2
> Dez 09 22:46:20 mkurz-macbook-pro systemd-coredump[1674]: Process 1058 
> (plasmashell) of user 1000 terminated abnormally with signal 6/ABRT, process>

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to