1

I'm learning DirectX12 and writing some utility classes to encapsulate functionality. Right now I'm working on mechanism for pooling CommandLists.

The pool assumes all command lists are closed. I wanted to validate that during inserting to the pool, but I can't manage to check it. From MSDN:

Returns S_OK if successful; otherwise, returns one of the following values:

  • E_FAIL if the command list has already been closed, or an invalid API was called during command list recording.

Which is precisely what I'm looking for, but when I call ID3D12GraphicsCommandList::Close() to validate, it throws exception in KernelBase.dll. It looks really bizarre to me. Is this specification incompliance?

//EDIT: I cannot catch the exception, even with catch(...). It tells me maybe something may be wrong with my setup, but everything else is working for me.

Maciej Dziuban
  • 474
  • 3
  • 21
  • What happens if you continue the exception? – Chuck Walbourn Feb 15 '19 at 23:30
  • What do you mean by continuing? Stepping in a debugger? When I press F10, it gives "kernelbase.pdb not loaded" as it tries to step into C:\Windows\System32\KernelBase.dll. – Maciej Dziuban Feb 16 '19 at 19:54
  • Edited my question with clause about being unable to catch the exception – Maciej Dziuban Feb 16 '19 at 19:54
  • It depends on what kind of exception is happening (SEH or C++), but you can get C++ exceptions thrown internally in the DirectX Runtime which are then processed internally and never exit the function. This means if you have 'break on exceptions' set, the debugger can halt but if you continue it works. – Chuck Walbourn Feb 17 '19 at 07:26
  • You're right, they seem to be processed internally, it does not terminate my program, but still, the message box says "Exception Unhandled" even if I disable breaking on all exceptions in Exception Settings. – Maciej Dziuban Feb 17 '19 at 13:19

0 Answers0