Can't use any menu after some manipulations
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: go.danilll, Unassigned)
Details
Attachments
(6 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Steps to reproduce:
- Open any site with audio output,
- Open SongRec (version tested: 0.3.0) and wait it to recognize track,
- Click "Search on YouTube" in SongRec, which will open youtube.com in Firefox,
- Not sure if needed, but open SongRec window, wait for new recognized track and open it again.
Actual results:
After reproduced steps context menu can be shown successfully only once. Any further context menu request will only show it for some msec and then it will be closed. In addition, extensions menu and settings menu become broken too.
This bug happens on older Firefox versions too, but only now I found steps to reproduce it.
Profiled data: https://share.firefox.dev/3v6vlXs
Expected results:
Menus should be shown by request.
Comment 2•4 years ago
|
||
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.
Comment 5•4 years ago
|
||
Can you try latest nightly?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_Mozilla_binaries
Thanks.
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
Can you try latest nightly?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_Mozilla_binaries
Thanks.
Tried 101.0a1 with Build ID 20220427094429. The bug still happens.
Comment 7•4 years ago
|
||
Can you please run Firefox with MOZ_LOG="WidgetPopup:5" env variable, reproduce the issue and attach the log here?
Thanks.
(In reply to Martin Stránský [:stransky] (ni? me) from comment #7)
Can you please run Firefox with MOZ_LOG="WidgetPopup:5" env variable, reproduce the issue and attach the log here?
Thanks.
Sure. Ran the same 101.0a1, opened RMB menu two times and application menu once before Firefox opened SongRec's link.
Comment 9•4 years ago
|
||
Please try to flip widget.wayland.use-move-to-rect key to false in about:config, restart browser and try again.
Thanks.
Comment 10•4 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #9)
Please try to flip widget.wayland.use-move-to-rect key to false in about:config, restart browser and try again.
Thanks.
Err, sorry, ignore that, this is X11 one.
Comment 11•4 years ago
|
||
We failed to grab pointer with GDK_GRAB_INVALID_TIME error - that indicates wrong window manager interaction. Which desktop is that? Can you try different desktop, like Gnome?
| Reporter | ||
Comment 12•4 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #11)
We failed to grab pointer with GDK_GRAB_INVALID_TIME error - that indicates wrong window manager interaction. Which desktop is that? Can you try different desktop, like Gnome?
That was Xfce 4.16 with xfwm. Also tried xfce+kwin in past, which didn't solve this problem. Now tested with Gnome 42, the bug is still reproducible.
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Hello,
I am the SongRec maintainer.
FYI, this reproduces since some time ago on Ubuntu 20.04 LTS with Xorg/Gnome-Shell.
The bug is triggered by this "gtk_show_uri" call: https://github.com/marin-m/SongRec/blob/9d2861d/src/gui/main_window.rs#L196
I know no other app than Firefox that happens to have menu issues after it is triggered, but am not using other Gecko apps currently.
Regards,
| Reporter | ||
Comment 14•4 years ago
|
||
The problem was in timestamp of gtk::show_uri(). In details SongRec was putting Epoch time in that function and resolve is to use gtk::get_current_event_time(), which returns system uptime in msec. After some testing I found out that if timestamp is larger than one returned by gtk::get_current_event_time(), then this bug happens.
The main problem here is how Firefox handles the wrong number, becoming unusable. Something wrong with handling requests "from the future", which can happen with other programs too, not only with SongReq.
| Reporter | ||
Comment 15•4 years ago
|
||
In addition I tried to set timestamp to gtk::get_current_event_time() + 2 minutes. So bug become reproducible only for this 2 minutes, and after menus start to appear again.
Comment 16•4 years ago
|
||
That's interesting, Thanks. I'm happy to review any patch for it!
| Reporter | ||
Comment 17•4 years ago
|
||
Now it seems that this is not a Firefox bug, but the gtk logic. Not sure which is better: GetLastUserInputTime() rework or this little patch. It may also be worth writing warning about an incorrect value to the log.
Tested on a Firefox Nightly 103.0a1 built with this instructions https://firefox-source-docs.mozilla.org/setup/linux_build.html#building-firefox-on-linux
Description
•