The default bug view has changed. See this FAQ.

mDebugMode reveals GLContext context currency error on Windows

RESOLVED FIXED in mozilla10

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

unspecified
mozilla10
x86
All
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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: https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=00e70ccf9e37

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
NPP_Destroy
NPP_Destroy
NPP_Destroy
nsStringStats
 => 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 | automation.py | Application ran for: 0:12:54
INFO | automation.py | Reading PID log: c:\docume~1\cltbld\locals~1\temp\tmpkehwdipidlog
==> process 1320 launched child process 3364
INFO | automation.py | Checking for orphan process with PID: 3364
PROCESS-CRASH | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | application crashed (minidump found)
(Assignee)

Comment 1

6 years ago
The problem is also replicable on win7 using d3d9 layers.
(Assignee)

Comment 2

6 years ago
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)
(Assignee)

Updated

6 years ago
OS: Windows XP → All
Summary: mDebugMode reveals GLContext context currency error → mDebugMode reveals GLContext context currency error on Windows
(Assignee)

Comment 3

6 years ago
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.
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
(Assignee)

Comment 4

6 years ago
OGL layer manager calls a GLContext call which calls MakeCurrent.
Comment on attachment 565275 [details] [diff] [review]
Adds MakeCurrent call before unchecked calls to fFlush

jgilbert++
MOZ_GL_DEBUG++
Attachment #565275 - Flags: review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/4a6cfa62d845
https://hg.mozilla.org/mozilla-central/rev/4a6cfa62d845
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.