Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Firefox Assertion failure: !locale.IsEmpty()
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
psh0r
n00b
n00b


Joined: 18 Nov 2020
Posts: 4

PostPosted: Wed Nov 18, 2020 6:57 pm    Post subject: [SOLVED] Firefox Assertion failure: !locale.IsEmpty() Reply with quote

Hi,

I've recently updated @world and I am no longer able to run firefox when emerging www-client/firefox.
The ebuild runs without any problems, but when launching /usr/bin/firefox it crashes with Segmentation Fault.
I've enabled the debug USE-flag, which gives some more info:

Code:

$ firefox
[9673, Unnamed thread 7feaaf705280] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/xpcom/base/nsTraceRefcnt.cpp:202
[9673, Unnamed thread 7feaaf705280] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/xpcom/base/nsTraceRefcnt.cpp:202
Assertion failure: !locale.IsEmpty(), at /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/intl/locale/LocaleService.cpp:376
#01: ???[/usr/lib64/firefox/libxul.so +0x6026085]
#02: ???[/usr/lib64/firefox/libxul.so +0x6025dfe]
#03: ???[/usr/lib64/firefox/libxul.so +0x60277ad]
#04: ???[/usr/lib64/firefox/libxul.so +0x5e7dc55]
#05: ???[/usr/lib64/firefox/libxul.so +0x5e7f602]
#06: ???[/usr/lib64/firefox/libxul.so +0x5dbbe7e]
#07: ???[/usr/lib64/firefox/libxul.so +0x5dc537f]
#08: ???[/usr/lib64/firefox/libxul.so +0x5dc52ad]
#09: ???[/usr/lib64/firefox/libxul.so +0x5dc54b3]
#10: ???[/usr/lib64/firefox/libxul.so +0x5dbbf36]
#11: ???[/usr/lib64/firefox/libxul.so +0x5dc537f]
#12: ???[/usr/lib64/firefox/libxul.so +0x5dc52ad]
#13: ???[/usr/lib64/firefox/libxul.so +0x5dc408f]
#14: ???[/usr/lib64/firefox/libxul.so +0x5dc3489]
#15: ???[/usr/lib64/firefox/libxul.so +0x5e99c6d]
#16: ???[/usr/lib64/firefox/libxul.so +0xe9104e0]
#17: ???[/usr/lib64/firefox/libxul.so +0xe91e1ec]
#18: ???[/usr/lib64/firefox/libxul.so +0xe91ea76]
#19: ???[/usr/lib64/firefox/libxul.so +0xe939af7]
#20: ???[/usr/lib64/firefox/firefox +0x75a7d]
#21: ???[/usr/lib64/firefox/firefox +0x7536b]
#22: __libc_start_main[/lib64/libc.so.6 +0x23e0a]
#23: _start[/usr/lib64/firefox/firefox +0x74e9a]

Program /usr/lib64/firefox/firefox (pid = 9673) received signal 11.
Stack:
#01: ???[/usr/lib64/firefox/libxul.so +0xf2d315d]
#02: ???[/lib64/libpthread.so.0 +0x129e0]
#03: ???[/usr/lib64/firefox/libxul.so +0x6026095]
#04: ???[/usr/lib64/firefox/libxul.so +0x6025dfe]
#05: ???[/usr/lib64/firefox/libxul.so +0x60277ad]
#06: ???[/usr/lib64/firefox/libxul.so +0x5e7dc55]
#07: ???[/usr/lib64/firefox/libxul.so +0x5e7f602]
#08: ???[/usr/lib64/firefox/libxul.so +0x5dbbe7e]
#09: ???[/usr/lib64/firefox/libxul.so +0x5dc537f]
#10: ???[/usr/lib64/firefox/libxul.so +0x5dc52ad]
#11: ???[/usr/lib64/firefox/libxul.so +0x5dc54b3]
#12: ???[/usr/lib64/firefox/libxul.so +0x5dbbf36]
#13: ???[/usr/lib64/firefox/libxul.so +0x5dc537f]
#14: ???[/usr/lib64/firefox/libxul.so +0x5dc52ad]
#15: ???[/usr/lib64/firefox/libxul.so +0x5dc408f]
#16: ???[/usr/lib64/firefox/libxul.so +0x5dc3489]
#17: ???[/usr/lib64/firefox/libxul.so +0x5e99c6d]
#18: ???[/usr/lib64/firefox/libxul.so +0xe9104e0]
#19: ???[/usr/lib64/firefox/libxul.so +0xe91e1ec]
#20: ???[/usr/lib64/firefox/libxul.so +0xe91ea76]
#21: ???[/usr/lib64/firefox/libxul.so +0xe939af7]
#22: ???[/usr/lib64/firefox/firefox +0x75a7d]
#23: ???[/usr/lib64/firefox/firefox +0x7536b]
#24: __libc_start_main[/lib64/libc.so.6 +0x23e0a]
#25: _start[/usr/lib64/firefox/firefox +0x74e9a]
Sleeping for 300 seconds.
Type 'gdb /usr/lib64/firefox/firefox 9673' to attach your debugger to this thread.


