--- Stefan Dösinger stefandoesinger@gmx.at wrote:
Hi, I think I've found the cause of the Empire Earth crash. This is not a reference counting problem at all, Empire Earth releases the DirectDraw and Surface objects on purpose. This is what happens:
- EE creates a DDraw object
- It attaches a Complex Surface
- It sets up a D3D device for this Surface
- EE performs a Flip(NULL, 0x20) on the surface
- It Releases the DirectDraw object
- It Releases the surface
Wine releases the surface in 5), Windows doesn't. It appears to me, that Windows doesn't release Surfaces which have a D3D object attached when the DDraw instance they belong to is freed.
I have written a small test app, which reproduces EEs behaviour. It crashes in Wine, but worksin Windows 2000. I'll do some more tests and submit a patch.
by the sound of things an internal reference is missing, up until 6 a reference should be kept, preventing the surface from being released at 5.
Oliver.
Stefan
___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com