http://bugs.winehq.org/show_bug.cgi?id=3625
Summary: Railroad tycoon 3 stops with "ERROR deallocating DX stuff!!" (Vertex refcounting) Product: Wine Version: CVS Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: pebl@math.ku.dk
I can play the tutorials without problem, but when starting a champaign, a dialog box pops up and says the error in subject. This is an i18n RT3 message (and can be googled). RT3 then stops.
Right before showing the messagebox there is ~40 trace:d3d:IDirect3DIndexBuffer8Impl_Release (xxxxxxxx) : ReleaseRef to 0
and
trace:d3d:IDirect3DIndexBuffer8Impl_Release (0x7a72c0d0) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7fe97118) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7fe97150) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7af93028) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7fe970e0) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7a50cf68) : ReleaseRef to 0 trace:d3d:IDirect3DIndexBuffer8Impl_Release (0x7fe971d8) : ReleaseRef to 0 trace:d3d:IDirect3DIndexBuffer8Impl_Release (0x7b70d590) : ReleaseRef to 0 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7fe971a0) : ReleaseRef to 1 trace:dialog:GetDialogBaseUnits base units = 9,16
If I place a breakpoint in the last vertex Release, and return 0 instead of 1, RT3 continues correctly. If I change the implementation to allways return 0, rt3 also continues. So it seems RT3 checks the return release values.
Grepping for the 0x7fe971a0 pointer shows the list below (and a lot of IDirect3DVertexBuffer8Impl_Unlock and Lock I have left out). I have no idea where/how to fixing this.
trace:d3d:IDirect3DDevice8Impl_CreateImageSurface (0x7fe0b2c0) : w(256) h(256) fmt(21,D3DFMT_A8R8G8B8) surf@0x7fe971a0, surfmem@0x7a630458, 262144 bytes trace:d3d:IDirect3DDevice8Impl_CreateTexture Created surface level 0 @ 0x7fe971a0, memory at 0x7a630458 trace:d3d_surface:IDirect3DSurface8Impl_AddRef (0x7fe971a0) : AddRef from 1 trace:d3d:IDirect3DTexture8Impl_GetSurfaceLevel (0x7a630028) : returning 0x7fe971a0 for level 0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 1 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 5 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 5 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 5 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 5 trace:d3d:IDirect3DTexture8Impl_Release (0x7a630028) : Releasing surface 0x7fe971a0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 0 trace:d3d:IDirect3DDevice8Impl_CreateImageSurface (0x7fe0b2c0) : w(256) h(256) fmt(21,D3DFMT_A8R8G8B8) surf@0x7fe971a0, surfmem@0x7a630028, 262144 bytes trace:d3d:IDirect3DDevice8Impl_CreateTexture Created surface level 0 @ 0x7fe971a0, memory at 0x7a630028 trace:d3d_surface:IDirect3DSurface8Impl_AddRef (0x7fe971a0) : AddRef from 1 trace:d3d:IDirect3DTexture8Impl_GetSurfaceLevel (0x7fe97240) : returning 0x7fe971a0 for level 0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 1 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 6 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 6 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 6 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 6 trace:d3d:IDirect3DTexture8Impl_Release (0x7fe97240) : Releasing surface 0x7fe971a0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 0 trace:d3d:IDirect3DDevice8Impl_CreateImageSurface (0x7fe0b2c0) : w(256) h(256) fmt(21,D3DFMT_A8R8G8B8) surf@0x7fe971a0, surfmem@0x7a630028, 262144 bytes trace:d3d:IDirect3DDevice8Impl_CreateTexture Created surface level 0 @ 0x7fe971a0, memory at 0x7a630028 trace:d3d_surface:IDirect3DSurface8Impl_AddRef (0x7fe971a0) : AddRef from 1 trace:d3d:IDirect3DTexture8Impl_GetSurfaceLevel (0x7b703028) : returning 0x7fe971a0 for level 0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 1 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 7 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 7 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 7 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 7 trace:d3d:IDirect3DTexture8Impl_Release (0x7b703028) : Releasing surface 0x7fe971a0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 0 trace:d3d:IDirect3DDevice8Impl_CreateImageSurface (0x7fe0b2c0) : w(256) h(256) fmt(21,D3DFMT_A8R8G8B8) surf@0x7fe971a0, surfmem@0x7a630028, 262144 bytes trace:d3d:IDirect3DDevice8Impl_CreateTexture Created surface level 0 @ 0x7fe971a0, memory at 0x7a630028 trace:d3d_surface:IDirect3DSurface8Impl_AddRef (0x7fe971a0) : AddRef from 1 trace:d3d:IDirect3DTexture8Impl_GetSurfaceLevel (0x7fe97240) : returning 0x7fe971a0 for level 0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 1 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 8 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 8 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 8 trace:d3d:IDirect3DTexture8Impl_PreLoad Texture 0x7fe971a0 (level 0) given name 8 trace:d3d:IDirect3DTexture8Impl_Release (0x7fe97240) : Releasing surface 0x7fe971a0 trace:d3d_surface:IDirect3DSurface8Impl_Release (0x7fe971a0) : ReleaseRef to 0 trace:d3d:IDirect3DDevice8Impl_CreateVertexBuffer (0x7fe0b2c0) : Size=1560000, Usage=520, FVF=142, Pool=0 - Memory@0x7a390020, Iface@0x7fe971a0 trace:d3d:IDirect3DDevice8Impl_SetStreamSource (0x7fe0b2c0) : StreamNo: 0, OldStream ((nil)), NewStream (0x7fe971a0), NewStride 24 trace:d3d:IDirect3DVertexBuffer8Impl_AddRef (0x7fe971a0) : AddRef from 1 trace:d3d:IDirect3DVertexBuffer8Impl_Release (0x7fe971a0) : ReleaseRef to 1