locked
ID3D11DeviceContext::Map Error

    Question

  • D3D11: Removing Device.
    D3D11 INFO: ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_REMOVED: Plug-and-play stop has been exercised on this adapter. Odds are good that the adapter might no longer be available). [ EXECUTION INFO #380: DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT]D3D11 ERROR: ID3D11DeviceContext::Map: Returning E_OUTOFMEMORY, meaning memory was exhausted. [ RESOURCE_MANIPULATION ERROR #2097215: RESOURCE_MAP_OUTOFMEMORY_RETURN]

    What does it mean?  What is out of memory?

    (The 55th Map returns S_OK, and the 56th shows error)


    C++ DX11

    Sunday, June 24, 2012 7:52 AM

Answers

  • Given the order of your D3D info messages, it doesn't appear that you actually have a memory issue.  Once your device is removed, all of the active D3D objects you hold are no longer valid and will have to be recreated.  In this case, the call to map fails.

    It's probably that you've found a driver bug, possibly through valid use, though it's more probable that your application is passing bad data causing the device to crash or perhaps encounter a time out if the work took more than 2 seconds. 

    Are there any more D3D info messages prior to these failures that might indicate a miss use of the API in a prior command?  The call to Map() will flush all pending commands so Map() itself is not likely to be the culprit.


    Thursday, July 12, 2012 7:22 PM

All replies

  • Seems memory leaks when the buffer size is great than about 100kb.


    C++ DX11

    Sunday, June 24, 2012 8:20 AM
  • Hello,

    Would you please provide us the whole codes to reproduce this issue,

    You can upload your project to skydriver
    http://skydrive.live.com/

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, June 25, 2012 6:09 AM
    Moderator
  • Now I tried some simple samples but their memory did not grow on ID3D11DeviceContext::Map, even the blob is very big.

    It always crash when process memory reaches 144M.

    I can provide more info if I have the symbol files, but they can not be found on the public symbol server...


    C++ DX11

    Monday, June 25, 2012 10:51 AM
  • Given the order of your D3D info messages, it doesn't appear that you actually have a memory issue.  Once your device is removed, all of the active D3D objects you hold are no longer valid and will have to be recreated.  In this case, the call to map fails.

    It's probably that you've found a driver bug, possibly through valid use, though it's more probable that your application is passing bad data causing the device to crash or perhaps encounter a time out if the work took more than 2 seconds. 

    Are there any more D3D info messages prior to these failures that might indicate a miss use of the API in a prior command?  The call to Map() will flush all pending commands so Map() itself is not likely to be the culprit.


    Thursday, July 12, 2012 7:22 PM
  • Yes ,  seems a bug in the NV driver, no symbol to track, no more D3D INFO. When Memory reach about 144M , Device was removed (I didn't remove it), then crash. 

    And maybe not a memory leak. When the buffer is small, it will also grow to 144M, but will not remove device(crash). And after a while , the memory will be released to original size.

    ----------------------

    call stack:

     1      nvwgf2um.dll!715d294d()   // Memory alloc
     2      nvwgf2um.dll!7157a4a2()
     3      nvwgf2um.dll!71561c82()
     4      d3d11.dll!CResource<struct ID3D11Resource>::Map<1,4>(class CContext *,class CResource<struct ID3D11Resource> *,unsigned int,enum D3D11_MAP,unsigned int,struct D3D11_MAPPED_SUBRESOURCE *)
     5      d3d11.dll!CContext::ID3D11DeviceContext1_Map_<1>(struct ID3D11DeviceContext1 *,struct ID3D11Resource *,unsigned int,enum D3D11_MAP,unsigned int,struct D3D11_MAPPED_SUBRESOURCE *)
     6      d3d11_1sdklayers.dll!NDebug::CContext::Map(struct ID3D11Resource *,unsigned int,enum D3D11_MAP,unsigned int,struct D3D11_MAPPED_SUBRESOURCE *)


    • Edited by Raptor K Friday, July 13, 2012 4:14 AM
    Friday, July 13, 2012 3:17 AM
  • No problem when force WARP, so must be a driver bug.

    C++ DX11

    Saturday, July 14, 2012 5:58 AM
  • And fixed in latest beta driver

    C++ DX11

    Saturday, July 14, 2012 9:30 AM