http://bugs.winehq.org/show_bug.cgi?id=21154
--- Comment #9 from Stefan Dösinger stefandoesinger@gmx.at 2010-04-09 16:18:28 --- This seems like some refcounting problem to me:
0026:warn:d3d:IWineD3DSwapChainImpl_Destroy (0x7339528) Something's still holding back buffer 0 (0x733b050).
The swapchain this buffer belongs to is not the implicit swapchain. The game creates it's own, sets the backbuffer as render target and releases the swapchain. That leaves the surface without a container, and 817714912b59be49ea06251f2b91b959f07c1133 just tripped on the existing error and shows the crash.
I am sure(although this needs a test) that we're supposed to keep the swapchain alive if one of it's surfaces is in use, just like we keep textures and buffers alive that are bound to a stateblock. d3d9 unfortunately doesn't hold a reference to bound resources, so this is a more complicated mechanism than simply calling AddRef. I suspect a similar problem arises if we set a texture's surface as render target and release the texture.