Closed Bug 1777741 Opened 2 years ago Closed 2 years ago

102.0 MacOS X issues - main window is empty. Error window said about 'Uncaught TypeError: gFolderDisplay is null'

Categories

(Thunderbird :: Mail Window Front End, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102+ fixed, thunderbird104 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
thunderbird_esr102 + fixed
thunderbird104 --- fixed

People

(Reporter: a.samets, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Attached image main window

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0

Steps to reproduce:

Hello. I've upgraded from 91.0.1 version to 102.0 and I miss everything and my main window is empty. Error window said about 'Uncaught TypeError: gFolderDisplay is null'
I've tried to run in safe mode without addons - didn't help. I've not tried to run in another profile, because I need my current.

Actual results:

Main window doesn't show any UI for working with email.
Error log is full with:
Uncaught TypeError: gFolderDisplay is null
updateCheckedStateForIgnoreAndWatchThreadCmds chrome://messenger/content/mailWindowOverlay.js:161
goUpdateMailMenuItems chrome://messenger/content/mailWindowOverlay.js:145
oncommandupdate chrome://messenger/content/messenger.xhtml:1
view_init chrome://messenger/content/mailWindowOverlay.js:415
onpopupshowing chrome://messenger/content/messenger.xhtml:1

and
Uncaught
Exception { name: "NS_ERROR_UNEXPECTED", message: "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]", result: 2147549183, filename: "resource:///modules/UIFontSize.jsm", lineNumber: 96, columnNumber: 0, data: null, stack: "@resource:///modules/UIFontSize.jsm:96:34\n@chrome://messenger/content/tabmail.js:13:34\n", location: XPCWrappedNative_NoHelper }

Expected results:

All should work as it was.

Attached image error.log window
Attached image about window

Also in "about" it suggest to upgrade, but it doesn't work - after pressing to "Restart to upgrade Thunderbird" nothing changes - issue is the same.

gFolderDisplay is null is also reported at bug 1772974

Summary: Thunderbird 102.0 MacOS X issues after upgrade → 102.0 MacOS X issues - main window is empty. Error window said about 'Uncaught TypeError: gFolderDisplay is null'

I've solved my problem with removing from prefs.js the strings which begins with "font.". I've backuped the existed file and make some diffs for "fresh" prefs.js and cheched, what exactly was in the source.
I have the next things:
user_pref("font.default.x-cyrillic", "serif");
user_pref("font.default.x-user-def", "serif");
user_pref("font.default.x-western", "serif");
user_pref("font.internaluseonly.changed", true);
user_pref("font.language.group", "x-user-def");
user_pref("font.name.monospace.x-cyrillic", "Courier New");
user_pref("font.name.monospace.x-user-def", "Courier New");
user_pref("font.name.monospace.x-western", "Courier New");
user_pref("font.name.sans-serif.x-cyrillic", "Segoe Print");
user_pref("font.name.sans-serif.x-user-def", "Ubuntu");
user_pref("font.name.sans-serif.x-western", "Ubuntu");
user_pref("font.name.serif.x-cyrillic", "Ubuntu");
user_pref("font.name.serif.x-user-def", "Ubuntu");
user_pref("font.name.serif.x-western", "Ubuntu");
user_pref("font.size.fixed.x-cyrillic", 14);
user_pref("font.size.fixed.x-user-def", 14);
user_pref("font.size.fixed.x-western", 14);
user_pref("font.size.variable.x-cyrillic", 14);
user_pref("font.size.variable.x-user-def", 14);
user_pref("font.size.variable.x-western", 14);

After removing all works like a charm, but it's better to add more checks for custom font settings for fresh versions.
Thank you.

Blocks: tb102found

It certainly looks possible we would access prefs that are not set.
https://searchfox.org/comm-central/rev/9d99b2706b19fa0f9153d922f8234b1107270789/mail/modules/UIFontSize.jsm#94-95 with langGroup being a localized pref.

We should add a default value second parameter to the getIntPref calls. But what values?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(alessandro)

Uh, interesting issue.
I think we could do something like this:

If the langGroup pref is not defined for whatever reason, we can use x-user-def as that seems to be the default value not changed by a localized pref.
Regarding the VARIABLE_SIZE and the MONOSPACE_SIZE attributes, if any of those is not available, we can fallback to the this.size for both in order to keep the increase/decrease of messages consistent with the application UI.

Does this sound correct?
Are we potentially missing something?

Flags: needinfo?(alessandro)

I'm not sure what x-user-def is. Yes it seems using this.size for the others would make sense.

Looking further, I guess this is an expected problem: have the localized langGroup pref set to something invalid. Like https://searchfox.org/l10n/source/rw/toolkit/chrome/global/intl.properties#39 (which does seem like a bug), the pref wouldn't exist and things blow up.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 105 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e5ee2e85e604
Make sure fontsize contols do not break for invalid/missing pref. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9286997 [details]
Bug 1777741 - Make sure fontsize contols do not break for invalid/missing pref. r=aleca

[Approval Request Comment]
Regression caused by (bug #): new font size controls
User impact if declined: may get broken ui
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): safe

Attachment #9286997 - Flags: approval-comm-esr102?
Attachment #9286997 - Flags: approval-comm-beta?

Comment on attachment 9286997 [details]
Bug 1777741 - Make sure fontsize contols do not break for invalid/missing pref. r=aleca

[Triage Comment]
Approved for beta

Attachment #9286997 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9286997 [details]
Bug 1777741 - Make sure fontsize contols do not break for invalid/missing pref. r=aleca

[Triage Comment]
Approved for esr102

Attachment #9286997 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: