Last Comment Bug 692458 - mDebugMode reveals GLContext context currency error on Windows
: mDebugMode reveals GLContext context currency error on Windows
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: x86 All
: -- normal (vote)
: mozilla10
Assigned To: Jeff Gilbert [:jgilbert]
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2011-10-06 08:33 PDT by Jeff Gilbert [:jgilbert]
Modified: 2011-10-09 07:30 PDT (History)
3 users (show)
khuey: in‑testsuite?
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Adds MakeCurrent call before unchecked calls to fFlush (1.54 KB, patch)
2011-10-06 10:36 PDT, Jeff Gilbert [:jgilbert]
jacob.benoit.1: review+
Details | Diff | Splinter Review

Description Jeff Gilbert [:jgilbert] 2011-10-06 08:33:50 PDT
With mDebugMode=1 on DEBUG builds, we assert that the desired rendering context is current. On WinXP, this is failing consistently on a fFlush call.

Relevant try run:

Log excerpt:
Initializing context 106BF1E0 surface 114FCE80 on display 0B5A8078
--- WebGL context created: 0B734B70
Fatal: mozilla::gl::GLContext::fFlush called on non-current context 0B752F58. The current context for this thread is 0B734B70.
###!!! ABORT: file e:\builds\moz2_slave\try-w32-dbg\build\obj-firefox\dist\include\GLContext.h, line 1163
WARNING: shutting down early because of crash!: file e:/builds/moz2_slave/try-w32-dbg/build/dom/plugins/ipc/PluginModuleChild.cpp, line 712
WARNING: plugin process _exit()ing: file e:/builds/moz2_slave/try-w32-dbg/build/dom/plugins/ipc/PluginModuleChild.cpp, line 704
 => mAllocCount:             88
 => mReallocCount:            1
 => mFreeCount:              24  --  LEAKED 64 !!!
 => mShareCount:            125
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
TEST-UNEXPECTED-FAIL | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | Exited with code 253 during test run
INFO | | Application ran for: 0:12:54
INFO | | Reading PID log: c:\docume~1\cltbld\locals~1\temp\tmpkehwdipidlog
==> process 1320 launched child process 3364
INFO | | Checking for orphan process with PID: 3364
PROCESS-CRASH | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | application crashed (minidump found)
Comment 1 Jeff Gilbert [:jgilbert] 2011-10-06 09:23:54 PDT
The problem is also replicable on win7 using d3d9 layers.
Comment 2 Jeff Gilbert [:jgilbert] 2011-10-06 10:13:21 PDT
Unsurprisingly, given the near-identical code, d3d10 has this problem when not using a shared texture. (Shared texture path preempts the unsafe call to fFlush)
Comment 3 Jeff Gilbert [:jgilbert] 2011-10-06 10:36:28 PDT
Created attachment 565275 [details] [diff] [review]
Adds MakeCurrent call before unchecked calls to fFlush

This should fix the problem on d3d9 and d3d10. I will check the OGL layers, just to be sure.
Comment 4 Jeff Gilbert [:jgilbert] 2011-10-06 10:40:04 PDT
OGL layer manager calls a GLContext call which calls MakeCurrent.
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2011-10-06 11:28:20 PDT
Comment on attachment 565275 [details] [diff] [review]
Adds MakeCurrent call before unchecked calls to fFlush

Comment 6 Benoit Jacob [:bjacob] (mostly away) 2011-10-07 12:18:21 PDT
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-10-09 07:30:38 PDT

Note You need to log in before you can comment on or make changes to this bug.