Crash on glBegin() (Was: Help with debugging needed)

Stefan Dösinger stefandoesinger at
Mon Aug 22 16:39:10 CDT 2005

I've continued my work on Empire Earth my Solution(or is it a hack that works 
by pure chance?) seems to work quite well, and the string operation was also 
easy to solve, I just may not delete the intro movie.

Now I've run into the next problem: Any call to glBegin(GL_Something) crashes 
in the libs of my OpenGL driver(ATI fglrx) due to some NULL pointer 
access[1]. If I disable Hardware Acceleration, the crash doesn't occur and 
Empire Earth starts up to the Main Menu more or less successfully: It only 
shows a black screen, but it reacts to keypresses(Sounds are playing, I can 
take screenshots with the in-game Screen Shot Funktionality[2]. A +ddraw log 
can be found at

I suspect the crash and the black screen problem to have more or less the same 
cause somewhere in the OpenGL initialization. I will test with some other 
OpenGL implementations(The X.Org one and if possible the one from the nvidia 
driver). Does anyone have any experiance with this? Some Pointers?

A few words to the Screen Shot: Appearently the screen shot is not totally 
black, it shows the correct mouse Pointer and the Texts are correct. It 
should draw a background image. The background seems not to be redrawn, so 
the old mouse pointer remains visible. The vertical mirroring appears only 
sometimes, it's perhaps also redraw related.

Thanks again for your help,
Stefan Dösinger

PS: are there any freely downloadable Direct3D 7 games available wich are 
working with Wine? I'd like to test these with the somewhat strange fglrx 

[1] Crash dump:
First chance exception: page fault on read access to 0x000000d4 in 32-bit code 
In 32 bit mode.
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:003b GS:0033
 EIP:7e8b2280 ESP:5b8df1c8 EBP:5b8df1e0 EFLAGS:00210212(   - 00      - RIA1)
 EAX:00000000 EBX:00000000 ECX:7c2926c8 EDX:0000011c
 ESI:00000004 EDI:7fe47b00
Stack dump:
0x5b8df1c8:  00000003 7e24dfc0 7e23945c 7c20c7c0
0x5b8df1d8:  7c20c7c0 00000004 5b8df200 7e8b1e02
0x5b8df1e8:  00000004 7e24dfc0 7e23945c 7e2394a8
0x5b8df1f8:  7e24d1d4 00000000 5b8df2cc 7e203e9c
0x5b8df208:  00000004 00000000 00000000 7e2395d3
0x5b8df218:  5b8dfed3 5b8dfb0b 5b8dfed3 00000000
=>1 0x7e8b2280 in (+0x3a3280) (0x5b8df1e0)
  2 0x7e8b1e02 in (+0x3a2e02) (0x5b8df200)
  3 0x7e203e9c draw_primitive_strided(This=0x7fe16ab0, d3dptPrimitiveType=0x4, 
d3dvtVertexType=0x152, lpD3DDrawPrimStrideData=0x5b8df308, dwVertexCount=0x4, 
dwIndices=0x5b8df3a8, dwIndexCount=0x6, dwFlags=0x0) 
[/media/usbdisk/develop/wine/dlls/ddraw/device_opengl.c:1444] in ddraw 
  4 0x7e205304 
d3dptPrimitiveType=0x4, lpD3DVertexBuf=0x7fe47b00, dwStartVertex=0x0, 
dwNumVertices=0x4, lpwIndices=0x5b8df3a8, dwIndexCount=0x6, dwFlags=0x0) 
[/media/usbdisk/develop/wine/dlls/ddraw/device_opengl.c:1782] in ddraw 
  5 0x7db42f41 ??0DX7Movie@@QAE at ABV0@@Z in dx7hrdisplay (0x5b8df3e4)
0x7fa60b92 ??0UIBFull@@QAE at KABVUString@@ABUGETextureDescription@@ABVGERectangle@@ABVUILayoutUtility@@PAVUIForm@@KKK_N at Z 
in low-level engine (0x5b8df4a8)
  7 0x7fa6ca69 ?DrawBackground at UIForm@@MAEJABVGERectangle@@@Z in low-level 
engine (0x5b8df504)
  8 0x7fa743dd ?AddDirtyRectangle at UIManager@@QAEXABVGERectangle@@PAVUIForm@@@Z 
in low-level engine (0x5b8df520)
  9 0x005058c0 in empire earth.exe.norepe (+0x1058c0) (0x5b8df55c)
  10 0x00507573 in empire earth.exe.norepe (+0x107573) (0x5b8df590)
  11 0x00507104 in empire earth.exe.norepe (+0x107104) (0x00000000)
0x7e8b2280: movl        0xd4(%eax),%eax

[2] Example Screenshot:


More information about the wine-devel mailing list