D1138: Invalid Command List

A command list was referenced that is invalid (an error occurred previously during command list population).

 

Possible Causes

If errors occur during a command list’s population, an application cannot use it for drawing operations or streaming. When the command list is closed, ID2D1CommandList::Close will return an error code to indicate that the command list was not populated correctly. Often, ID2D1RenderTarget::EndDraw or Flush operations used during population will return error codes as well, providing additional information. Issues which cause an error during ID2D1RenderTarget::EndDraw, such as attempting drawing operations that use another domain’s resources or an unclosed path geometry, will typically prevent a command list from successfully closing.

Possible Fixes

To ensure command lists are populated correctly, troubleshoot errors that occur from ID2D1CommandList::Close, and ID2D1RenderTarget::EndDraw or Flush during command list population. Ensure that the application does not ignore the return code from ID2D1CommandList::Close.