Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions are executed on an inactive window #41

Open
pallaswept opened this issue Jul 15, 2024 · 15 comments · Fixed by #51 · May be fixed by #52
Open

Actions are executed on an inactive window #41

pallaswept opened this issue Jul 15, 2024 · 15 comments · Fixed by #51 · May be fixed by #52

Comments

@pallaswept
Copy link

Hi again Luis, hope you're well!

I've been noticing a strange bug lately. It doesn't happen always. I especially notice it with two apps, scrcpy and coolercontrol, if I start them from the Application Launcher, then execute an action from your awesome spacer, such as to maximise or close the window, then the previously active window will be maximised or closed.

Eg right now if I click my App Launcher and select coolercontrol from my Favorites, it opens up in front and the Task Manager widget shows that it is active, if I scroll up on my spacer, that should normally maximise it, but when I do, it will maximise this window. If I click on it or interact with it in any way, before I send it a command with the spacer, it works as intended. It's as though the spacer doesn't know it is the active window.

I feel like this wasn't always an issue, so I had a look through the changelog and noticed this b3d25a0 I wonder if maybe this could be related? I was seeing this bug with 1.6.0 (before this commit) and am now seeing it in 1.8.2, so perhaps not, or perhaps I see a similar bug and this commit doesn't fix mine?

It's early days, so forgive me if this changes, but it seeeems like with 1.8.2, it still fails for scrcpy, but works OK for coolercontrol? That seems odd, but... I had a 100% reproducible break just moments ago as I typed this, I upgraded the spacer from 1.6.0 to 1.8.2, and now it still always fails on scrcpy but never on coolercontrol, which has been reliably failing for maybe several weeks now. Weird?

@pallaswept
Copy link
Author

pallaswept commented Sep 18, 2024

Hi Luis, I managed to find a method to reliably reproduce this, so I am able to record video to demonstrate.

It seems the problem is that I'm going too fast. I don't understand how that works, but maybe you will?

  1. In this video, I have my 'important document' (a konsole window with 'hi mum' in it).
  2. Next, I open scrcpy (I don't know why this app does this more than others... I have seen it happen with Kate and Firefox, though, which resulted in data loss :( )
  3. There is a short delay while scrcpy connects to my phone, so I point at the bottom-right corner. Here, I have a black square, but it is a spacer which will act as a kwin window close button when clicked.
  4. Now scrcpy opens. You can see that it is the active window. I can go and interact with this window, clicking, dragging etc, it is definitely active.
  5. I take my mouse off the 'close button' and then quickly move to it and click. This should close scrcpy.
  6. Oh no, my "important document" was just closed.

If I repeat the above, but do step 5 slower, at about half that speed, everything works fine. Or if I move fast, pause a moment and hover the spacer before I click, then click, that's fine too.

Hope this helps nail it down!

untitled.mp4

Edit: Whoops, mkv doesn't work here.

@luisbocanegra
Copy link
Owner

luisbocanegra commented Sep 19, 2024

Hi, sorry I forgot to respond to this issue before.

Is this on X11 or ayland?

At least on wayland I can't seem to reproduce the issue with scrcpy, the window takes the focus immediately for me.

Are you maybe using window rules or a KWin script that could interfere with windows focus?

@luisbocanegra
Copy link
Owner

Please do this

  1. Enable debug mode in the widget settings
  2. Run journalctl -f and verify you get lines like this when interacting with windows:
    sep 18 18:40:11 archlinux plasmashell[2112738]: qml: luisbocanegra.panelspacer.extended S:1 ID:966 Active task: Name: Visual Studio Code Title: plasma-panel-colorizer main.qml - Visual Studio Code Id: {19c3de54-e662-4faf-ba89-d99aabd15024}
    
  3. With the command running, reproduce the issue
  4. Paste the generated output here.

@luisbocanegra
Copy link
Owner

luisbocanegra commented Sep 19, 2024

Previously I had this issue with xwayland windows not being focused correctly (e.g when dragging the xwayland window, it dragged instead the wayland window from the other screen) but that seems gone now.

@pallaswept
Copy link
Author

pallaswept commented Sep 19, 2024

Hi, sorry I forgot to respond to this issue before.

No worries mate I figured it was just being difficult to reproduce :)

