| Summary: | KWin crashes when a window has the signal `maximizedAboutToChange` | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | jesuscarclem30 |
| Component: | scripts | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
jesuscarclem30
2025-12-16 10:08:26 UTC
More info https://codeberg.org/Serroda/fluid-tile/issues/30 This could be the problem https://invent.kde.org/plasma/kwin/-/blame/master/src/effect/globals.h#L61 ```js
workspace.windowAdded.connect(window => {
window.maximizedAboutToChange.connect(mode => console.log("whatsup", mode));
});
```
works for me
```
js: whatsup 3
js: whatsup 0
```
can you attach a simple script to the bug report that reproduces the issue?
The error occurs occasionally. I can't tell you exactly when it happens; it just shows the error in the log.
```js
window.maximizedAboutToChange.connect((mode) => {
onMaximizeChange(mode, window);
});
}
function onMaximizeChange(mode, window) {
if (mode !== 0) {
return;
}
//DO STUFF
}
```
Maybe the `window` object is not valid or something? If kwin crashes, can you share a backtrace please? More logs ``` Dec 16 02:04:35 kwin_wayland[1649087]: QDBusConnection: couldn't handle call to Teardown, no slot matched Dec 16 02:04:35 kwin_wayland[1649087]: Could not find slot Krunner1Adaptor::Teardown Dec 16 02:05:45 kwin_wayland[1649087]: "Could not convert argument 0 from undefined to QList<qulonglong>" Dec 16 02:05:45 kwin_wayland[1649087]: "onWindowMaximizedStateChanged@:99" Dec 16 02:05:45 kwin_wayland[1649087]: <Unknown File>:99: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed. ``` `MaximizeMode` was `undefined` - "Could not convert argument 0 from undefined to QList<qulonglong>" `Window` object is valid and not `undefined` This only happens in specific cases, when the window changes state to maximized but does not return a `mode` Ok nevermind is a problem with my code, `maximizedAboutToChange` is working Sorry! |