Closed Bug 794662 Opened 12 years ago Closed 12 years ago

B2G Desktop crashes on startup

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: benjamin)

References

Details

B2G Desktop for Windows crashes on startup.  I see this behavior with both nightly builds and my own builds.  It happens consistently, every time I start it.  And it happens with a freshly-generated Gaia profile from a recently-updated clone of Gaia (with the "nightly" branch checked out).

Here's a crash report for today's nightly build:

https://crash-stats.mozilla.com/report/index/e725f60c-a74f-4d56-b569-5b02e2120926

Unfortunately, the crash-stats server doesn't have symbols for B2G, due to bug 785698, but here's a stack of the crash on my own build:

 Index  Function
--------------------------------------------------------------------------------
*1      mozalloc.dll!mozalloc_abort(const char * const msg=0x0046ae88) 
 2      xul.dll!MSCRTReportHook(int aReportType=2, char * aMessage=0x0046ae88, int * oReturnValue=0x00464e50) 
 3      msvcr100d.dll!_VCrtDbgReportW(int nRptType=2, const wchar_t * szFile=0x568780e8, int nLine=798, const wchar_t * szModule=0x00000000, const wchar_t * szFormat=0x568786c0, char * arglist=0x0046bf0c) 
 4      msvcr100d.dll!_CrtDbgReportWV(int nRptType=2, const wchar_t * szFile=0x568780e8, int nLine=798, const wchar_t * szModule=0x00000000, const wchar_t * szFormat=0x568786c0, char * arglist=0x0046bf0c) 
 5      msvcr100d.dll!_CrtDbgReportW(int nRptType=2, const wchar_t * szFile=0x568780e8, int nLine=798, const wchar_t * szModule=0x00000000, const wchar_t * szFormat=0x568786c0, ...) 
 6      msvcr100d.dll!_expandtime(localeinfo_struct * plocinfo=0x0046c008, char specifier='R', const tm * timeptr=0x0046c09c, char * * string=0x0046c030, unsigned int * left=0x0046c018, __lc_time_data * lc_time=0x00b1d928, unsigned int alternate_form=0) 
 7      msvcr100d.dll!_Strftime_l(char * string=0x0046c114, unsigned int maxsize=100, const char * format=0x00f03975, const tm * timeptr=0x0046c09c, void * lc_time_arg=0x00000000, localeinfo_struct * plocinfo=0x00000000) 
 8      msvcr100d.dll!strftime(char * string=0x0046c114, unsigned int maxsize=100, const char * format=0x00f03974, const tm * timeptr=0x0046c09c) 
 9      mozjs.dll!PRMJ_FormatTime(char * buf=0x0046c114, int buflen=100, const char * fmt=0x00f03974, PRMJTime * prtm=0x0046c0e8) 
 10     mozjs.dll!ToLocaleHelper(JSContext * cx=0x0db80250, JS::CallReceiver call={...}, JSObject * obj=0x08543660, const char * format=0x00f03974) 
 11     mozjs.dll!date_toLocaleFormat_impl(JSContext * cx=0x0db80250, JS::CallArgs args={...}) 
 12     mozjs.dll!JS::CallNonGenericMethod<&IsDate,&date_toLocaleFormat_impl>(JSContext * cx=0x0db80250, JS::CallArgs args={...}) 
 13     mozjs.dll!date_toLocaleFormat(JSContext * cx=0x0db80250, unsigned int argc=1, JS::Value * vp=0x07b80298) 
 14     mozjs.dll!js::CallJSNative(JSContext * cx=0x0db80250, int (JSContext *, unsigned int, JS::Value *)* native=0x560eefe0, const JS::CallArgs & args={...}) 
 15     mozjs.dll!js::InvokeKernel(JSContext * cx=0x0db80250, JS::CallArgs args={...}, js::MaybeConstruct construct=NO_CONSTRUCT) 
 16     mozjs.dll!js::Interpret(JSContext * cx=0x0db80250, js::StackFrame * entryFrame=0x07b80020, js::InterpMode interpMode=JSINTERP_NORMAL) 
 17     mozjs.dll!js::RunScript(JSContext * cx=0x0db80250, JS::Handle<JSScript *> script={...}, js::StackFrame * fp=0x07b80020) 
 18     mozjs.dll!js::ExecuteKernel(JSContext * cx=0x0db80250, JS::Handle<JSScript *> script={...}, JSObject & scopeChain={...}, const JS::Value & thisv={...}, js::ExecuteType type=EXECUTE_GLOBAL, js::StackFrame * evalInFrame=0x00000000, JS::Value * result=0x00000000) 
 19     mozjs.dll!js::Execute(JSContext * cx=0x0db80250, JS::Handle<JSScript *> script={...}, JSObject & scopeChainArg={...}, JS::Value * rval=0x00000000) 
 20     mozjs.dll!JS::Evaluate(JSContext * cx=0x0db80250, JS::Handle<JSObject *> obj={...}, JS::CompileOptions options={...}, const wchar_t * chars=0x0e91f008, unsigned int length=25191, JS::Value * rval=0x00000000) 
 21     xul.dll!nsJSContext::EvaluateString(const nsAString_internal & aScript={...}, JSObject * aScopeObject=0x0852e040, nsIPrincipal * aPrincipal=0x0e0e76c0, nsIPrincipal * aOriginPrincipal=0x0e962c00, const char * aURL=0x0e9973c8, unsigned int aLineNo=1, JSVersion aVersion=JSVERSION_DEFAULT, nsAString_internal * aRetValue=0x00000000, bool * aIsUndefined=0x0046d1e3) 
 22     xul.dll!nsScriptLoader::EvaluateScript(nsScriptLoadRequest * aRequest=0x0e997440, const nsString & aScript={...}) 
 23     xul.dll!nsScriptLoader::ProcessRequest(nsScriptLoadRequest * aRequest=0x0e997440) 
 24     xul.dll!nsScriptLoader::ProcessPendingRequests() 
 25     xul.dll!nsScriptLoader::OnStreamComplete(nsIStreamLoader * aLoader=0x0e3f1580, nsISupports * aContext=0x0ec63100, tag_nsresult aStatus=-2142109678, unsigned int aStringLen=0, const unsigned char * aString=0x00000000) 
 26     xul.dll!nsStreamLoader::OnStopRequest(nsIRequest * request=0x0e9fbbe0, nsISupports * ctxt=0x0ec63100, tag_nsresult aStatus=-2142109678) 
 27     xul.dll!nsJARChannel::OnStopRequest(nsIRequest * req=0x0ec1c820, nsISupports * ctx=0x00000000, tag_nsresult status=-2142109678) 
 28     xul.dll!nsInputStreamPump::OnStateStop() 
 29     xul.dll!nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream * stream=0x0ec13540) 
 30     xul.dll!nsInputStreamReadyEvent::Run() 
 31     xul.dll!nsThread::ProcessNextEvent(bool mayWait=false, bool * result=0x0046d473) 
 32     xul.dll!NS_ProcessNextEvent_P(nsIThread * thread=0x00f1f160, bool mayWait=false) 
 33     xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate=0x00f3d0c0) 
 34     xul.dll!MessageLoop::RunInternal() 
 35     xul.dll!MessageLoop::RunHandler() 
 36     xul.dll!MessageLoop::Run() 
 37     xul.dll!nsBaseAppShell::Run() 
 38     xul.dll!nsAppShell::Run() 
 39     xul.dll!nsAppStartup::Run() 
 40     xul.dll!XREMain::XRE_mainRun() 
 41     xul.dll!XREMain::XRE_main(int argc=3, char * * argv=0x00b17cb0, const nsXREAppData * aAppData=0x0119c7e4) 
 42     xul.dll!XRE_main(int argc=3, char * * argv=0x00b17cb0, const nsXREAppData * aAppData=0x0119c7e4, unsigned int aFlags=0) 
 43     b2g.exe!do_main(int argc=3, char * * argv=0x00b17cb0) 
 44     b2g.exe!NS_internal_main(int argc=3, char * * argv=0x00b17cb0) 
 45     b2g.exe!wmain(int argc=3, wchar_t * * argv=0x00b11ad0) 
 46     b2g.exe!__tmainCRTStartup() 
 47     b2g.exe!wmainCRTStartup() 
 48     kernel32.dll!7488339a() 
 49     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
 50     ntdll.dll!77019ef2() 
 51     ntdll.dll!77019ec5()
This is a Microsoft CRT abort in strftime from PRMJ_FormatTime, probably due to the date year not being between 1900 and 1999. But I'd need to see the parameters being passed to PRMJ_FormatTime to be sure about that.
>? prtm
0x003abe44 {tm_usec=440000 tm_sec='+' tm_min='' ...}
    tm_usec: 440000
    tm_sec: 43 '+'
    tm_min: 18 ''
    tm_hour: 16 ''
    tm_mday: 26 ''
    tm_mon: 8 ''
    tm_wday: 3 ''
    tm_year: 2012
    tm_yday: 269
    tm_isdst: 1 ''
>? fmt
0x026038f0 "%R"
This is JS calling date.toLocaleFormat('%R')

The Microsoft strftime doesn't understand or support '%R', so it throws a CRT error which aborts. So there are really two bugs here:

* some gaia thing shouldn't be calling toLocaleFormat('%R'). Use '%H:%M' instead
* gecko should really be catching this before the CRT gets a chance to abort. Blech.
Assignee: nobody → benjamin
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 794927
You need to log in before you can comment on or make changes to this bug.