Possible Fix for Tilesort + No Context + GL Calls = Crash

[email protected] Fri, 03 Jun 2005 15:04:39 -0600
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
Hi all,

We were experienceing a problem with an ill-behaved app that was calling
destroyContext(), then calling flush().

Most spu's don't seem to mind this naughtiness, but tilesort appears to crash
under these circumstances.

So here's a modification to opengl_stub/context.c in stubMakeCurrent, around
line 750 or so that seems to work...

if (!context || !window) {
	if (stub.currentContext)
		stub.currentContext->currentDrawable = NULL;
	if (context)
		context->currentDrawable = NULL;
	stub.currentContext = NULL;

	/* BP Viz Change: When making non-current, null out the funcs */
	stubSetDispatch(&stubNULLDispatch);

	return GL_TRUE;  /* OK */
}


Let me know if there are any potentially bad side-effects of this change!


Thanks,
Jon

Jonathan Marbach
BP Center for Visualization
University of Colorado



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20