Closed Bug 923114 Opened 6 years ago Closed 6 years ago

"invalid context" errors with OMTC after closing windows

Categories

(Core :: Graphics, defect)

All
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(1 file)

After closing windows, I see messages like
2013-10-02 16:28:52.990 firefox[6109:9507] invalid context
printed to the console.

They come from inside [NSOpenGLContext currentContext] when the most recent current context has been released while it was still current.
This fixes it.

The [mContext release] call in ~GLContextCGL() does not actually deallocate the context because the ChildView holds another reference to it, but calling clearCurrentContext in -[ChildView dealloc] (which has the context-deallocating [mGLContext release] call) is no use because currentContext-ness is per thread, and the context is actually current on the Compositor thread and not on the main thread where the -[ChildView dealloc] happens.
Attachment #813130 - Flags: review?(matt.woodrow)
Attachment #813130 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/30c25c68bb3e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.