Closed Bug 1832760 Opened 2 years ago Closed 2 years ago

Wayland protocol error with Linux display scaling: wl_surface@86: error 2: Buffer size (989x379) must be an integer multiple of the buffer_scale (2).

Categories

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

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: jean-louis, Assigned: stransky)

References

(Blocks 1 open bug)

Details

(Whiteboard: [snnot3p])

Crash Data

Attachments

(6 files)

Steps to reproduce:

When running Thunderbird on a (fractional) scaled display, it sometimes crashes with "[GFX1-]: Wayland protocol error: wl_surface@86: error 2: Buffer size (989x379) must be an integer multiple of the buffer_scale (2)."

This seems to mostly/always happen on calendar dialogs.

If you open Thunderbird on wayland but unscaled display, it just works.

This occurs at least on 102.11.0 as on the latest 115 nightly.

Component: Untriaged → OS Integration
OS: Unspecified → Linux
Summary: Wayland protocol error: wl_surface@86: error 2: Buffer size (989x379) must be an integer multiple of the buffer_scale (2). → Wayland protocol error with Linux display scaling: wl_surface@86: error 2: Buffer size (989x379) must be an integer multiple of the buffer_scale (2).
Whiteboard: [snnot3p]

I can reliably reproduce this on my system. Every time I open the message compose window while my laptop is connected to an external monitor set to 200% scale, I get thsi crash. Here's my setup:

Laptop with AMD CPU and embedded graphics, 4k internal display set to 200% scale, 4k external display set to 100% scale. I'm running an up-to-date archlinux using gnome. My thunderbird version is 102.11.2.

The bug disappears as soon as I disconnect the external display.

Firefox had the same issue it seems -> bug 1795851
And it got fixed there :)

Bug 1795851 landed in firefox 109, so it is already included in THunderbird 115.
If the problem exists today in a current version of Firefox, then a new bug report is needed for Firefox.

