Thunderbird under Wayland does not correctly close (or manage) windows

Bug #1932328 reported by Yves Roggeman
276
This bug affects 47 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Unknown
Unknown
Mozilla Thunderbird
New
Unknown
gnome-shell-extension-ubuntu-dock (Ubuntu)
Undecided
Unassigned
mutter (Ubuntu)
Undecided
Unassigned
thunderbird (Ubuntu)
High
Unassigned

Bug Description

Using Ubuntu 21.04 (Hirsute) that starts in Wayland, by default.
Thunderbird version: 78.11.0 with "gnome-support" package.
Same problem in safe mode.
Description:
By default in this context, TB is a Wayland task.
When opening a compose windows (or reply or transfer), sending mail apparently close the windows, but gnome shell continue to show multiple "points", as if multiple windows are still active.
And after closing TB, it seems maintained in the same state, so it becomes impossible to relaunch it from the desk. But task manager of "looking glass" does not show it and it is possible to launch from terminal.
Provisional solution:
Modify .desktop file to launch with --display=:0 option, that force to use XWayland interface, as shown by xlsclients (for example).
But it is actually a bug under Wayland context, that also badly interfer with many add-ons or extensions.

Yves Roggeman (yrogge)
tags: added: wayland
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thunderbird (Ubuntu):
status: New → Confirmed
Revision history for this message
Phil Hughes (phil-hughes) wrote (last edit ):

I'm seeing the same thing after the recent update to Thunderbird 78.11. Ubuntu 21.04 on Wayland. x11 is ok. In my case it appears to be related to the Reminder dialogue opening. Some more details:

Start Thunderbird and make sure the Reminder dialogue does not open (eg by snoozing any reminders in a previous session).
Open a few emails in new windows - everything works as normal.

Now set a calendar entry for a few minutes and wait for the reminder dialogue to pop up.

Icon on dock shows indicator showing two open windows
Open an email in a new window
Icon on dock shows indicator showing three open windows
Close email
Icon on dock still shows indicator showing three open windows
Icon on dock is now unresponsive to left click. Right-click shows the menu listing all the windows you have opened, but is unresponsive and stays on the screen. It goes if you press "Super" twice.

Then switch to Thunderbird using Alt-tab
Repeat until more than 4 windows have been opened - icon show the maximum 4 indicators.
Close Thunderbird using Quit from the menu (ps shows no running Thunderbird processes)
Dock still shows icon with 4 indicators
Left or right click no longer does anything. A middle-click starts a new instance of Thunderbird.

Update: clicking on the Thunderbird Mail application menu in the top bar shows a complete list of the windows you have opened since Thunderbird was started.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

I also have that problem now (hirsute, thunderbird version 1:78.11.0+build1-0ubuntu0.21.04.2). The docks shows 2 tabs on Thunderbird while only one is open.
The most annoying part is that ALT-TAB window switching does not longer work then.

Revision history for this message
Heiko Gimbel (ripper811603) wrote :

Seems to affect my system as well. I am on Kubuntu 21.04 with KDE Plasma 5.22.2. Thunderbird is basically unusable on Wayland for me. The whole ui is flickering especially when a reminder notification appears. Thunderbird is the only application that is behaving like that. Firefox runs without problems. I have also noticed graphical artifacts in GIMP when running the Plasma Wayland Session.

Revision history for this message
Tim Passingham (tim-8aw3u04umo) wrote :

I have the same problem on ubuntu 21.04 wayland. Logging on under ubuntu xorg fixes it.

Windows sometimes don't close properly, and trying to exit can trigger a logoff. Manually logging off and back on fixes it for a while, until another window sticks.

Thunderbird version 1:78.11.0+build1-0ubuntu0.21.04.2

Wayland is almost unusable because of this.

Revision history for this message
Adam Jacobs (bllfr0g) wrote :

Me too. After the recent thunderbird update, every time I send an email results in an extra “point” that I can seemingly get rid of only by logging out and back in.

Revision history for this message
Raph (mraph) wrote (last edit ):

[EDIT : never mind, it affects both actually]

I have two computers both on Ubuntu 21.04 Wayland and Thunderbird 1:78.11.0+build1-0ubuntu0.21.04.2, and strangely this bug only affects one of my computer...

I don't know if any additional information from those two machine can help identifying the bug origin ? or maybe it's already identified ?

Revision history for this message
Yves Roggeman (yrogge) wrote :

Same behaviour with version 78.12.0 (newly fresh installed)

