Closed Bug 1186688 Opened 10 years ago Closed 9 years ago

Assert failure in AssertUintParamCorrect

Categories

(Core :: Graphics: CanvasWebGL, defect)

39 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: q1, Assigned: jgilbert)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files)

There is a completely-reproducible assert failure in 39.0 debug (my build with no modifications) in AssertUintParamCorrect (dom\canvas\WebGLContextUtils.cpp) at line 1004: 1001: if (val != shadow) { 1002: printf_stderr("Failed 0x%04x shadow: Cached 0x%x/%u, should be 0x%x/%u.\n", 1003: pname, shadow, shadow, val, val); 1004: MOZ_ASSERT(false, "Bad cached value."); 1005: } when loading the site http://www.webglearth.com. Just visit the site and wait a few seconds. At failure, val == 2147483647 and shadow == 4294967295, and the call stack is: > xul.dll!mozilla::AssertUintParamCorrect(mozilla::gl::GLContext * gl, unsigned int pname, unsigned int shadow) Line 1004 C++ xul.dll!mozilla::WebGLContext::AssertCachedState() Line 1150 C++ xul.dll!mozilla::WebGLContext::ForceClearFramebufferWithDefaultValues(bool fakeNoAlpha, unsigned int mask, const bool * colorAttachmentsMask) Line 1334 C++ xul.dll!mozilla::WebGLContext::ClearScreen() Line 1312 C++ xul.dll!mozilla::WebGLContext::ClearBackbufferIfNeeded() Line 974 C++ xul.dll!mozilla::WebGLContext::Clear(unsigned int mask) Line 44 C++ xul.dll!mozilla::dom::WebGLRenderingContextBinding::clear(JSContext * cx, JS::Handle<JSObject *> obj, mozilla::WebGLContext * self, const JSJitMethodCallArgs & args) Line 9435 C++ xul.dll!mozilla::dom::GenericBindingMethod(JSContext * cx, unsigned int argc, JS::Value * vp) Line 2501 C++ xul.dll!js::CallJSNative(JSContext * cx, bool (JSContext *, unsigned int, JS::Value *) * native, const JS::CallArgs & args) Line 235 C++ xul.dll!js::Invoke(JSContext * cx, JS::CallArgs args, js::MaybeConstruct construct) Line 470 C++ xul.dll!Interpret(JSContext * cx, js::RunState & state) Line 2592 C++ xul.dll!js::RunScript(JSContext * cx, js::RunState & state) Line 420 C++ xul.dll!js::Invoke(JSContext * cx, JS::CallArgs args, js::MaybeConstruct construct) Line 489 C++ xul.dll!js::CallOrConstructBoundFunction(JSContext * cx, unsigned int argc, JS::Value * vp) Line 1589 C++ xul.dll!js::CallJSNative(JSContext * cx, bool (JSContext *, unsigned int, JS::Value *) * native, const JS::CallArgs & args) Line 235 C++ xul.dll!js::Invoke(JSContext * cx, JS::CallArgs args, js::MaybeConstruct construct) Line 470 C++ xul.dll!js::Invoke(JSContext * cx, const JS::Value & thisv, const JS::Value & fval, unsigned int argc, const JS::Value * argv, JS::MutableHandle<JS::Value> rval) Line 526 C++ xul.dll!JS::Call(JSContext * cx, JS::Handle<JS::Value> thisv, JS::Handle<JS::Value> fval, const JS::HandleValueArray & args, JS::MutableHandle<JS::Value> rval) Line 4331 C++ xul.dll!mozilla::dom::FrameRequestCallback::Call(JSContext * cx, JS::Handle<JS::Value> aThisVal, double time, mozilla::ErrorResult & aRv) Line 651 C++ xul.dll!mozilla::dom::FrameRequestCallback::Call(double time, mozilla::ErrorResult & aRv, mozilla::dom::CallbackObject::ExceptionHandling aExceptionHandling, JSCompartment * aCompartment) Line 528 C++ xul.dll!nsRefreshDriver::Tick(__int64 aNowEpoch, mozilla::TimeStamp aNowTime) Line 1580 C++ xul.dll!mozilla::RefreshDriverTimer::TickDriver(nsRefreshDriver * driver, __int64 jsnow, mozilla::TimeStamp now) Line 199 C++ xul.dll!mozilla::RefreshDriverTimer::Tick(__int64 jsnow, mozilla::TimeStamp now) Line 189 C++ xul.dll!mozilla::RefreshDriverTimer::Tick() Line 167 C++ xul.dll!mozilla::RefreshDriverTimer::TimerTick(nsITimer * aTimer, void * aClosure) Line 213 C++ xul.dll!nsTimerImpl::Fire() Line 631 C++ xul.dll!nsTimerEvent::Run() Line 729 C++ xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 855 C++ xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 265 C++ xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Line 99 C++ xul.dll!MessageLoop::RunInternal() Line 234 C++ xul.dll!MessageLoop::RunHandler() Line 227 C++ xul.dll!MessageLoop::Run() Line 201 C++ xul.dll!nsBaseAppShell::Run() Line 166 C++ xul.dll!nsAppShell::Run() Line 178 C++ xul.dll!nsAppStartup::Run() Line 281 C++ xul.dll!XREMain::XRE_mainRun() Line 4170 C++ xul.dll!XREMain::XRE_main(int argc, char * * argv, const nsXREAppData * aAppData) Line 4250 C++ xul.dll!XRE_main(int argc, char * * argv, const nsXREAppData * aAppData, unsigned int aFlags) Line 4469 C++ firefox.exe!do_main(int argc, char * * argv, nsIFile * xreDirectory) Line 294 C++ firefox.exe!NS_internal_main(int argc, char * * argv) Line 688 C++ firefox.exe!wmain(int argc, wchar_t * * argv) Line 131 C++ firefox.exe!__tmainCRTStartup() Line 255 C kernel32.dll!@BaseThreadInitThunk@12() Unknown ntdll.dll!___RtlUserThreadStart@8() Unknown ntdll.dll!__RtlUserThreadStart@8() Unknown
Dan, can you check this bug?
Flags: needinfo?(dglastonbury)
Whiteboard: [gfx-noted]
Flags: needinfo?(dglastonbury)
I encountered a similar assertion failure. In my case, the message logged was: Failed 0x8cdf shadow: Cached 0x4/4, should be 0x8/8. Assertion failure: false (Bad cached value.) It only occurs when webgl.min_capability_mode = true. This patch fixes the problem for me.
Attachment #8742867 - Flags: review?(jgilbert)
Comment on attachment 8742867 [details] [diff] [review] avoid assertion failure in minimal mode Review of attachment 8742867 [details] [diff] [review]: ----------------------------------------------------------------- We shouldn't skip the assertion, we should fix what's causing the assertion to fail.
Attachment #8742867 - Flags: review?(jgilbert) → review-
(In reply to Jeff Gilbert [:jgilbert] from comment #3) > Comment on attachment 8742867 [details] [diff] [review] > avoid assertion failure in minimal mode > > Review of attachment 8742867 [details] [diff] [review]: > ----------------------------------------------------------------- > > We shouldn't skip the assertion, we should fix what's causing the assertion > to fail. Actually this was a decent solution. I think we want to go a step further though.
Assignee: nobody → jgilbert
The original report was likely fixed by bug 1150310.
Depends on: 1150310
From b8f0671ce036cf6b89a024916bbd7074fc6ebe55 Mon Sep 17 00:00:00 2001 maxes. --- dom/canvas/WebGLContextUtils.cpp | 14 -------------- 1 file changed, 14 deletions(-) Review commit: https://reviewboard.mozilla.org/r/47531/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/47531/
Attachment #8743036 - Flags: review?(jmuizelaar)
(In reply to Jeff Gilbert [:jgilbert] from comment #6) > Created attachment 8743036 [details] > MozReview Request: Bug 1186688 - r?jrmuizel - Remove cached state check for > DrawBuffer > > From b8f0671ce036cf6b89a024916bbd7074fc6ebe55 Mon Sep 17 00:00:00 2001 > maxes. > --- > dom/canvas/WebGLContextUtils.cpp | 14 -------------- > 1 file changed, 14 deletions(-) > > Review commit: https://reviewboard.mozilla.org/r/47531/diff/#index_header > See other reviews: https://reviewboard.mozilla.org/r/47531/ Can you explain why we these were wrong?
Flags: needinfo?(jgilbert)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7) > (In reply to Jeff Gilbert [:jgilbert] from comment #6) > > Created attachment 8743036 [details] > > MozReview Request: Bug 1186688 - r?jrmuizel - Remove cached state check for > > DrawBuffer > > > > From b8f0671ce036cf6b89a024916bbd7074fc6ebe55 Mon Sep 17 00:00:00 2001 > > maxes. > > --- > > dom/canvas/WebGLContextUtils.cpp | 14 -------------- > > 1 file changed, 14 deletions(-) > > > > Review commit: https://reviewboard.mozilla.org/r/47531/diff/#index_header > > See other reviews: https://reviewboard.mozilla.org/r/47531/ > > Can you explain why we these were wrong? Sure. They ensure that these vars match what's originally queried from GL. However, for min-caps mode, we artificially limits from GL, as if GL has given us smaller limits than it actually supports.
Flags: needinfo?(jgilbert)
Flags: needinfo?(jmuizelaar)
Comment on attachment 8743036 [details] MozReview Request: Bug 1186688 - r?jrmuizel - Remove cached state check for DrawBuffer https://reviewboard.mozilla.org/r/47531/#review45649 It's probably worth putting the explanation in the commit message.
Attachment #8743036 - Flags: review?(jmuizelaar) → review+
Flags: needinfo?(jmuizelaar)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Target Milestone: mozilla48 → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: