[Bug 6979] winex11.drv opengl initialization crashes on macos

Wine Bugs wine-bugs at winehq.org
Fri Jan 19 15:53:22 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=6979


ken at codeweavers.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ken at codeweavers.com




------- Additional Comments From ken at codeweavers.com  2007-19-01 15:53 -------
What's happening is that the extensions string WineGLInfo.glExtensions that is
queried at dlls/winex11.drv/opengl.c:308 goes invalid by the time it is analyzed
at dlls/winex11.drv/opengl.c:2976.

The results of glGetString are documented as being static strings.  However, the
string is being released.  I have verified by adding traces that the string
pointer address has not changed.

I think the issue is that the set of supported extensions is dependent on the
context.  Therefore, the extensions string is only meaningful while the context
on which it was queried is still valid.  In Apple's OpenGL implementation, the
extensions string is in fact not static, it lives only as long as the context.

I know of a solution, but I don't trust myself because I haven't traced through
the code thoroughly.  The solution is to just strdup the extensions string when
it's originally queried.  My problem is this: if the context is being destroyed
and another is being created, are we sure the extensions are still the same for
the new context?  Shouldn't the code be structured such that the extensions
which are analyzed are those that have been queried from the *actual current*
context?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list