Yves Roggeman (yrogge)
description: updated
Revision history for this message
Tim Passingham (tim-8aw3u04umo) wrote :

I tried adding --display=:0 to the desktop commmand, as below:

Exec=thunderbird -addressbook --display=:0

I still get the same problem under wayland.

Revision history for this message
Yves Roggeman (yrogge) wrote :

That is the exec entry for "Contacts" desktop entry in the .desktop file.
Try to add "--display=:0" also in the general exec entry (the first one in the file) in order to be sure to test it!

Revision history for this message
Tim Passingham (tim-8aw3u04umo) wrote :

Oops - sorry. I scrolled too quickly assuming it was at the bottom. I'll try that and report if it is still causing problems.

Revision history for this message
Tim Passingham (tim-8aw3u04umo) wrote :

Yves - all seems to be OK now with that fix. Thanks.

Revision history for this message
Eric Donkersloot (ericd) wrote :

The workaround suggested in comment #9 is fine, however if you use fractional scaling under Wayland it makes the text in Thunderbird way too blurry.

Revision history for this message
Paul R (riquez) wrote :

I had this problem a few weeks ago (21.04) & changed to x11.
Additionally I found it sometimes affected nautilus file windows in the dock in the same way.
The dock would show dots for windows that did not exist & then new windows could not be opened & reboot was needed. So its more than just a Thunderbird problem.

Revision history for this message
Stefano Maffulli (smaffulli) wrote :

The workaround suggested on #9 is not working, unfortunately.

Revision history for this message
Yves Roggeman (yrogge) wrote :

Problem till present after upgrade to 78,13,0

Revision history for this message
Xavier Guillot (valeryan-24) wrote :
Download full text (3.6 KiB)

Hi,

Since a few weeks, I have a problem with Thunderbird (current version 78.12) and Ubuntu Dock / Dash to Dock in Ubuntu 21.10 :

When I write a new message and send it, after the message window has closed, its red dot remains near Thunderbird button on the Ubuntu dock - there are 2 dots: the one of main TB window (receipt box) and a second one as if there was another window still opened.

But if I switch to another application - Firefox, Gedit, Nautilus, no matter… - and then with the mouse (left button) click on Thunderbird icon, desktop freezes completely, I have to manually close the computer and restart it.

All is frozen, mouse nor Alt-Tab don't work, but if for example Radiotray was active, I can still hear the audio program live.

If I just roll the middle button on the mouse to switch on Thunderbird and not click, it doesn't freeze. But to be back on TB main window, I must before minimize all other applications, then run somewhere in TB interface (not on Dash button), or roll is useless and doesn't show Thunderbird.

If I open a window for a new message, don't send it and just close it, only one red dot stays and no freeze, even with a left button click.

I also report the bug upstream.

Crash logs :

Jul 2 18:41:14 valeryan24-desktop gnome-shell[2311]: Object St.Bin (0x55c216acf060), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Jul 2 18:41:14 valeryan24-desktop gnome-shell[2311]: == Stack trace for context 0x55c213c2c1d0 ==
Jul 2 18:41:14 valeryan24-desktop gnome-shell[2311]: #0 7ffe8ca71020 b /<email address hidden>/docking.js:2036 (4f2dda5e470 @ 208)
Jul 2 18:41:14 valeryan24-desktop gnome-shell[2311]: Object St.Bin (0x55c216acf060), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Jul 2 18:41:14 valeryan24-desktop gnome-shell[2311]: == Stack trace for context 0x55c213c2c1d0 ==

Jul 9 00:00:10 valeryan24-desktop gnome-shell[2445]: Object St.Bin (0x55abc2039d10), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Jul 9 00:00:10 valeryan24-desktop gnome-shell[2445]: == Stack trace for context 0x55abc1b471d0 ==
Jul 9 00:00:10 valeryan24-desktop gnome-shell[2445]: #0 7ffc34c41bd0 b /<email address hidden>/docking.js:2036 (329752c5e470 @ 208)
Jul 9 00:00:10 valeryan24-desktop gnome-shell[2445]: Object St.Bin (0x55abc2039d10), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Jul 9 00:00:10 valeryan24-desktop gnome-shell[2445]: == Stack trace for context 0x55abc1b471d0 ==

Jul 16 10:17:15 valeryan24-desktop sy...

Read more...

Revision history for this message
In , Tristan (regulator) wrote :

Created attachment 9235322
tb.png

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