I've found the line of code that is mentioned in the stack trace:

Code:

364 NS_IMETHODIMP
365 LocaleService::GetDefaultLocale(nsACString& aRetVal) {
366   // We don't allow this to change during a session (it's set at build/package
367   // time), so we cache the result the first time we're called.
368   if (mDefaultLocale.IsEmpty()) {
369     nsAutoCString locale;
370     // Try to get the package locale from update.locale in omnijar. If the
371     // update.locale file is not found, item.len will remain 0 and we'll
372     // just use our hard-coded default below.
373     GetGREFileContents("update.locale", &locale);
374     locale.Trim(" \t\n\r");
375     // This should never be empty.
376     MOZ_ASSERT(!locale.IsEmpty());
377     if (CanonicalizeLanguageId(locale)) {
378       mDefaultLocale.Assign(locale);
379     }
380
381     // Hard-coded fallback to allow us to survive even if update.locale was
382     // missing/broken in some way.
383     if (mDefaultLocale.IsEmpty()) {
384       GetLastFallbackLocale(mDefaultLocale);
385     }
386   }
387
388   aRetVal = mDefaultLocale;
389   return NS_OK;
390 }


and I've found this docu from Mozilla:
https://firefox-source-docs.mozilla.org/intl/locale_startup.html
https://firefox-source-docs.mozilla.org/intl/locale.html

But since I'm neither familiar with using gdb nor any Firefox internals, I'm a bit at a loss.

Can anyone point me into a direction how to find the root cause of this issue or how to fix it?

Things that I've tried:

  • Enabling/disabling clang USE-flag
  • Enabling/disabling l10n_en-GB USE-flag
  • Enabling/disabling system-* USE-flags
  • Emerging Firefox ESR version
  • Playing around with LANG environment variable


Last edited by psh0r on Sun Jan 24, 2021 10:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
lfs0a
Tux's lil' helper
Tux's lil' helper


Joined: 19 Oct 2016
Posts: 121

PostPosted: Fri Nov 20, 2020 2:05 am    Post subject: Reply with quote

FF83 works fine in my T9400 box.
If ESR get the same error,the problem most likely outside FF.
A broken RAM can trigger Segmentation Fault too.
Back to top
View user's profile Send private message
psh0r
n00b
n00b


Joined: 18 Nov 2020
Posts: 4

PostPosted: Fri Nov 20, 2020 6:35 pm    Post subject: Reply with quote

Thanks for the input.
I found out, that Firefox stores multiple files in /usr/lib64/firefox/omni.ja. It tries to load update.locale from there just before the assertion fails. For some unknown reason, the update.locale doesn't exist.
https://developer.mozilla.org/en-US/docs/Mozilla/About_omni.ja_%28formerly_omni.jar%29

If I manually add it, the assertion passes, but then Firefox crashes instead with

Code:

$ firefox
[2196, Unnamed thread 7f4bc77054c0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/xpcom/base/nsTraceRefcnt.cpp:202
[2196, Unnamed thread 7f4bc77054c0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/xpcom/base/nsTraceRefcnt.cpp:202
[2196, Main Thread] WARNING: Failed to get Mesa vendor ID! GLX_MESA_query_renderer unsupported?: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/widget/GfxInfoX11.cpp:286
[2196, Main Thread] WARNING: Failed to get Mesa device ID! GLX_MESA_query_renderer unsupported?: file /var/tmp/portage/www-client/firefox-83.0/work/firefox-83.0/widget/GfxInfoX11.cpp:293
Assertion failure: get() (dereferencing a UniquePtr containing nullptr), at /var/tmp/portage/www-client/firefox-83.0/work/firefox_build/dist/include/mozilla/UniquePtr.h:281
Back to top
View user's profile Send private message
psh0r
n00b
n00b


Joined: 18 Nov 2020
Posts: 4

PostPosted: Fri Nov 20, 2020 10:19 pm    Post subject: Reply with quote

Building Firefox from hg sources as described here works fine:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Back to top
View user's profile Send private message
psh0r
n00b
n00b


Joined: 18 Nov 2020
Posts: 4

PostPosted: Sun Jan 24, 2021 10:24 pm    Post subject: Reply with quote

My firefox builds via emerge are working again! It seems, that I had to enable the dbus USE-flag... :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum