Closed Bug 1651347 Opened 4 years ago Closed 2 years ago

[Wayland] Crash on Drag and Drop

Categories

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

78 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: developer, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

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

Steps to reproduce:

Opened WordPress page editing or Google Drive.
Dragged an image from nautilus to FF
Released the mouse button

Actual results:

FF immediately crashed
Upon restarting it, no crash reporter appeared, nothing in about:crashes

Expected results:

No crash, image uploaded to Drive or WP or whatever

Additional context:
I'm running Debian testing with Gnome 3.36.3 on Wayland on a Thinkpad T480
Trying the same image for the second time usually fixes the issue (might be random though, not enough data)
Happens randomly, cca 1/2 of the times
Happy to provide more info or try something out to diagnose this, if instructed.

Thanks!

Note: By running on Wayland, I mean with MOZ_ENABLE_WAYLAND=1 - I need fractional scaling...

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Crash Reporting
Product: Firefox → Toolkit

The severity field is not set for this bug.
:gsvelto, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gsvelto)

Moving this to the right component.

Component: Crash Reporting → Widget: Gtk
Flags: needinfo?(gsvelto)
Product: Toolkit → Core

Can you run Firefox on terminal with WAYLAND_DEBUG=1 and see if there's anything interesting? Also can you try to run Firefox under gdb to catch the crash and attach backtrace here?
Thanks.

Blocks: wayland
Flags: needinfo?(developer)
Priority: -- → P3
Summary: Crash on Drag and Drop → [Wayland] Crash on Drag and Drop

Hi,
Attaching results of export WAYLAND_DEBUG=1; firefox &> ff_debug.log

Additional info: It seems to me that this only happens when I drag multiple files at once.

Tried to get a gdb backtrace but cannot replicate the issue on the bookmarks/release branch :/

Flags: needinfo?(developer)

Gdk-Message: 19:33:24.664: Error reading events from display: Invalid argument

Yes, it isn't a crash as the relevant code at Gtk looks like:

      if (wl_display_read_events (display_wayland->wl_display) < 0)
        {
          g_message ("Error reading events from display: %s", g_strerror (errno));
          _exit (1);
        }

so it's clean exit. Jonas, what does it actually means and why Gtk quits the applications so suddenly?
Thanks.

Flags: needinfo?(jadahl)

It means you received an error and the connection was terminated. Seems we don't dispatch enough so we don't always see the error, but that's most likely the cause.

Looking at the debug log, I see

[3592040,743]  -> wl_data_offer@4278190086.set_actions(7, 1)
[3592042,164]  -> wl_data_offer@4278190086.set_actions(7, 1)
[3592042,249]  -> wl_data_offer@4278190086.finish()
[3592042,265]  -> wl_data_offer@4278190086.destroy()

so my suspicion is the error message we're not seeing is WL_DATA_OFFER_ERROR_INVALID_FINISH as there was no wl_data_offer.accept request sent.

Flags: needinfo?(jadahl)

Ha, just experienced the same issue in Thunderbird 68.12.0 as well!

Can you please re-test with latest nightly?
Thanks.

Flags: needinfo?(developer)

Hi,
tried it just now on 89.0a1 (2021-04-08) (64-bit), still the same :/

Attaching export WAYLAND_DEBUG=1; ./firefox &> ff_debug.log again...

Flags: needinfo?(developer)
Attached file ff_debug.log (deleted) —

89.0a1 (2021-04-08) (64-bit)

Priority: P3 → P1
No longer blocks: wayland-nightly
Priority: P1 → P2

Can you try latest nightly with async clipboard enabled (https://bugzilla.mozilla.org/show_bug.cgi?id=1725149#c5)?
Thanks.

Flags: needinfo?(developer)

When I went to investigate this issue after experiencing it in FF91 and before, I found it was not reproducible in the 8-12 nightly.

Actualy, my steps to reproduce are different. A drag from nautilus to FF does not crash in FF91 for me. Only drags from the gtk file chooser dialogue opened by FF into FF hang FF. This is fixed in nightly.

I tried enabling the async clipboard, but that caused firefox to crash on dnd for me.

Hi, I just tried it with 95.0a1 (2021-10-09) (64-bit) with "widget.wayland.async-clipboard.enabled" set to true (it was that way by default...) and the issues is still happening :/

Let me know if there's any way to help move this further, thanks.

Flags: needinfo?(developer)

Marek, can you please run latest nightly with

WAYLAND_DEBUG=1 MOZ_LOG="WidgetDrag:5" env variables and attach the log here?

Thanks.

Flags: needinfo?(developer)

Hi,
Ok, I ran

$ export WAYLAND_DEBUG=1
$ export MOZ_LOG="WidgetDrag:5"
$ ./firefox &> ../ff-log.txt

and I am adding the output :)

Thanks

Flags: needinfo?(developer)
Attached file ff-log-2021-10-10.txt (deleted) —

I see the log produced a crash report, can you submit it (at about:crashes page) and post crash ID here?
Thanks.

Flags: needinfo?(developer)

Hi,
I didn't see the crash in about:crashes, so I re-ran it, submitted it and it is bp-a09f63fe-e7cd-47f8-951d-c37640211011. I am addind the new log as well, in case there are some differences.

Thanks

Flags: needinfo?(developer)
Attached file ff-log-2021-10-11.txt (deleted) —

Ok, sorry, so the file ff-log-2021-10-11.txt is actually associated with crash report bp-5f3977c1-a46b-45dd-b57c-3f9910211011 - Somehow the log didn't get produced for the previous crash report :/

Thanks

So this is Gnome 3.36.3, correct? Can you try latest Gnome (40) in VM & latest nightly for instance? I'm unable to reproduce on mutter-40.5.
Thanks.

Flags: needinfo?(developer)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:stransky, could you please find another way to get the information or close the bug as INCOMPLETE if it is not actionable?

For more information, please visit auto_nag documentation.

Flags: needinfo?(developer) → needinfo?(stransky)

Hi,
it's true I haven't responded, I had a hard time replicating the issue. It seems that with some release of Gnome (don't know which however), the crashes are much less common, although they still happen occasionally. I'm now on Gnome 42 (Debian) and they definitely happened since v40 :(. What additional information do you need?

Thanks

Okay, let's reopen it if we have clear reproducer.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(stransky)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: