Open Bug 1871212 Opened 7 months ago Updated 5 months ago

[Hyprland] Disabling Middle Click Paste On Wayland Causes Frequent Crashes

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 123
defect

Tracking

()

Tracking Status
firefox122 --- affected
firefox123 --- affected

People

(Reporter: johnhaoallwood, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

I am on NixOS/Hyprland (wayland) and I use the command wl-paste -p --watch wl-copy -p '' to disable middle click paste. This causes issues in Mozilla Firefox 123.0a1 (as well as a nightly version of 122 I didn't update from).

Actual results:

The command "firefox-nightly" to crash upon typing characters on the search bar. Furthermore, upon setting /org/gnome/desktop/interface/gtk-theme to a non-default theme, the command shows a blank window for less than a second, then crashes immediately.

These crashes result in the error message "lost connection to Wayland compositor".

Expected results:

Firefox should not have crashed.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Upon further testing, the "crash upon startup" requires not only a GTK theme setting and the wl-paste command, but "browser.theme.toolbar-theme" to be set to 1 (in about:config); and "extensions.activeThemeID" to be set to "default-theme@mozilla.org" (the system default theme) to happen.

I can also provide my minimal configuration for NixOS/home-manager on flakes for reproducing.

Priority: -- → P3
See Also: → 1791417
Summary: Disabling Middle Click Paste On Wayland Causes Frequent Crashes → [Hyprland] Disabling Middle Click Paste On Wayland Causes Frequent Crashes

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file vainfo.txt
Attached file gfxlog.txt

Unfortunately, while the bug where changing themes crashes the program is fixed, the bug where typing (and backspacing) in the address bar would crash the program after a short while was not. I am unable to get a crash report for an odd reason (not under about:crashes nor .mozilla/firefox/Crash Reports).

It may be a dupe of Bug 1791417 - can you try latest nightly under Wayland?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.

Flags: needinfo?(johnhaoallwood)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #11)

It may be a dupe of Bug 1791417 - can you try latest nightly under Wayland?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.

I reproduced this problem with the latest nightly under Wayland. I updated Firefox a day ago. As you can see, my build id is 20240119093321 for the crash. I'd say the two problems are similar but I'm not sure how KDE implements disabling of the primary clipboard. Perhaps the fix only fixed it for KDE.

Flags: needinfo?(johnhaoallwood)

Okay, Thanks. Please try to reproduce with latest nightly and when it crashes please submit crash report at Mozilla and attach crash ID here:
https://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products#Using_Mozilla_crash_reporter
Thanks!

Flags: needinfo?(johnhaoallwood)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #13)

Okay, Thanks. Please try to reproduce with latest nightly and when it crashes please submit crash report at Mozilla and attach crash ID here:
https://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products#Using_Mozilla_crash_reporter
Thanks!

(In reply to johnhaoallwood from comment #10)

Unfortunately, while the bug where changing themes crashes the program is fixed, the bug where typing (and backspacing) in the address bar would crash the program after a short while was not. I am unable to get a crash report for an odd reason (not under about:crashes nor .mozilla/firefox/Crash Reports).

As I said in this previous message, I am unfortunately unable to get a crash report for this build of Firefox Nightly. It is likely that the previous crash report I have linked for a previous build is still relevant, as the problems are identical. I will update to the latest nightly often and reproduce this issue in hopes that a crash report will show up.

Flags: needinfo?(johnhaoallwood)

I am on NixOS/Hyprland (wayland) and I use the command wl-paste -p --watch wl-copy -p '' to disable middle click paste. This causes issues in Mozilla Firefox 123.0a1 (as well as a nightly version of 122 I didn't update from).

As an aside, a better way to do this is to have the compositor only offer the primary selection protocol if the user wants the feature. Hyprland could offer something similar to what we do in sway: https://github.com/swaywm/sway/blob/master/sway/server.c#L422

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: