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

            Bug ID: 486631
           Summary: KWin crashes when accessing window caption while
                    handling Window.visibleGeometryChanged() after
                    workspace.windowRemoved() was triggered
    Classification: Plasma
           Product: kwin
           Version: 6.0.4
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: scripting
          Assignee: kwin-bugs-n...@kde.org
          Reporter: bugs.kde....@derflupp.e4ward.com
  Target Milestone: ---

Created attachment 169216
  --> https://bugs.kde.org/attachment.cgi?id=169216&action=edit
Example script triggering a KWin crash. Grep for “potentially triggers KWin
crash” to find the guilty line.

Assume a handler function h() is connected to w.visibleGeometryChanged() for a
particular window w in a KWin script. Accessing w.caption in h() crashes KWin
when workspace.windowRemoved() was already triggered for w.

The issue might be more generic, i.e., accessing a window property after
workspace.windowRemoved() was triggered for this window could lead to a KWin
crash in general. However, one could ask: Is it a bug of the KWin script to
access windows properties of a removed window? Is it expected that KWin scripts
can crash KWin (rather than just the script)?


STEPS TO REPRODUCE

The attached KWin script can be used to trigger a crash when a window is
removed. Caution: Be prepared to being able to disable the script again to
avoid repeated unwanted KWin crashes, e.g. via kwriteconfig6 --file kwinrc
--group Plugins --key kwin-scripting-event-loggerEnabled false; qdbus
org.kde.KWin /KWin reconfigure.


OBSERVED RESULT

KWin crashes.


EXPECTED RESULT

Nothing crashes – neither KWin nor the script. However, this is debatable (see
above).


SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4790 CPU @ 3.60GHz
Memory: 23,4 GiB of RAM
Graphics Processor: VERDE
Manufacturer: ASUS
Product Name: All Series

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

Reply via email to