Closed Bug 1059329 Opened 10 years ago Closed 10 years ago

System JS : ERROR (null):0 - uncaught exception: 2147500037

Categories

(Testing :: XPCShell Harness, defect)

33 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: Yoric, Assigned: Yoric)

Details

Attachments

(1 file)

When running xpcshell tests, my console contains a number of occurrences of
  System JS : ERROR (null):0 - uncaught exception: 2147500037

The number seems to vary.

Looking at it a little deeper, it appears that some of these are caused by
 nsDirectoryService::Get("cachePDir", ...)
 nsDirectoryService::Get("indexedDBPDir", ...)



* thread #1: tid = 0x708e1f, 0x00000001013dd2ae XUL`xpc::SystemErrorReporter(cx=0x0000000110a59380, message=0x00000001144dfac0, rep=0x00007fff5fbf4ea0) + 30 at nsXPConnect.cpp:204, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
    frame #0: 0x00000001013dd2ae XUL`xpc::SystemErrorReporter(cx=0x0000000110a59380, message=0x00000001144dfac0, rep=0x00007fff5fbf4ea0) + 30 at nsXPConnect.cpp:204
    frame #1: 0x00000001059be31c XUL`js::CallErrorReporter(cx=0x0000000110a59380, message=0x00000001144dfac0, reportp=0x00007fff5fbf4ea0) + 252 at jscntxt.cpp:881
    frame #2: 0x00000001059b949f XUL`js_ReportUncaughtException(cx=0x0000000110a59380) + 383 at jsexn.cpp:641
    frame #3: 0x00000001059b928b XUL`JS_ReportPendingException(cx=0x0000000110a59380) + 43 at jsapi.cpp:6028
    frame #4: 0x00000001013c0459 XUL`nsXPCWrappedJSClass::CheckForException(ccx=0x00007fff5fbf5ce8, aPropertyName=0x0000000112a60938, anInterfaceName=0x00000001144dfa60, aForceReport=false) + 953 at XPCWrappedJSClass.cpp:845
    frame #5: 0x00000001013c2647 XUL`nsXPCWrappedJSClass::CallMethod(this=0x00000001144c0ec0, wrapper=0x00000001144d6c80, methodIndex=3, info_=0x0000000112a60918, nativeParams=0x00007fff5fbf5fc0) + 6775 at XPCWrappedJSClass.cpp:1291
    frame #6: 0x00000001013bc1c9 XUL`nsXPCWrappedJS::CallMethod(this=0x00000001144d6c80, methodIndex=3, info=0x0000000112a60918, params=0x00007fff5fbf5fc0) + 201 at XPCWrappedJS.cpp:519
  * frame #7: 0x0000000100754750 XUL`PrepareAndDispatch(self=0x00000001144df620, methodIndex=3, args=0x00007fff5fbf6120, gpregs=0x00007fff5fbf60a0, fpregs=0x00007fff5fbf60d0) + 1584 at xptcstubs_x86_64_darwin.cpp:122
    frame #8: 0x00000001007531ab XUL`SharedStub + 91
    frame #9: 0x00000001006daf3f XUL`FindProviderFile(aElement=0x00000001144df620, aData=0x00007fff5fbf6240) + 703 at nsDirectoryService.cpp:342
    frame #10: 0x00000001006daaf3 XUL`nsDirectoryService::Get(this=0x0000000110a52380, aProp=0x0000000106d05e00, aUuid=0x000000010609eb80, aResult=0x00007fff5fbf63d0) + 515 at nsDirectoryService.cpp:373
    frame #11: 0x00000001006db1ea XUL`_ZThn8_N18nsDirectoryService3GetEPKcRK4nsIDPPv(this=0x0000000110a52388, aProp=0x0000000106d05e00, aUuid=0x000000010609eb80, aResult=0x00007fff5fbf63d0) + 74 at Unified_cpp_xpcom_io0.cpp:397
    frame #12: 0x000000010066e267 XUL`NS_GetSpecialDirectory(aSpecialDirName=0x0000000106d05e00, aResult=0x00007fff5fbf63d0) + 167 at nsDirectoryServiceUtils.h:27
    frame #13: 0x00000001009e8fd9 XUL`mozilla::net::CacheFileIOManager::OnProfile() + 217 at CacheFileIOManager.cpp:1304
    frame #14: 0x0000000100a3e8f5 XUL`mozilla::net::CacheObserver::Observe(this=0x000000011444b190, aSubject=0x0000000000000000, aTopic=0x0000000110a06ec0, aData=0x00000001144d81c0) + 149 at CacheObserver.cpp:449
    frame #15: 0x00000001006a82e9 XUL`nsObserverList::NotifyObservers(this=0x0000000110a451b0, aSubject=0x0000000000000000, aTopic=0x0000000110a06ec0, someData=0x00000001144d81c0) + 137 at nsObserverList.cpp:100
    frame #16: 0x00000001006aa0d2 XUL`nsObserverService::NotifyObservers(this=0x0000000110a52680, aSubject=0x0000000000000000, aTopic=0x0000000110a06ec0, aSomeData=0x00000001144d81c0) + 338 at nsObserverService.cpp:329
    frame #17: 0x0000000100752c69 XUL`NS_InvokeByIndex(that=0x0000000110a52680, methodIndex=5, paramCount=3, params=0x00007fff5fbf6788) + 537 at xptcinvoke_x86_64_unix.cpp:162
    frame #18: 0x00000001013fe9a8 XUL`CallMethodHelper::Invoke(this=0x00007fff5fbf6740) + 88 at XPCWrappedNative.cpp:2369
    frame #19: 0x00000001013ee877 XUL`CallMethodHelper::Call(this=0x00007fff5fbf6740) + 263 at XPCWrappedNative.cpp:1730
    frame #20: 0x00000001013cc647 XUL`XPCWrappedNative::CallMethod(ccx=0x00007fff5fbf6928, mode=CALL_METHOD) + 231 at XPCWrappedNative.cpp:1697
    frame #21: 0x00000001013cebeb XUL`XPC_WN_CallMethod(cx=0x0000000110a59380, argc=3, vp=0x000000011434d358) + 923 at XPCWrappedNativeJSOps.cpp:1288
    frame #22: 0x0000000105ca57c5 XUL`js::CallJSNative(cx=0x0000000110a59380, native=0x00000001013ce850, args=0x00007fff5fbf7050)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) + 165 at jscntxtinlines.h:231
    frame #23: 0x0000000105c79b33 XUL`js::Invoke(cx=0x0000000110a59380, args=CallArgs at 0x00007fff5fbf7050, construct=NO_CONSTRUCT) + 1203 at Interpreter.cpp:481
    frame #24: 0x0000000105c6f8e7 XUL`Interpret(cx=0x0000000110a59380, state=0x00007fff5fbf9f08) + 52567 at Interpreter.cpp:2563
    frame #25: 0x0000000105c62a5b XUL`js::RunScript(cx=0x0000000110a59380, state=0x00007fff5fbf9f08) + 667 at Interpreter.cpp:428
    frame #26: 0x0000000105c79c53 XUL`js::Invoke(cx=0x0000000110a59380, args=CallArgs at 0x00007fff5fbf9fc0, construct=NO_CONSTRUCT) + 1491 at Interpreter.cpp:500
    frame #27: 0x0000000105c7a482 XUL`js::Invoke(cx=0x0000000110a59380, thisv=0x00007fff5fbfa380, fval=0x00007fff5fbfa3b0, argc=0, argv=0x00007fff5fbfa508, rval=JS::MutableHandleValue at 0x00007fff5fbfa140) + 834 at Interpreter.cpp:537
    frame #28: 0x00000001056925ff XUL`js::jit::DoCallFallback(cx=0x0000000110a59380, frame=0x00007fff5fbfa570, stub_=0x00000001144920c8, argc=0, vp=0x00007fff5fbfa4f8, res=JS::MutableHandleValue at 0x00007fff5fb
Thanks to the help of bz, I found out that the issue comes from xpcshell/head.js.
Component: XPCOM → XPCShell Harness
Product: Core → Testing
I wonder whether we can use Components.returnCode here and avoid throwing the exception.  Or just rely on undocumented directory service behavior and return null without throwing.
Yes, I have a patch that returns `null` and that appears to work.
Attachment #8480469 - Flags: review?(ted) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6e09dd1cf637

Thanks for fixing this! I'd noticed it too but hadn't filed it yet.
Flags: in-testsuite+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6e09dd1cf637
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: