swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.21k stars 1.08k forks source link

Firefox crashes if PiP rule is both sticky and floating #7546

Open fishman opened 1 year ago

fishman commented 1 year ago

for_window [app_id="firefox" title="Pushbullet"] floating enable for_window [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable for_window [app_id="firefox" title="Pushbullet – Mozilla Firefox"] floating enable for_window [app_id="firefox" title="About Mozilla Firefox"] floating enable for_window [app_id="firefox" title="Picture-in-Picture"] floating enable; sticky enable for_window [app_id="firefox"] layout tabbed

  1. Go to a video streaming site
  2. Press play on any video
  3. click the PiP icon
  4. watch firefox crash
joanbm commented 1 year ago

Hmmm, works fine for me (on Arch Linux current + wlroots 0.16.2 + Sway 1.8.1 + Firefox 112, with AMD/Radeon APU) and I also can't reproduce it on the Fedora 38 Sway Spin LiveCD, tested with sites like YouTube or Twitch.

Any more details (distribution, Firefox version and whether you use Flatpak or similar, GPU, etc.)?
Also check if it happens when Firefox is launched in Troubleshoot Mode ("Safe mode").

fishman commented 1 year ago

Maybe that isn't the issue after all, I'm running the latest firefox version in Archlinux. It seems to work fine until I plugin the external monitor and move the workspace to the external monitor.

joanbm commented 1 year ago

Are you using scaling (HiDPI) by any chance? If so, does it reproduce if you disable it (set scale to 1 on all monitors)?

(I haven't noticed any error with the latest versions of Firefox, but there were a couple with previous versions and there's also an ongoing problem with Chromium, so it may be related in some way...)

fishman commented 1 year ago

It's possible that that's the case. My laptop is scaled at 1.3 and the external monitor is scaled at 1. I'll see if i can test that somehow.

fishman commented 1 year ago

@joanbm I just tried it scale 1 on both screens and it doesn't solve the issue. It only occurs when I have the external monitor connected though and isn't related to either floating or sticky

joanbm commented 1 year ago

Hmmmm, can you try to attach more information on your system (see https://github.com/swaywm/sway/blob/01b0c11394b88fea2ec8ac691e30504f1e0800f5/.github/ISSUE_TEMPLATE/bug_report.md)?

I personally use Firefox, PiP and connect and disconnect various monitors all day long on both Intel iGPU and AMD APUs without issues, so there's likely something about your particular system/hardware that causes the issue.

fishman commented 1 year ago

I use fcitx5 with my setup.

I think it doesn't just happen. I think it happens when I move the workspace from one monitor to the other. After trying it out some more I think it crashes even without PiP sometimes.

Intel(R) Core(TM) i7-8650U CPU with intel kabylake GPU always on the latest sway on archlinux.

UdaraWanasinghe commented 6 months ago

Chromium is also crashing when floating is enabled in the PiP window

for_window [title="Picture in picture"] floating enable
joanbm commented 6 months ago

@UdaraWanasinghe

I did some quick tests and I can't reproduce the issue, on Arch Linux + Sway 1.9-rc1 and both an Intel iGPU, AMD APU and NVIDIA card (w/Nouveau), neither on a Fedora 39 VM with Sway 1.8.1, the Chromium PiP window seems to come up fine as a floating window and I can move it between monitors, etc. without getting a crash.

UdaraWanasinghe commented 6 months ago

@joanbm CPU: Intel i5-8250U (8) @ 3.400GHz GPU: Intel UHD Graphics 620 OS: Arch Linux x86_64 Kernel: 6.6.13-1-lts Sway: sway (1:1.8.1-5)

Crash triggered when opening the PiP window

I'm not using HiDPI

Chromium crash reports didn't log it. Browser froze upon PiP window opening and then exited.

Updated the system yesterday and it seems PiP is working fine now. I usually run updates for every two weeks.