Intermittent Access Violation ID2D1RenderTarget::EndDraw

此生再无相见时 提交于 2019-12-08 04:46:18

问题


I have my Direct2D drawing loop which is running successfully for hours, even days, except for the intermittent access violation error. There is no pattern for this to happen, mostly after several hours, sometimes after just a few seconds.

Unhandled exception at 0x5f990099 (d3d11.dll) in XX.exe: 0xC0000005: Access violation reading location 0x00000fe0.

I am keeping a log of the return HRESULT of EndDraw if not successful. All the previous EndDraws seem to return S_OK. There aren't any other failed Direct2D API calls prior to this one.

ID2D1RenderTarget object is not NULL.

The Drawing loop is protected in a critical section.

Any ideas how to catch where this is coming from? Maybe the device or render target is entering some invalid state which I need to discover?

来源:https://stackoverflow.com/questions/25489485/intermittent-access-violation-id2d1rendertargetenddraw

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!