Steps to reproduce:

1. set wayland as window manager
2. open thunderbird, create or reply to an email and a second compose window appears
3. click send and compose window vanishes
4 thunderbird appears to still have two windows open but the second cannot be seen
5. repeat to create additional "phantom" windows

I am using Pop!_OS 21.04 (Ubuntu) with Mesa graphics and wayland enabled

Actual results:

from what I can assume, when sending an email the compose window closes, but thunderbird/wayland still believes it to be open. if additional phantom windows are created and thunderbird is closed, the phantom windows stay open and thunderbird can't be started again until restart occurs

Expected results:

once compose window closes, thunderbird should only display and report main window open. If i fall back to x11 the program works as expected.

Revision history for this message
In , Wls220spring (wls220spring) wrote :

Sorry, I don't use Wayland on my Fedora 34 Workstation and can't confirm.

Revision history for this message
In , Tristan (regulator) wrote :

Wayland is the default WM on fedora? unless its disabled for nVidia

simply switch at the login screen, replicate the bug, then switch back

https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/

Revision history for this message
In , Wls220spring (wls220spring) wrote :

(In reply to gfunk from comment #2)
> Wayland is the default WM on fedora? unless its disabled for nVidia
>
> simply switch at the login screen, replicate the bug, then switch back
>
> https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/

Disabled.

WebGL 1 Driver Renderer NVIDIA Corporation -- GeForce GT 630/PCIe/SSE2
WebGL 1 Driver Version 4.6.0 NVIDIA 390.144

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

Is this specific to the Thunderbird Ubuntu package, or can you also observe it with upstream builds downloaded from https://www.thunderbird.net/download/ ?

Changed in thunderbird (Ubuntu):
importance: Undecided → High
Revision history for this message
Olivier Tilloy (osomon) wrote :

Commenting out the line that reads

    export MOZ_ENABLE_WAYLAND=1

in /usr/lib/thunderbird/thunderbird.sh makes the problem go away, because the application will now run as an XWayland client.

Revision history for this message
Olivier Tilloy (osomon) wrote :

FWIW, I can also observe the issue in a fully up-to-date impish (upcoming 21.10) VM.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I have managed to reproduce the issue with the upstream build for 78.13.0, downloaded from thunderbird.net, in a fully up-to-date hirsute VM, executed with MOZ_ENABLE_WAYLAND=1.

This rules out a packaging problem.

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

I'm answering my own question: I have managed to reproduce the issue with the upstream build for 78.13.0, downloaded from thunderbird.net, in a fully up-to-date Ubuntu 21.04 VM, executed with MOZ_ENABLE_WAYLAND=1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Tristan (regulator) wrote :

(In reply to Olivier Tilloy from comment #5)
> I'm answering my own question: I have managed to reproduce the issue with the upstream build for 78.13.0, downloaded from thunderbird.net, in a fully up-to-date Ubuntu 21.04 VM, executed with MOZ_ENABLE_WAYLAND=1.

thanks!

I might try on a fedora machine too if i get time

Revision history for this message
In , Richard Marti (richard-marti) wrote :

TB 78 is one year old with mostly only security updates in this year and the support ends around October. In this year Mozilla introduced a lot of Wayland changes. Maybe you could test TB 91 which is the next release version of TB? TB 91 was released this week and probably not yet in the distros.

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

I have also reproduced the problem with the upstream build for 91.0, downloaded from thunderbird.net, in a fully up-to-date Ubuntu 21.04 VM, executed with MOZ_ENABLE_WAYLAND=1.

gfunk, I'd be very interested in knowing whether that's an Ubuntu-specific problem, or can also be observed on Fedora.

Revision history for this message
In , Tristan (regulator) wrote :

Hey guys,
I've tested Fedora and the issue does not occur, it could be that Fedora uses Gnome 40 (vs Gnome 38 in Ubuntu)

As for thunderbird 91, it seems to have created a new profile, I'll wait until i can migrate my old profile

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

I set up a Fedora 33 VM to try and reproduce the issue there (Fedora 34 has GNOME 40, which the dash-to-dock extension isn't compatible with yet, and the problem is better observed with dash-to-dock configured to show one dot per open window). The default session is running on Wayland.

When running thunderbird 91.0 from the upstream tarball, I'm seeing that the icon displayed in the dock is the expected one when `MOZ_ENABLE_WAYLAND` is *not* set, however it's a generic cog icon when running with `MOZ_ENABLE_WAYLAND=1`.

Aside from that problem, I haven't managed to reproduce the issue described here with phantom windows yet, but I'll give it more tries, because it's not 100% reproducible on Ubuntu either.

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

I tested this further, and despite repeated attempts, I wasn't able to observe the issue in my Fedora VM.
Could it be a problem in the interaction between thunderbird and the version of dash-to-dock that's in Ubuntu, maybe?

Revision history for this message
Olivier Tilloy (osomon) wrote :

From the upstream bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=1724656), I tested rather extensively in a Fedora 33 VM and wasn't able to reproduce the issue, so there seems to be something that's specific to Ubuntu in this problem (maybe the version of dash-to-dock?).

Revision history for this message
Xavier Guillot (valeryan-24) wrote :

Yes, as I wrote in the duplicate bug #1938832 : after leaving a second red dot as if compose window was still opened, if I click on the Thunderbird icon on Ubuntu dock, it freezes the entire desktop, and I have to manually force shutdown.

I reported it upstream, but Dash to Dock development seems stopped - there is a fork on progress to adapt it to Gnome 40, but other bugs are not solved for the moment…

https://github.com/micheleg/dash-to-dock/issues/1500

Changed in thunderbird:
status: Unknown → New
Revision history for this message
Henning Sprang (henning) wrote (last edit ):

I have this problem too.
The real problem for me is less the dots staying in place, but alt-tab not working anymore.
With so many people being affected - did anybody find a workaround other than not using wayland or logging in and out?
Is there anything people not deeply into Gnome and/or thunderbird development can do to help it getting solved?

I tried to kill and get gnome-shell reloaded, as I used to to before sometimes, but that just leads to the whole gnome-shell going down and not coming up again, as far as I understand this is related to using Wayland, where killing gnome shell and having it restart automatically seems not to be supported.

Revision history for this message
Roger James (rogerjames99) wrote :
Revision history for this message
In , U-adam-e (u-adam-e) wrote :

Hi everyone,
I have the same issue on my computer : Ubuntu 21.04+Wayland, TB 78.13.0.
I would like to add that the bug impacts the whole system. On top of having phantom windows I also loose the ability of switching through open-windows with ALT+TAB, which is quite annoying… not saying totally irritating!
The same behavior has been described on Ubuntu French Forum : https://forum.ubuntu-fr.org/viewtopic.php?pid=22484498#p22484498

Revision history for this message
J-Paul BERARD (arverne) wrote :

Like it was said before, this issue is probably not specific to Thunderbird. I get the same problem with ImageMagick !

Revision history for this message
In , Ddl-github (ddl-github) wrote :

This bug also affects me running TB 78.13.0 under Pop!_OS 21.04 with Wayland. It does not appear to compromise my ability to switch windows/apps via ctl-tab, but it does prevent me from re-launching Thunderbird via the GUI after quitting it (both the dock and application launcher act like it's still running). I'm able to relaunch it via shell, but restoring normal operation requires restarting the DE (which means logging out and back in, under Wayland).

Revision history for this message
In , Ddl-github (ddl-github) wrote :

I didn't want to switch back to Xorg, so I found a clunky workaround:

* Select File -> Send Later (ctl-shift-enter): message is saved to Outbox.
* Select File -> Send Unsent Messages.

This method does not generate a ghost window. But wow, it's annoying. I had to remove the "Send" button from the Composition toolbar to keep me from reflexively clicking Send.

Revision history for this message
Derek L (ddl-lp) wrote :

I experience this bug under Wayland in Pop!_OS 21.04, which uses a custom fork of Dash to Dock (Cosmic Dock).[*]

I found a clunky workaround:

* Select File -> Send Later (ctl-shift-enter): message is saved to Outbox.
* Select File -> Send Unsent Messages.

This method does not create a "ghost window". But it's nearly as annoying as the bug itself. I had to remove the "Send" button from the Composition toolbar to keep me from reflexively clicking it. (I should really just switch TB to run under Xwayland, but I'm pigheaded.)

[*] https://github.com/pop-os/cosmic-dock

Revision history for this message
Jay (jay-7) wrote :
Revision history for this message
In , Jay (jay-7) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks like the fixes for Gnome 40 and 41 are in https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4184

Changed in mutter (Ubuntu):
status: New → Fix Committed
tags: added: fixed-in-40.6 fixed-upstream
Changed in thunderbird (Ubuntu):
status: Confirmed → Invalid
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.