Closed Bug 709231 Opened 13 years ago Closed 2 years ago

crash when coming out of fullscreen - AtSSERTION: Should be full-screen doc: 'doc->IsFullScreenDoc()

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 728962

People

(Reporter: humph, Unassigned)

Details

(Keywords: crash)

I'm fixing some issues in my students' tests for the Mouse Lock api, which uses the new fullscreen api in all the tests.  I'm hitting the following, which is causing me to crash:

###!!! ASSERTION: Should be full-screen doc: 'doc->IsFullScreenDoc()', file /Users/dave/repos/mozilla-central/content/base/src/nsDocument.cpp, line 8604
nsDocument::RestorePreviousFullScreenState()+0x0000016F [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x006FC4EF]
nsDocument::MozCancelFullScreen()+0x00000037 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x006E0005]
NS_InvokeByIndex_P+0x0000030E [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x017E0A35]
CallMethodHelper::Invoke()+0x00000064 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105D3EC]
CallMethodHelper::Call()+0x0000011B [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105FDCD]
XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)+0x000002E0 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105927C]
XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)+0x00000258 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01065215]
js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), js::CallArgs const&)+0x0000006E [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D680AE]
js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct)+0x00000237 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65627]
js::Interpret(JSContext*, js::StackFrame*, js::InterpMode)+0x0000C731 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D58DF8]
js::RunScript(JSContext*, JSScript*, js::StackFrame*)+0x00000140 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D64FD1]
js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct)+0x00000316 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65706]
js::Invoke(JSContext*, js::InvokeArgsGuard&, js::MaybeConstruct)+0x0000005B [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01CBFA4F]
js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*)+0x0000011C [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65B26]
JS_CallFunctionValue+0x000001C3 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01C87FA2]
nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x000012BC [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0104D264]
nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x0000013C [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01043F54]
PrepareAndDispatch+0x0000051A [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x017E2074]
###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../dist/include/nsCOMPtr.h, line 846
nsCOMPtr<nsIDocument>::operator->() const+0x0000003D [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x00268E79]
nsDocument::RestorePreviousFullScreenState()+0x000002A1 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x006FC621]
nsDocument::MozCancelFullScreen()+0x00000037 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x006E0005]
nsHTMLDocument::MozCancelFullScreen()+0x00000015 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0097837B]
NS_InvokeByIndex_P+0x0000030E [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x017E0A35]
CallMethodHelper::Invoke()+0x00000064 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105D3EC]
CallMethodHelper::Call()+0x0000011B [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105FDCD]
XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)+0x000002E0 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0105927C]
XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)+0x00000258 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01065215]
js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), js::CallArgs const&)+0x0000006E [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D680AE]
js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct)+0x00000237 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65627]
js::Interpret(JSContext*, js::StackFrame*, js::InterpMode)+0x0000C731 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D58DF8]
js::RunScript(JSContext*, JSScript*, js::StackFrame*)+0x00000140 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D64FD1]
js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct)+0x00000316 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65706]
js::Invoke(JSContext*, js::InvokeArgsGuard&, js::MaybeConstruct)+0x0000005B [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01CBFA4F]
js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*)+0x0000011C [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01D65B26]
JS_CallFunctionValue+0x000001C3 [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01C87FA2]
nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x000012BC [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x0104D264]
nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*)+0x0000013C [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x01043F54]
PrepareAndDispatch+0x0000051A [/Users/dave/repos/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x017E2074]
TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/mouselock/test_FullScreenHarness.html | Exited with code 1 during test run

The code that's doing this essential is doing:

* open a child window
* go fullscreen in child window, do some things
* end the test like this:
  document.mozCancelFullScreen();
  nextTest(); // calls back into window.opener to start a new test

When I change their code so that nextTest() waits for a mozfullscreenchange event, it doesn't crash.  What might be happening here is that another window may have fullscreen by the time this one is going out of fullscreen, and for some reason this null pointer dereference happens.

I'm not 100% sure yet, but filing now while I see it happening.
Severity: normal → critical
Keywords: crash
David, any chance you could attach a crash test for what you're seeing here? Or does this require a full mochitest instance to trigger? If you have a mochitest that's "incorrec" but triggers this that could be useful too. Thanks!
Correct, this is mochitest-only for me.  I'll try to reproduce and get a crash test when I'm back from holidays in Jan.
(In reply to David Humphrey (:humph) from comment #2)
> Correct, this is mochitest-only for me.  I'll try to reproduce and get a
> crash test when I'm back from holidays in Jan.

Did this ever work out? See also: bug 728962.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: critical → S2

Sounds like this was expected to be bug 728962

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 728962
Resolution: --- → DUPLICATE
Summary: crash when coming out of fullscreen → crash when coming out of fullscreen - AtSSERTION: Should be full-screen doc: 'doc->IsFullScreenDoc()
You need to log in before you can comment on or make changes to this bug.