At least on wayland I can't seem to reproduce the issue with scrcpy, the window takes the focus immediately for me.

That's the weird thing - it has focus. For this test, rather than just opening the window and closing it, I open it, then click in it, unlock my phone, browse around, maximize scrcpy then restore it, browse around some more.... Then try to close with this tool, and same failure.

I do have a kwin rule for scrcpy so I deleted it and the behaviour was the same. Perhaps it's noteworthy that my scrcpy .desktop file actually starts bash, with arguments -c scrcpy ..... I tried starting it by entering the full command at the terminal, the behaviour did not change.

I tried the troubleshooting thing before but couldn't find a log file. I didn't think to check the journal facepalm I think I just had an old guy moment 😆

This shows why I'm seeing the behaviour for sure. It is detecting the wrong window as active before the bug occurs. This is the impoartant part of the log:

Sep 19 15:16:28 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:28 Pallas systemd[10218]: Started scrcpy - Android Remote Control.
.....
Sep 19 15:16:31 Pallas bash[100752]: [server] INFO: Device: [samsung] samsung SM-G900I (Android 11)
Sep 19 15:16:32 Pallas kwin_wayland[10317]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11
Sep 19 15:16:32 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}

At the moment of that last line, scrcpy is active, focussed, and accepting mouse input. When I click the spacer after this, that Kate window is closed.

The first time I'd try this, I had konsole open running journalctl, and when I tried to close scrcpy, konsole would steal focus to prompt me if I wanted to close it. To avoid this focus stealing interfering with the results, I opened two copies of Kate, then opened scrcpy, then clicked the spacer 'close button' and moved my mouse off the spacer, repeated three times. Here's the full log of that:

