Hi, I've been trying to track down a crash in our application for a few days now and I'm wondering if anyone can help. I've isolated a crash to a single line of code, the wglflush() call in dlls/wined3d/drawprim.c. Using the current git of wine (1.1.42 + april 5th 2010 commits) with no alterations the application seems rock solid, it won't crash -- but it runs at around 20 fps or so on our test platform. By commenting the wglflush call in dlls/wined3d/drawprim.c (there is only one call in that file to wglflush) the game's fps triples to 60, but the application will crash if you spin around too quickly or cause a level transition. GDB tells me the crash is in dlls/ntdll/heap.c:RtlAllocateHeap -- I don't think this is heap corruption though because neither guardmalloc nor valgrind report any unexpected memory problems while the crash still occurs using either of those tools. Wine's debug output is not helpful, the game is killed when the crash happens, no stack trace. The last line is always: err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0xsomethin-different-each-time. I've tried different debug channels but none give any more useful information. The one that might be helpful, trace+heap, seems to prevent the crash when it is turned on but causes fps to cut in half. Our test platform is a late 2009 macbook pro, 2.53ghz intel core 2 duo, 4gb ram, OSX 10.6.3, Nvidia geforce 9600m gt/512mb video ram. Note that the same behavior has been observed on every mac with tested with, including ATI based imacs and older nvidia 8800 macbooks. My best guess at this point is that this crash is related to video memory or system->video buffer memory. I've been using the nvidia driver profiler to track this. If I have the wglflush go through only every 3rd frame instead of every frame (using a static call counter) then the video memory usage goes way up, fps goes up and the crashing becomes more frequent. Can anyone explain the relationship between this wglflush, video memory usage and fps? Why does this one function call have such a dramatic effect on our application? Thank you.