(In reply to Wayne Mery (:wsmwk) from comment #3)

Bug 1795851 landed in firefox 109, so it is already included in THunderbird 115.
If the problem exists today in a current version of Firefox, then a new bug report is needed for Firefox.

Never had it in firefox at least. But it depends on the window size for it to occur.
In Thunderbird it seems to be caused by the agenda event notification window.
So most likely it just doesn't happen in firefox?

Kindly asking help to stransky to see if there's anything we need to port for Thunderbird

Flags: needinfo?(stransky)

May be a variant of Bug 1832499. Can you attach about:support from Firefox running on the same system?
Also which Wayland compositor / environment do you use?

Flags: needinfo?(stransky) → needinfo?(jean-louis)
Blocks: wayland
Component: OS Integration → Widget: Gtk
Priority: -- → P3
Product: Thunderbird → Core
Version: Thunderbird 115 → unspecified
Attached file about:support

Attached the firefox about:support data.
Running gnome with mutter on Arch (so up-to-date gnome)

Flags: needinfo?(jean-louis)

Do you see that in Firefox too or is that TB only issue?

Can you create a screencast of the issue?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Collect_information_for_a_bug_report
Thanks.

Flags: needinfo?(jean-louis)

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

Do you see that in Firefox too or is that TB only issue?

Can you create a screencast of the issue?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Collect_information_for_a_bug_report
Thanks.

I don't have the issue in FF, but that doesn't mean it doesn't exist in FF.
On TB the issue seems to be triggered by displaying the event notification/reminder window (and it doesn't always happen). Otherwise TB doesn't crash neither (or at least not that I found yet).

A screencast is fairly useless I guess? As it just crashes without showing any UI (or maybe for some milliseconds).

I don't know if there is a better way to debug the root cause? Can I gdb it with some useful breakpoint or so when it crashes?

Flags: needinfo?(jean-louis)
Attached video screencast of the crash

I made a screencast of the issue.

I am on Gnome 44.3 on a multi-monitor setup with 100% and 200% integer scaling (fractional scaling not enabled).

Cool! Can you please run tb on terminal as:

MOZ_LOG="Widget:5 WidgetPopup:5 WidgetWayland:5" thunderbird > log.txt 2>&1

reproduce the issue and attach the log here?
Thanks.

Flags: needinfo?(max.harmathy)
Attached file log.txt
Flags: needinfo?(max.harmathy)

Thanks. Looks like general toolkit bug in window handling. I wonder why we don't see that in Firefox.

Flags: needinfo?(stransky)

That's weird, we're getting wrong window sizes from system directly. It's Gnome 44.3, I'm on 44.2 right now (Fedora 38) but I can't reproduce it.

Flags: needinfo?(stransky)

So no, looks like we don't update GtkCompositorWidget after scale change.

Can you please run as:

WAYLAND_DEBUG=1 MOZ_LOG="Widget:5 WidgetPopup:5 WidgetWayland:5" thunderbird > log.txt 2>&1

reproduce the issue and attach the log here?
Thanks.

Flags: needinfo?(max.harmathy)
Attached file log.txt

Here you go

Flags: needinfo?(max.harmathy)

Thanks. Looks like delayed EGLWindow size set call. Let's wait when more logging is available from Bug 1844543.

Flags: needinfo?(stransky)

Is there thunderbird based on latest nightly?
I'd need a log from build with extended logging patch (https://phabricator.services.mozilla.com/D184121).
Thanks.

Flags: needinfo?(stransky)
Flags: needinfo?(stransky)

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

Is there thunderbird based on latest nightly?
I'd need a log from build with extended logging patch (https://phabricator.services.mozilla.com/D184121).
Thanks.

Yes, there is.

Jean-Louis, max, jaseg
you will want to install 117.0a1 from https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/

Flags: needinfo?(mozbugzilla.m)
Flags: needinfo?(max.harmathy)
Flags: needinfo?(jean-louis)
Attached file log-117.0a1.txt

(In reply to Wayne Mery (:wsmwk) from comment #20)

Jean-Louis, max, jaseg
you will want to install 117.0a1 from https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/

Played around with 117.0a1 and reproduced the issue.

Flags: needinfo?(max.harmathy)
Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mozbugzilla.m)
Flags: needinfo?(jean-louis)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/7555b1468ade [Wayland] Adjust EGL window size according to scale factor r=emilio

Backed out for causing multiple failures on Linux WebRender

Flags: needinfo?(stransky)

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:stransky, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

Yes, we need to pass it through testsuite.

Flags: needinfo?(stransky)
Duplicate of this bug: 1850124

Copying crash signatures from duplicate bugs.

Crash Signature: [@ mozilla::widget::WlLogHandler]
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/1eba13fb6422 [Wayland] Adjust EGL window size according to scale factor r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Flags: needinfo?(stransky)

Can this get backported to Thunderbird 115.x also?

(In reply to Jean-Louis Dupond from comment #32)

Can this get backported to Thunderbird 115.x also?

You'd need to backport Bug 1844543 too.

Depends on: 1844543
See Also: → 1847336

Any chance this will get backported? Still having crashes daily because of this.
Would be great if it was included in the stable series.

(In reply to Jean-Louis Dupond from comment #34)

Any chance this will get backported? Still having crashes daily because of this.
Would be great if it was included in the stable series.

Where do you have the crashes? It should be in latest stable Firefox included (120.0).

Flags: needinfo?(jean-louis)

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

(In reply to Jean-Louis Dupond from comment #34)

Any chance this will get backported? Still having crashes daily because of this.
Would be great if it was included in the stable series.

Where do you have the crashes? It should be in latest stable Firefox included (120.0).

In Thunderbird that is. Running 115.5.0 (64-bit).

Flags: needinfo?(jean-louis)

I don't think the single patch here will fix it. We landed series of patches for it and it may be complicated to backport all of them.

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

Attachment

General

Created:
Updated:
Size: