Closed Bug 629775 Opened 15 years ago Closed 15 years ago

Compartment mismatch when loading prerelease welcome page

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 7
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 631409
Tracking Status
blocking2.0 --- final+

People

(Reporter: kael, Assigned: sfink)

References

()

Details

(Whiteboard: [hardblocker])

Synced to hg head this morning and did a debug build of Firefox in order to do some debugging. When I started my build, as usual it opened the 'thanks for installing a Firefox prerelease' page, but this time it crashed with a reproducible 'Compartment Mismatch' error. *** Compartment mismatch 05ADDC50 vs. 0F012A90 Assertion failure: compartment mismatched, at c:\mozilla\js\src\jscntxtinlines.h:541 My current hg head revision is 53a26f3050bc. The last time I pulled was probably yesterday afternoon; unfortunately I forgot to note the revision before pulling. document being loaded is http://www.mozilla.org/projects/firefox/prerelease.html script being parsed is http://www.mozilla.org/script/1.0/jquery-1.4.3.min.js XPCWrappedJSClass::CallMethod is calling 'shouldLoad' Stack: mozjs.dll!JS_Assert(const char * s=0x65e316e4, const char * file=0x65e31700, int ln=541) Line 73 C++ mozjs.dll!js::CompartmentChecker::fail(JSCompartment * c1=0x05addc50, JSCompartment * c2=0x0f012a90) Line 541 + 0x14 bytes C++ mozjs.dll!js::CompartmentChecker::check(JSCompartment * c=0x0f012a90) Line 557 + 0x10 bytes C++ mozjs.dll!js::CompartmentChecker::check(JSObject * obj=0x0fc5f318) Line 566 C++ mozjs.dll!js::CompartmentChecker::check(const js::Value & v={...}) Line 575 + 0x11 bytes C++ mozjs.dll!js::assertSameCompartment<js::Value>(JSContext * cx=0x05aeb538, js::Value t1={...}) Line 639 C++ mozjs.dll!js::CallJSNative(JSContext * cx=0x05aeb538, int (JSContext *, unsigned int, js::Value *)* native=0x5a601ea0, unsigned int argc=1, js::Value * vp=0x063802e0) Line 699 + 0x13 bytes C++ mozjs.dll!js::Interpret(JSContext * cx=0x05aeb538, JSStackFrame * entryFrame=0x06380060, unsigned int inlineCallCount=5, JSInterpMode interpMode=JSINTERP_NORMAL) Line 4780 + 0x21 bytes C++ mozjs.dll!js::RunScript(JSContext * cx=0x05aeb538, JSScript * script=0x0762c4f0, JSStackFrame * fp=0x06380060) Line 657 + 0x11 bytes C++ mozjs.dll!js::Invoke(JSContext * cx=0x05aeb538, const js::CallArgs & argsRef={...}, unsigned int flags=0) Line 737 + 0x11 bytes C++ mozjs.dll!js::ExternalInvoke(JSContext * cx=0x05aeb538, const js::Value & thisv={...}, const js::Value & fval={...}, unsigned int argc=6, js::Value * argv=0x0031cfa0, js::Value * rval=0x0031cf68) Line 858 + 0xf bytes C++ mozjs.dll!js::ExternalInvoke(JSContext * cx=0x05aeb538, JSObject * obj=0x07dc9678, const js::Value & fval={...}, unsigned int argc=6, js::Value * argv=0x0031cfa0, js::Value * rval=0x0031cf68) Line 961 + 0x2a bytes C++ mozjs.dll!JS_CallFunctionValue(JSContext * cx=0x05aeb538, JSObject * obj=0x07dc9678, jsval_layout fval={...}, unsigned int argc=6, jsval_layout * argv=0x0031cfa0, jsval_layout * rval=0x0031cf68) Line 5076 + 0x38 bytes C++ xul.dll!nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS * wrapper=0x05ae4ce8, unsigned short methodIndex=3, const XPTMethodDescriptor * info=0x05923388, nsXPTCMiniVariant * nativeParams=0x0031d07c) Line 1701 + 0x38 bytes C++ xul.dll!nsXPCWrappedJS::CallMethod(unsigned short methodIndex=3, const XPTMethodDescriptor * info=0x05923388, nsXPTCMiniVariant * params=0x0031d07c) Line 589 C++ xul.dll!PrepareAndDispatch(nsXPTCStubBase * self=0x05ae4d68, unsigned int methodIndex=3, unsigned int * args=0x0031d144, unsigned int * stackBytesToPop=0x0031d134) Line 114 + 0x21 bytes C++ xul.dll!SharedStub() Line 142 C++ xul.dll!nsContentPolicy::CheckPolicy(unsigned int (unsigned int, nsIURI *, nsIURI *, nsISupports *, const nsACString_internal &, nsISupports *, short *)* policyMethod=0x59f592c0, unsigned int contentType=2, nsIURI * contentLocation=0x0f093098, nsIURI * requestingLocation=0x0e91a3b0, nsISupports * requestingContext=0x0ef2d630, const nsACString_internal & mimeType={...}, nsISupports * extra=0x00000000, short * decision=0x0031d3d8) Line 157 + 0x2f bytes C++ xul.dll!nsContentPolicy::ShouldLoad(unsigned int contentType=2, nsIURI * contentLocation=0x0f093098, nsIURI * requestingLocation=0x0e91a3b0, nsISupports * requestingContext=0x0ef2d630, const nsACString_internal & mimeType={...}, nsISupports * extra=0x00000000, short * decision=0x0031d3d8) Line 218 + 0x29 bytes C++ xul.dll!NS_CheckContentLoadPolicy(unsigned int contentType=2, nsIURI * contentLocation=0x0f093098, nsIPrincipal * originPrincipal=0x0e91ac40, nsISupports * context=0x0ef2d630, const nsACString_internal & mimeType={...}, nsISupports * extra=0x00000000, short * decision=0x0031d3d8, nsIContentPolicy * policyService=0x05ae3720, nsIScriptSecurityManager * aSecMan=0x05a3f710) Line 221 + 0x2f bytes C++ xul.dll!nsScriptLoader::CheckContentPolicy(nsIDocument * aDocument=0x0ef2d630, nsISupports * aContext=0x0ef2d630, nsIURI * aURI=0x0f093098, const nsAString_internal & aType={...}) Line 252 + 0x37 bytes C++ xul.dll!nsScriptLoader::ShouldLoadScript(nsIDocument * aDocument=0x0ef2d630, nsISupports * aContext=0x0ef2d630, nsIURI * aURI=0x0f093098, const nsAString_internal & aType={...}) Line 277 + 0x15 bytes C++ xul.dll!nsScriptLoader::StartLoad(nsScriptLoadRequest * aRequest=0x0f092618, const nsAString_internal & aType={...}) Line 291 + 0x23 bytes C++ xul.dll!nsScriptLoader::PreloadURI(nsIURI * aURI=0x0f093098, const nsAString_internal & aCharset={...}, const nsAString_internal & aType={...}) Line 1309 + 0x15 bytes C++ xul.dll!nsHtml5TreeOpExecutor::PreloadScript(const nsAString_internal & aURL={...}, const nsAString_internal & aCharset={...}, const nsAString_internal & aType={...}) Line 877 C++ xul.dll!nsHtml5SpeculativeLoad::Perform(nsHtml5TreeOpExecutor * aExecutor=0x07168708) Line 68 C++ xul.dll!nsHtml5TreeOpExecutor::RunFlushLoop() Line 450 C++ xul.dll!nsHtml5ExecutorFlusher::Run() Line 154 C++ xul.dll!nsThread::ProcessNextEvent(int mayWait=0, int * result=0x0031d67c) Line 633 + 0x19 bytes C++ xul.dll!NS_ProcessNextEvent_P(nsIThread * thread=0x00d06630, int mayWait=0) Line 250 + 0x16 bytes C++ xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate=0x00d01c80) Line 110 + 0xe bytes C++ xul.dll!MessageLoop::RunInternal() Line 220 C++ xul.dll!MessageLoop::RunHandler() Line 203 C++ xul.dll!MessageLoop::Run() Line 177 C++ xul.dll!nsBaseAppShell::Run() Line 198 C++ xul.dll!nsAppShell::Run() Line 258 + 0x9 bytes C++ xul.dll!nsAppStartup::Run() Line 218 + 0x1c bytes C++ xul.dll!XRE_main(int argc=1, char * * argv=0x0045da78, const nsXREAppData * aAppData=0x0045df58) Line 3775 + 0x25 bytes C++ firefox.exe!NS_internal_main(int argc=1, char * * argv=0x0045da78) Line 158 + 0x12 bytes C++ firefox.exe!wmain(int argc=1, wchar_t * * argv=0x00459578) Line 128 + 0xd bytes C++ firefox.exe!__tmainCRTStartup() Line 552 + 0x19 bytes C firefox.exe!wmainCRTStartup() Line 371 C kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
Steve, you touched this code recently.
My session was erased before I could note down the specific pages open in the saved tabs, and now I can't reproduce this anymore after rebuilding Firefox against the same hg revision. Must have been a fluke. :( I would close this as 'not reproducible' but Bugzilla won't let me.
I managed to reproduce this again with a different hg revision. The error only occurs if I have adblock plus installed in my firefox profile (because local debug builds/minefield nightlies use my regular profile by default). If I delete my extensions folder or create a new profile, the crash does not occur. I can have no saved tabs in my profile and still get the crash at startup when the 'thanks for using minefield' tab starts loading. I made a backup of the profile that reproduces this crash, and I can also provide a full minidump if that's useful for debugging.
Here are reliable reproduction steps for me: Create a new profile using a debug build: dist/bin/firefox.exe -P In my case, I named it 'test'. Start your debug build using that profile. Browse to the adblock plus website (http://adblockplus.org/en/installation) and click Install Adblock Plus 1.3.3. Click allow, etc. Your debug build will now ask you to restart firefox. Close your debug build. Open up a regular release build of Firefox, using the -P argument to load the 'test' profile - In my case, I used 4.0b10. You should see it check your plugins for compatibility, and the Adblock Plus welcome page will ask you to add a subscription. I added a subscription to EasyList, then closed FF4b10. Now, open the debug build again, making sure to load the 'test' profile. At this point it should check your plugins for compatibility, open the browser window, begin loading the 'thanks for using minefield' page, and crash with the compartment error.
Assignee: general → sphink
blocking2.0: --- → ?
blocking2.0: ? → final+
Whiteboard: hardblocker
Whiteboard: hardblocker → [hardblocker]
See bug 630875, bug 631409, bug 631289. Maybe all part of one big happy dupe family. :)
Need to check if this repros after bug 627954 lands.
Depends on: 627954
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.