[Bug 48898] 4k demoscene OpenGL demos crash on startup due to missing opengl32.dll 'wglGetDefaultProcAddress' stub (Crinkler's imports resolver requires named API exports matching native opengl32)

WineHQ Bugzilla wine-bugs at winehq.org
Tue Apr 14 06:45:57 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48898

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |obfuscation
            Summary|4k demoscene OpenGL demo    |4k demoscene OpenGL demos
                   |'End of time' by Alcatraz   |crash on startup due to
                   |and Altair crashes on       |missing opengl32.dll
                   |startup due to missing      |'wglGetDefaultProcAddress'
                   |opengl32.dll                |stub (Crinkler's imports
                   |'wglGetDefaultProcAddress'  |resolver requires named API
                   |stub                        |exports matching native
                   |                            |opengl32)

--- Comment #7 from Anastasius Focht <focht at gmx.net> ---
Hello Vijay,

sure. Your patch adds the needed 'wglGetDefaultProcAddress' export back in
correct place, directly after 'wglGetCurrentDC'.

--- snip ---
+@ stub GlmfBeginGlsBlock
+@ stub GlmfCloseMetaFile
+@ stub GlmfEndGlsBlock
+@ stub GlmfEndPlayback
+@ stub GlmfInitPlayback
+@ stub GlmfPlayGlsRecord
 @ stdcall glAccum(long float)
 @ stdcall glAlphaFunc(long float)
 @ stdcall glAreTexturesResident(long ptr ptr)
@@ -344,6 +350,7 @@
 @ stdcall wglDescribePixelFormat(long long long ptr)
 @ stdcall wglGetCurrentContext()
 @ stdcall wglGetCurrentDC()
+@ stub wglGetDefaultProcAddress
 @ stdcall wglGetLayerPaletteEntries(long long long long ptr)
 @ stdcall wglGetPixelFormat(long)
 @ stdcall wglGetProcAddress(str)
@@ -354,6 +361,7 @@
 @ stdcall wglShareLists(long long)
 @ stdcall wglSwapBuffers(long)
 @ stdcall wglSwapLayerBuffers(long long)
+@ stub wglSwapMultipleBuffers
 @ stdcall wglUseFontBitmapsA(long long long long)
 @ stdcall wglUseFontBitmapsW(long long long long)
 @ stdcall wglUseFontOutlinesA(long long long long float float long ptr)
--- snip ---

The other changes, that is adding new GlmfXXX exports to the beginning and
'wglSwapMultipleBuffers' export near the end wouldn't affect Crinkler's imports
resolver for this demo.

As explained in my comment #5, only the named API function order within the
import chunks matters. The second range ends at 'wglSetLayerPaletteEntries'
(including it), hence adding 'wglSwapMultipleBuffers' later is fine as well.

I'm refining the summary a bit, as more 4K demos are likely affected by it and
to avoid dupes. Also adding my favourite keyword - 'obfuscation' ;-)

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list