ASSERTION: cannot setlocale: 'locale', in nsUNIXCharset.cpp, line 224 android debug build

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
8 years ago
8 months ago

People

(Reporter: blassey, Assigned: smontagu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

I see this assertion when running an android debug build on the nexus one
stack:
Program received signal SIGBUS, Bus error.
[Switching to Thread 3770]
NS_DebugBreak_P (aSeverity=1, aStr=0x83493ba9 "cannot setlocale", aExpr=0x83594799 "locale", aFile=<value optimized out>, aLine=0) at ../../../xpcom/base/nsDebugImpl.cpp:371
371	     Break(buf.buffer);
(gdb) bt
#0  NS_DebugBreak_P (aSeverity=1, aStr=0x83493ba9 "cannot setlocale", aExpr=0x83594799 "locale", aFile=<value optimized out>, aLine=0) at ../../../xpcom/base/nsDebugImpl.cpp:371
#1  0x82314d0c in nsPlatformCharset::Init (this=0x51f52040) at ../../../../intl/uconv/src/nsUNIXCharset.cpp:224
#2  0x8230d0c8 in nsPlatformCharsetConstructor (aOuter=<value optimized out>, aIID=..., aResult=0x487fc3fc) at ../../../../intl/uconv/src/nsUConvModule.cpp:608
#3  0x83168d90 in mozilla::GenericFactory::CreateInstance (this=<value optimized out>, aOuter=<value optimized out>, aIID=<value optimized out>, aResult=0x444e8)
    at GenericFactory.cpp:48
#4  0x831b2a3c in nsComponentManagerImpl::CreateInstanceByContractID (this=<value optimized out>, aContractID=0x8341aec3 "@mozilla.org/intl/platformcharset;1", aDelegate=0x0, 
    aIID=..., aResult=0x487fc3fc) at ../../../xpcom/components/nsComponentManager.cpp:1280
#5  0x831b4184 in nsComponentManagerImpl::GetServiceByContractID (this=0x4863f100, aContractID=<value optimized out>, aIID=..., result=0x487fc554)
    at ../../../xpcom/components/nsComponentManager.cpp:1642
#6  0x8315e084 in nsGetServiceByContractIDWithError::operator() (this=0x487fc53c, aIID=..., aInstancePtr=0x6) at nsComponentManagerUtils.cpp:288
#7  0x823310dc in assign_from_gs_contractid_with_error (this=0x52123fa0, locale=<value optimized out>) at ../../../../dist/include/nsCOMPtr.h:1262
#8  nsCOMPtr (this=0x52123fa0, locale=<value optimized out>) at ../../../../dist/include/nsCOMPtr.h:635
#9  nsCollationUnix::Initialize (this=0x52123fa0, locale=<value optimized out>) at ../../../../../intl/locale/src/unix/nsCollationUnix.cpp:134
#10 0x8232d5cc in nsCollationFactory::CreateCollation (this=<value optimized out>, locale=0x4edcdf00, instancePtr=0x837cbf2c) at ../../../../intl/locale/src/nsCollation.cpp:66
#11 0x8288c814 in LocaleCompare (cx=0x4d98a400, src1=0x4dabaff0, src2=0x51e33400, rval=0x4d4f1638) at ../../../dom/base/nsJSEnvironment.cpp:796
#12 0x81573144 in ?? ()
Cannot access memory at address 0xffffe558
#13 0x81573144 in ?? ()
Cannot access memory at address 0xffffe558
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(Assignee)

Comment 2

8 years ago
setlocale returns null on Android, which is probably not such a big deal in itself. In fact that assertion could probably become a warning.

However it is worth checking that the platform charset does get set correctly at some point and doesn't fall back to ISO-8859-1.

Comment 3

8 years ago
NS_IsNativeUTF8() is set to always return true on Android. Should be enough I think.

Comment 4

8 months ago
nsPlatformCharset is gone now
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.