Sep 19 15:16:14 Pallas systemd[10218]: Started Kate - Advanced Text Editor.
Sep 19 15:16:14 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Konsole Title: — Konsole Id: {d13db6db-6a6a-4d4a-bcd4-66fac312a991}
Sep 19 15:16:14 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:14 Pallas plasmashell[10569]: QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context
Sep 19 15:16:14 Pallas plasmashell[10569]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:242: TypeError: Property 'modelIndex' of object Task_QMLTYPE_663(0x559b003dd770) is not a function
Sep 19 15:16:16 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:16 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:17 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:17 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:17 Pallas systemd[10218]: Started Kate - Advanced Text Editor.
Sep 19 15:16:18 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:18 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:23 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:23 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:28 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:28 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:28 Pallas systemd[10218]: Started scrcpy - Android Remote Control.
Sep 19 15:16:28 Pallas bash[100669]: bash: cannot set terminal process group (-1): Inappropriate ioctl for device
Sep 19 15:16:28 Pallas bash[100669]: bash: no job control in this shell
Sep 19 15:16:28 Pallas bash[100722]: TERM environment variable not set.
Sep 19 15:16:28 Pallas bash[100669]: .bashrc execution time: 17ms
Sep 19 15:16:29 Pallas bash[100669]: INFO: Video orientation is locked for v4l2 sink. See --lock-video-orientation.
Sep 19 15:16:29 Pallas bash[100730]: * daemon not running; starting now at tcp:5037
Sep 19 15:16:30 Pallas bash[100730]: * daemon started successfully
Sep 19 15:16:30 Pallas bash[100750]: /usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 148.6 MB/s (71112 bytes in 0.000s)
Sep 19 15:16:31 Pallas bash[100752]: [server] INFO: Device: [samsung] samsung SM-G900I (Android 11)
Sep 19 15:16:32 Pallas kwin_wayland[10317]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11
Sep 19 15:16:32 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:32 Pallas bash[100752]: [server] INFO: Device screen turned off
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Drag start: QPointF(1919, 1439)
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Left button pressed
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_ACTION: kwin,Window Close
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Trying to activate last window...
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_SHORTCUT: sh '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/run_kwin_script.sh' 'focusTopWindow' '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/focusTopWindow.js' true;gdbus call --session --dest org.kde.kglobalaccel --object-path /component/kwin --method org.kde.kglobalaccel.Component.invokeShortcut "Window Close"
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {aba58f5c-9e4c-4c0e-b9a2-245b0e993971}
Sep 19 15:16:51 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Focusing top window...
Sep 19 15:16:51 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: cursor: x:1696 y:1696 screen:HDMI-A-1
Sep 19 15:16:51 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: active screen: HDMI-A-1 current: HDMI-A-1
Sep 19 15:16:51 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Top: Untitled — Kate|kate|org.kde.kate|12|HDMI-A-1
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Konsole Title: — Konsole Id: {d13db6db-6a6a-4d4a-bcd4-66fac312a991}
Sep 19 15:16:51 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: scrcpy Title: SM-G900I Id: {174669cb-d5be-4e96-a656-a8ba87e0091d}
Sep 19 15:16:51 Pallas systemd[10218]: app-org.kde.kate@3a452c7ae283401e973874e75b2b22cf.service: Consumed 1.079s CPU time, 109.3M memory peak.
Sep 19 15:16:54 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Drag start: QPointF(1919, 1439)
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Left button pressed
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_ACTION: kwin,Window Close
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Trying to activate last window...
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_SHORTCUT: sh '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/run_kwin_script.sh' 'focusTopWindow' '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/focusTopWindow.js' true;gdbus call --session --dest org.kde.kglobalaccel --object-path /component/kwin --method org.kde.kglobalaccel.Component.invokeShortcut "Window Close"
Sep 19 15:16:55 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Focusing top window...
Sep 19 15:16:55 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: cursor: x:1679 y:1679 screen:HDMI-A-1
Sep 19 15:16:55 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: active screen: HDMI-A-1 current: HDMI-A-1
Sep 19 15:16:55 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Top: SM-G900I|scrcpy|scrcpy|11|HDMI-A-1
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name:  Title:  Id:
Sep 19 15:16:55 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Kate Title: Untitled — Kate Id: {018bc3bf-73d0-4ab9-81e5-50cf620feeef}
Sep 19 15:16:56 Pallas bash[100669]: WARN: Killing the server...
Sep 19 15:16:56 Pallas bash[100669]: scrcpy 2.6.1 <https://github.com/Genymobile/scrcpy>
Sep 19 15:16:56 Pallas bash[100669]: INFO: Connecting to dory:5555...
Sep 19 15:16:56 Pallas bash[100669]: INFO: Connected to dory:5555
Sep 19 15:16:56 Pallas bash[100669]: INFO: Renderer: opengl
Sep 19 15:16:56 Pallas bash[100669]: INFO: OpenGL version: 4.6.0 NVIDIA 560.35.03
Sep 19 15:16:56 Pallas bash[100669]: INFO: Trilinear filtering enabled
Sep 19 15:16:56 Pallas bash[100669]: INFO: v4l2 sink started to device: /dev/video9
Sep 19 15:16:56 Pallas bash[100669]: INFO: Texture: 1080x1920
Sep 19 15:16:56 Pallas bash[100669]: INFO: Killing adb server...
Sep 19 15:16:56 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Drag start: QPointF(1919, 1439)
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Left button pressed
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_ACTION: kwin,Window Close
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Trying to activate last window...
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_SHORTCUT: sh '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/run_kwin_script.sh' 'focusTopWindow' '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/focusTopWindow.js' true;gdbus call --session --dest org.kde.kglobalaccel --object-path /component/kwin --method org.kde.kglobalaccel.Component.invokeShortcut "Window Close"
Sep 19 15:16:57 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Focusing top window...
Sep 19 15:16:57 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: cursor: x:1754 y:1754 screen:HDMI-A-1
Sep 19 15:16:57 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: active screen: HDMI-A-1 current: HDMI-A-1
Sep 19 15:16:57 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Top: Untitled — Kate|kate|org.kde.kate|10|HDMI-A-1
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Konsole Title: — Konsole Id: {d13db6db-6a6a-4d4a-bcd4-66fac312a991}
Sep 19 15:16:57 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Konsole Title: — Konsole Id: {d13db6db-6a6a-4d4a-bcd4-66fac312a991}
Sep 19 15:16:57 Pallas systemd[10218]: app-org.kde.kate@247a97ef046842688863ee1bd94cf2f9.service: Consumed 1.162s CPU time, 109M memory peak.
Sep 19 15:17:45 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 WHEEL UP
Sep 19 15:17:45 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_ACTION: kwin,Window Maximize
Sep 19 15:17:45 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Trying to activate last window...
Sep 19 15:17:45 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 RUNNING_SHORTCUT: sh '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/run_kwin_script.sh' 'focusTopWindow' '/home/pallaswept/.local/share/plasma/plasmoids/luisbocanegra.panelspacer.extended/contents/ui/tools/focusTopWindow.js' true;gdbus call --session --dest org.kde.kglobalaccel --object-path /component/kwin --method org.kde.kglobalaccel.Component.invokeShortcut "Window Maximize"
Sep 19 15:17:45 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Focusing top window...
Sep 19 15:17:45 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: cursor: x:1919 y:1919 screen:HDMI-A-1
Sep 19 15:17:45 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: active screen: HDMI-A-1 current: HDMI-A-1
Sep 19 15:17:45 Pallas kwin_wayland[10317]: js: luisbocanegra.panelspacer.extended: Top: — Konsole|konsole|org.kde.konsole|9|HDMI-A-1

