Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Firefox crash with fcitx5 after closing one of multiple firefox windows

Open segalll opened this issue 1 year ago • 14 comments

Hyprland Version

System/Version info
Hyprland, built from branch  at commit 1d40af64d352bd5a87c7d53a52707fc5cfc6940e  (text-input-v3: move to new impl).
Date: Thu Apr 25 18:27:44 2024
Tag: v0.39.1-83-g1d40af64, commits: 4543

flags: (if any)


System Information:
System name: Linux
Node name: pekin
Release: 6.8.9-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000


GPU information:
0a:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A750] [8086:56a1] (rev 08) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

First bad commit: https://github.com/hyprwm/Hyprland/commit/1d40af64d352bd5a87c7d53a52707fc5cfc6940e

Refocusing a firefox window after closing another causes all firefox windows to crash. Only occurs with fcitx5. Present up to latest commit, https://github.com/hyprwm/Hyprland/commit/40201a760acd7c5ca10f27e7d0fdeb71c20df89f.

How to reproduce

With fcitx5 5.1.9

  1. open firefox in current workspace
  2. go to another workspace
  3. open firefox in new workspace
  4. close firefox in new workspace
  5. go back to old workspace -> crash

Crash reports, logs, images, videos

No response

segalll avatar May 04 '24 07:05 segalll

you mean firefox crashes? It surely doesn't crash to me.

can you attach the logs of firefox with WAYLAND_DEBUG=1?

vaxerski avatar May 04 '24 11:05 vaxerski

yeah firefox crashes. window1_stderr.txt window1_stdout.txt window2_stderr.txt here are the files. window 2 has no stdout.

i should note that this doesn't occur when i open firefox through terminal with the terminal window on the same workspace. i think this is because after firefox is closed, the terminal window becomes focused before i switch back to the other workspace with firefox.

to obtain these logs, i left the terminal windows separate from the firefox windows, so each firefox window was in its own workspace.

segalll avatar May 04 '24 11:05 segalll

Can confirm it happens to me as well. Setting the GTK_IM_MODULE environment variable to fcitx seems to have fixed this issue for me for now (as well as some random fcitx5 crashes I was getting). I don't know if this is the same issue as fcitx/fcitx5#1039, but this is where I got the fix from

krmbd avatar May 04 '24 14:05 krmbd

odd, the logs dont show anything is amiss in the wl communication.

Setting the GTK_IM_MODULE environment variable to fcitx seems to have fixed this issue for me for now (as well as some random fcitx5 crashes I was getting)

right, I set that too and it works just fine. Never tried without that. What would you even set it to?

vaxerski avatar May 04 '24 15:05 vaxerski

Never tried without that. What would you even set it to?

Nothing, I had it unset. For some reason, whenever it is set, I get the following notification on Hyprland startup.

Detect GTK_IM_MODULE being set and Wayland Input method frontend is working. It is recommended to unset GTK_IM_MODULE and use Wayland input method frontend instead. For more details see https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland

Everything seemed to work fine without the environment variable (until now) so I didn't bother setting it

krmbd avatar May 04 '24 16:05 krmbd

hm. Any other app does this?

vaxerski avatar May 04 '24 16:05 vaxerski

Not sure I understand your question. If it's about whether any app other than fcitx5 sends a notification on startup when some environment variable is set, the answer is no. If it's about whether any app other than Firefox crashes, I haven't encountered any. fcitx5 is the only input method I've ever used though, I haven't tried anything else.

krmbd avatar May 04 '24 16:05 krmbd

Afaik GTK_IM_MODULE makes the app talk directly to input method and not via compositor

sungyoonc avatar May 04 '24 21:05 sungyoonc

I was also experiencing this issue, however it seems to have resolved for me when I updated this morning to commit d1ad490. I'm unsure what specific commit resolved it as I updated from one the other day, but it doesn't seem to happen to me anymore, at least.

phinocio avatar May 08 '24 18:05 phinocio

I was also experiencing this issue, however it seems to have resolved for me when I updated this morning to commit d1ad490. I'm unsure what specific commit resolved it as I updated from one the other day, but it doesn't seem to happen to me anymore, at least.

tested just now, still reproducible w/ e4e84064f2d07810e0c150bce1369a0a00503e9a

moetayuko avatar May 09 '24 01:05 moetayuko

Also having this :/

nonetrix avatar May 22 '24 07:05 nonetrix

The behaviour had returned for me after the commit I mentioned above, though I have now gone back to the version in the Arch repos instead of -git (where the issue is still present fwiw).

One workaround I have found is manually dragging the window back into another Firefox window, and then closing it, doing that hasn't caused a crash for me at all.

phinocio avatar May 23 '24 04:05 phinocio

GTK_IM_MODULE fixed it for me but now Hyprland randomly crashes

nonetrix avatar May 23 '24 07:05 nonetrix

if on git, check pinned issues

vaxerski avatar May 23 '24 11:05 vaxerski

This issue seems to have been fixed with one of the rewrites or a Firefox update or something

if on git, check pinned issues

XWayland crashes was pinned at the time I think? I am fairly sure it was unrelated to XWayland

But I don't need GTK_IM_MODULE anymore anyway so it's irrelevant regardless. If anyone has craashes with GTK_IM_MODULE report it I guess but I just wouldn't use it as it's not recommended on Wayland anyway

nonetrix avatar Jun 12 '24 06:06 nonetrix