Armed with the knowledge of how to log this, I was able to come up with a more 'vanilla' reproduction process which doesn't rely on scrcpy and all that:
Minimize all windows
Press 'super' to open the KDE launcher
Type 'vkcube' and hit enter

Sep 19 15:49:00 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name:  Title:  Id:
Sep 19 15:49:00 Pallas systemd[10218]: Started vkcube.
Sep 19 15:49:00 Pallas vkcube[105573]: Selected GPU 0: NVIDIA GeForce RTX 3090, type: DiscreteGpu
Sep 19 15:49:00 Pallas kwin_wayland[10317]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11
Sep 19 15:49:07 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name:  Title:  Id:

Or here, with journalctl running in konsole in the background:

Sep 19 15:48:11 Pallas systemd[10218]: Started vkcube.
Sep 19 15:48:12 Pallas vkcube[105238]: Selected GPU 0: NVIDIA GeForce RTX 3090, type: DiscreteGpu
Sep 19 15:48:12 Pallas kwin_wayland[10317]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11
Sep 19 15:48:12 Pallas plasmashell[10569]: qml: luisbocanegra.panelspacer.extended S:0 ID:303 Active task: Name: Konsole Title: — Konsole Id: {d13db6db-6a6a-4d4a-bcd4-66fac312a991}

....and as soon as I type that and try to expand upon it.... Now I can't reproduce that any more (still can repro reliably with scrcpy). Gah! computers! 😆

luisbocanegra added a commit that referenced this issue Sep 19, 2024
@luisbocanegra
Copy link
Owner

Hi thanks for the detailed report, and since I forgot in the last response sorry for the data loss this bug has caused.

I think I may have figured what the problem is, apparently TaskManager.TasksModel is not detecting the launched window vkcube in this case through the onActiveTaskChanged signal, either because of a bug or because I am missing some option when making use of the TasksModel here

just as a quick experiment I uncommented the onCountChanged signal and with that one the vkcube window seems to be detected by the TaskManager and later activated by the function to activate the previously active task

function activateLastWindow() {

Which is used right before the code that runs the actual action:

https://github.com/luisbocanegra/plasma-panel-spacer-extended/blob/dbe40b1ec791e402ccfdd997667d81ddd62f95bf/package/contents/ui/main.qml#L320C1-L323C14

Can you try installing the branch https://github.com/luisbocanegra/plasma-panel-spacer-extended/tree/fix-active-window to see if it works?

@pallaswept
Copy link
Author

Thanks mate, I'm glad you were able to make some sense of it!

I'm afraid I was unable to build it. I did change the dependency from kdeplasma-addons to kdeplasma6-addons, that got the deps installed (I thought?) but still, when I ran install.sh, the find_package(Plasma REQUIRED) on line 24 of the cmake file generated an error.

I'm guessing this is a simple plasma 5 - 6 thing... I hope :)

@luisbocanegra
Copy link
Owner

No problem, inside the project folder run this command

kpackagetool6 -t Plasma/Applet -u package

The install script is kind of an overkill for qml-only widgets, I will replace that with the above command some day.

@pallaswept
Copy link
Author

Yep that's sorted it! Nice work mate! Thanks heaps 💚

@pallaswept
Copy link
Author

sorry for the data loss this bug has caused

Sorry mate I just saw this. Don't worry, I didn't lose anything too important and it was pilot error anyway. I knew I had this bug and I rode with it anyway. It was a conscious decision that the productivity I gain from this addon is greater than the potential lost productivity if it closed something I wanted to keep. I hope that gives you some impression of just how much I appreciate your work with these addons. I image that for most people, things like these are 'nice-to-have' but for disabled people they become 'hey that's a really big deal'. So, thank you!!

@luisbocanegra
Copy link
Owner

Yep that's sorted it! Nice work mate! Thanks heaps 💚

Yay! I'll merge it and make a new release ASAP.

Don't worry, I didn't lose anything too important and it was pilot error anyway.

Good to know it wasn’t too important.

Thanks for the kind words, warms my heart knowing the project has helped someone this much!

luisbocanegra added a commit that referenced this issue Sep 19, 2024
Some newly opened windows don't seem to be registered by TaskManager's onActiveChanged
But they seem to be correctly detected by onCountChanged when we update the last active one

closes: #41
luisbocanegra added a commit that referenced this issue Sep 19, 2024
Some newly opened windows don't seem to be registered by TaskManager's onActiveChanged
But they seem to be correctly detected by onCountChanged when we update the last active one

closes: #41
@luisbocanegra luisbocanegra linked a pull request Sep 19, 2024 that will close this issue
@luisbocanegra
Copy link
Owner

I think the fix might be causing plasma to crash on startup.

When developing plasmoids, I need to restart plasmashell a lot, since this patch, sometimes after a plasma restart it crashes, sometimes it enters a crash loop. At first I thought the crash was caused by my changes to panel-colorizer but looking at the stack trace it mentions libtaskmanager.

I am not sure what causes the crash as it seems random but since reverting that patch yesterday it didn't happen again, and after applying the patch some hours ago I had the same crash again.

If I have to make a guess it could be because it's updating the windows info too fast.

sep 21 17:35:20 archlinux systemd-coredump[2046313]: [🡕] Process 2045932 (plasmashell) of user 1000 dumped core.
                                                     
                                                     Stack trace of thread 2045932:
                                                     #0  0x00007f75732a53f4 n/a (libc.so.6 + 0x963f4)
                                                     #1  0x00007f757324c120 raise (libc.so.6 + 0x3d120)
                                                     #2  0x00007f75757e42a1 _ZN6KCrash19defaultCrashHandlerEi (libKF6Crash.so.6 + 0x62a1)
                                                     #3  0x00007f757324c1d0 n/a (libc.so.6 + 0x3d1d0)
                                                     #4  0x00007f7572f8a656 _ZNK21QSortFilterProxyModel8rowCountERK11QModelIndex (libQt6Core.so.6 + 0x38a656)
                                                     #5  0x00007f7569aab705 _ZNK11TaskManager10TasksModel4dataERK11QModelIndexi (libtaskmanager.so.6 + 0x56705)
                                                     #6  0x00007f7572f5c925 n/a (libQt6Core.so.6 + 0x35c925)
                                                     #7  0x00007f7572f5d69a _ZN18QAbstractItemModel11qt_metacallEN11QMetaObject4CallEiPPv (libQt6Core.so.6 + 0x35d69a)
                                                     #8  0x00007f7572f6e70e _ZN19QAbstractProxyModel11qt_metacallEN11QMetaObject4CallEiPPv (libQt6Core.so.6 + 0x36e70e)
                                                     #9  0x00007f7572f9329e _ZN21QSortFilterProxyModel11qt_metacallEN11QMetaObject4CallEiPPv (libQt6Core.so.6 + 0x39329e)
                                                     #10 0x00007f7569a8e4ee _ZN11TaskManager10TasksModel11qt_metacallEN11QMetaObject4CallEiPPv (libtaskmanager.so.6 + 0x394ee)
                                                     #11 0x00007f75740f0a8b n/a (libQt6Qml.so.6 + 0x2f0a8b)
                                                     #12 0x00007f7573fcd15e n/a (libQt6Qml.so.6 + 0x1cd15e)
                                                     #13 0x00007f7573fcfe29 _ZNK3QV413QObjectMethod12callInternalEPKNS_5ValueES3_i (libQt6Qml.so.6 + 0x1cfe29)
                                                     #14 0x00007f75740195fa n/a (libQt6Qml.so.6 + 0x2195fa)
                                                     #15 0x00007f757401d353 n/a (libQt6Qml.so.6 + 0x21d353)
                                                     #16 0x00007f7573f84caf n/a (libQt6Qml.so.6 + 0x184caf)
                                                     #17 0x00007f7573fe8857 _ZN3QV47Runtime28CallQmlContextPropertyLookup4callEPNS_15ExecutionEngineEjPNS_5ValueEi (libQt6Qml.so.6 + 0x1e8857)
                                                     #18 0x00007f757401881d n/a (libQt6Qml.so.6 + 0x21881d)
                                                     #19 0x00007f757401d353 n/a (libQt6Qml.so.6 + 0x21d353)
                                                     #20 0x00007f7573f84ab6 n/a (libQt6Qml.so.6 + 0x184ab6)
                                                     #21 0x00007f7573f87c51 _ZN3QV48Function4callEP7QObjectPPvPK9QMetaTypeiPNS_16ExecutionContextE (libQt6Qml.so.6 + 0x187c51)
                                                     #22 0x00007f75740bafc4 _ZN24QQmlJavaScriptExpression8evaluateEPPvPK9QMetaTypei (libQt6Qml.so.6 + 0x2bafc4)
                                                     #23 0x00007f75740651a3 _ZN25QQmlBoundSignalExpression8evaluateEPPv (libQt6Qml.so.6 + 0x2651a3)
                                                     #24 0x00007f757406a0bf n/a (libQt6Qml.so.6 + 0x26a0bf)
                                                     #25 0x00007f75740dba4c _ZN12QQmlNotifier10emitNotifyEP20QQmlNotifierEndpointPPv (libQt6Qml.so.6 + 0x2dba4c)
                                                     #26 0x00007f7572da30ea n/a (libQt6Core.so.6 + 0x1a30ea)
                                                     #27 0x00007f7569ab17f6 n/a (libtaskmanager.so.6 + 0x5c7f6)
                                                     #28 0x00007f7572da3397 n/a (libQt6Core.so.6 + 0x1a3397)
                                                     #29 0x00007f7572f788c8 _ZN26QIdentityProxyModelPrivate20_q_sourceDataChangedERK11QModelIndexS2_RK5QListIiE (libQt6Core.so.6 + 0x3788c8)
                                                     #30 0x00007f7572da35ea n/a (libQt6Core.so.6 + 0x1a35ea)
                                                     #31 0x00007f7572f594f1 _ZN18QAbstractItemModel11dataChangedERK11QModelIndexS2_RK5QListIiE (libQt6Core.so.6 + 0x3594f1)
                                                     #32 0x00007f7569ac9fc7 n/a (libtaskmanager.so.6 + 0x74fc7)
                                                     #33 0x00007f7572da3397 n/a (libQt6Core.so.6 + 0x1a3397)
                                                     #34 0x00007f7569abfabc n/a (libtaskmanager.so.6 + 0x6aabc)
                                                     #35 0x00007f757433d596 n/a (libffi.so.8 + 0x7596)
                                                     #36 0x00007f757433a00e n/a (libffi.so.8 + 0x400e)
                                                     #37 0x00007f757433cbd3 ffi_call (libffi.so.8 + 0x6bd3)
                                                     #38 0x00007f757585b8b0 n/a (libwayland-client.so.0 + 0x48b0)
                                                     #39 0x00007f757585c139 n/a (libwayland-client.so.0 + 0x5139)
                                                     #40 0x00007f757585c553 wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x5553)
                                                     #41 0x00007f7573d7d456 n/a (libQt6WaylandClient.so.6 + 0x69456)
                                                     #42 0x00007f7572da35ea n/a (libQt6Core.so.6 + 0x1a35ea)
                                                     #43 0x00007f7572fa8305 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a8305)
                                                     #44 0x00007f7572d4ff66 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14ff66)
                                                     #45 0x00007f7572d4a11d _ZN16QCoreApplication4execEv (libQt6Core.so.6 + 0x14a11d)
                                                     #46 0x00005ea4fc688d86 n/a (plasmashell + 0x26d86)
                                                     #47 0x00007f7573234e08 n/a (libc.so.6 + 0x25e08)
                                                     #48 0x00007f7573234ecc __libc_start_main (libc.so.6 + 0x25ecc)
                                                     #49 0x00005ea4fc689275 n/a (plasmashell + 0x27275)
                                                     
                                                     Stack trace of thread 2046090:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046035:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7571b14e0d n/a (libglib-2.0.so.0 + 0xbfe0d)
                                                     #2  0x00007f7571ab1795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                                     #3  0x00007f7572fa82bd _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a82bd)
                                                     #4  0x00007f7572d4ff66 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14ff66)
                                                     #5  0x00007f7572e3d7a0 _ZN7QThread3runEv (libQt6Core.so.6 + 0x23d7a0)
                                                     #6  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #7  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #8  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046077:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046070:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046229:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7572ed1c60 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1c60)
                                                     #3  0x00007f751ffd2c46 n/a (libQt6LabsFolderListModel.so.6 + 0xbc46)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046006:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046092:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046074:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046088:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7572ed1c60 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1c60)
                                                     #3  0x00007f7574819f3a n/a (libQt6Quick.so.6 + 0x419f3a)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046102:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046079:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046000:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046071:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046100:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046099:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046108:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046101:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046226:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7548ced9b7 n/a (libpulse.so.0 + 0x339b7)
                                                     #2  0x00007f7548cd745c pa_mainloop_poll (libpulse.so.0 + 0x1d45c)
                                                     #3  0x00007f7548ce161c pa_mainloop_iterate (libpulse.so.0 + 0x2761c)
                                                     #4  0x00007f7548ce16d1 pa_mainloop_run (libpulse.so.0 + 0x276d1)
                                                     #5  0x00007f7548cf1bf2 n/a (libpulse.so.0 + 0x37bf2)
                                                     #6  0x00007f7548c8f2b7 n/a (libpulsecommon-17.0.so + 0x5c2b7)
                                                     #7  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #8  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2045999:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2045965:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7571b14e0d n/a (libglib-2.0.so.0 + 0xbfe0d)
                                                     #2  0x00007f7571ab1795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                                     #3  0x00007f7572fa82bd _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a82bd)
                                                     #4  0x00007f7572d4ff66 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14ff66)
                                                     #5  0x00007f7572e3d650 _ZN7QThread4execEv (libQt6Core.so.6 + 0x23d650)
                                                     #6  0x00007f7574b34f0e n/a (libQt6DBus.so.6 + 0x2df0e)
                                                     #7  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #8  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #9  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046304:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7572ed1c60 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1c60)
                                                     #3  0x00007f751ffd2c46 n/a (libQt6LabsFolderListModel.so.6 + 0xbc46)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046107:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046106:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046080:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046091:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046005:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046098:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7572ed1c60 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1c60)
                                                     #3  0x00007f7574819f3a n/a (libQt6Quick.so.6 + 0x419f3a)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046105:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046089:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046103:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2045987:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7573d74257 n/a (libQt6WaylandClient.so.6 + 0x60257)
                                                     #2  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #3  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #4  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046214:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7571b14e0d n/a (libglib-2.0.so.0 + 0xbfe0d)
                                                     #2  0x00007f7571ab1795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                                     #3  0x00007f7572fa82bd _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a82bd)
                                                     #4  0x00007f7572d4ff66 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14ff66)
                                                     #5  0x00007f7572e3d650 _ZN7QThread4execEv (libQt6Core.so.6 + 0x23d650)
                                                     #6  0x00007f75367a7750 _ZN15KCupsConnection3runEv (libkcupslib.so.6.1.5 + 0x2d750)
                                                     #7  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #8  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #9  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046076:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2045986:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7572ed1c60 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1c60)
                                                     #3  0x00007f7573d741ef n/a (libQt6WaylandClient.so.6 + 0x601ef)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046081:
                                                     #0  0x00007f757331a63d __poll (libc.so.6 + 0x10b63d)
                                                     #1  0x00007f7571b14e0d n/a (libglib-2.0.so.0 + 0xbfe0d)
                                                     #2  0x00007f7571ab1795 g_main_context_iteration (libglib-2.0.so.0 + 0x5c795)
                                                     #3  0x00007f7572fa82bd _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a82bd)
                                                     #4  0x00007f7572d4ff66 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14ff66)
                                                     #5  0x00007f7572e3d650 _ZN7QThread4execEv (libQt6Core.so.6 + 0x23d650)
                                                     #6  0x00007f7574763bd8 n/a (libQt6Quick.so.6 + 0x363bd8)
                                                     #7  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #8  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #9  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046007:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046008:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a2479 pthread_cond_wait (libc.so.6 + 0x93479)
                                                     #2  0x00007f7552ea5cae n/a (libgallium-24.2.2-arch1.1.so + 0xa5cae)
                                                     #3  0x00007f7552e826cc n/a (libgallium-24.2.2-arch1.1.so + 0x826cc)
                                                     #4  0x00007f7552ea5bdd n/a (libgallium-24.2.2-arch1.1.so + 0xa5bdd)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046075:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     
                                                     Stack trace of thread 2046104:
                                                     #0  0x00007f757329fa19 n/a (libc.so.6 + 0x90a19)
                                                     #1  0x00007f75732a27e2 pthread_cond_timedwait (libc.so.6 + 0x937e2)
                                                     #2  0x00007f7572ed1bf8 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2d1bf8)
                                                     #3  0x00007f7572ecb852 n/a (libQt6Core.so.6 + 0x2cb852)
                                                     #4  0x00007f7572ecd237 n/a (libQt6Core.so.6 + 0x2cd237)
                                                     #5  0x00007f75732a339d n/a (libc.so.6 + 0x9439d)
                                                     #6  0x00007f757332849c n/a (libc.so.6 + 0x11949c)
                                                     ELF object binary architecture: AMD x86-64

@luisbocanegra luisbocanegra reopened this Sep 22, 2024
@pallaswept
Copy link
Author

Oof sorry mate!

For what it's wortth, I haven't seen plasma crash yet... Seems like it is quite sensitive. I hope it won't be too annoying and hard to reproduce :( If there's anything I can do to help, please let me know.

@luisbocanegra
Copy link
Owner

luisbocanegra commented Sep 22, 2024

Can you try installing the branch fix-active-window to see if it still works?

At least here with vkcube I always see it as the last window in the debug log, and doing actions on it works. But I can't reproduce the actual bug even in the current released version so is not entirely clear if this change is really doing anything.

@pallaswept
Copy link
Author

Can you try installing the branch fix-active-window to see if it still works?

Yep that does the trick for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants