locked
How to track down _com_errors?

    Question

  • I'm trying to write an app in C++ that uses MediaElements, and I keep getting a bunch of _com_errors, like:

    First-chance exception at 0x000007FDA38F89CC in DraftUX.exe: Microsoft C++ exception: _com_error at memory location 0x00000047ABEEE9D0.

    Execution doesn't break, but I'd feel better if I could find & fix what is causing these errors.  I suspect it is something related to my use of MediaElements, given when they crop up.  Does anyone have any suggestions?

    Thanks!

    Cheers,
    Andrea


    Andrea Mantler

    Monday, September 24, 2012 9:18 PM

Answers

  • These are expected. It's common for drivers to return a special error code E_PENDING, or DXGI_ERROR_WAS_STILL_DRAWING from BeginFrame.

    The way D3D runtime handles this is it throws an error and catches it and returns the error code to caller. While debugging developers will see these exceptions being thrown and caught by debugger. Nothing to worry about.

    Monday, July 08, 2013 6:38 PM

All replies

  • If you look at the bottom of the screen there is information on where your program got to.

    There will be a list of functions calls plus some watch data of recently accessed variables.


    n.Wright

    Monday, September 24, 2012 10:39 PM
  • If only that were the case... it's not causing a break, and execution continues.

    (Edit):

    Okay, I turned on Debug -> Exceptions -> C++ Exceptions -> _com_error, and it's giving me the stack trace, but nothing mentions my code.  Looks like it is MediaElement.  Is anyone else having trouble with _com_errors in MediaElement?  Is it related to how we're using it?


    Andrea Mantler


    Monday, September 24, 2012 11:41 PM
  • I have the same problem. I dump the callstack while first exceptions triggered.

    KernelBase.dll!_RaiseException@16() Unknown
    msvcrt.dll!7549d85e() Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for msvcrt.dll]
    d3d11.dll!CDecodeContext::BeginFrame(struct ID3D11VideoDecoderOutputView *,void const *,unsigned int) Unknown
    d3d11.dll!CContext::DecoderBeginFrame(struct ID3D11VideoDecoder *,struct ID3D11VideoDecoderOutputView *,unsigned int,void const *) Unknown
    msmpeg2vdec.dll!50ef482f() Unknown
    msmpeg2vdec.dll!50ee13cf() Unknown
    msmpeg2vdec.dll!50f77fbe() Unknown
    ntdll.dll!77580da8() Unknown
    KernelBase.dll!_WaitForSingleObjectEx@12() Unknown
    KernelBase.dll!_WaitForSingleObject@8() Unknown


    Wednesday, December 26, 2012 9:21 AM
  • Hi,

    Did you find something about the exception raise in BeginFrame ?

    I have the same probleme here when i do this:

    1. Start streaming and display images on the media element
    2. Sart another app or switch to another app for a certain time
    3. Switch back to the streaming app

    When focus is back to the streaming app i receive the exception.

    Thanks,

    Dominic


    Thursday, July 04, 2013 2:42 PM
  • The _com_errors are still a mystery to me.  It would be nice if someone from Microsoft would read & reply...  :(

    Andrea Mantler

    Thursday, July 04, 2013 5:33 PM
  • These are expected. It's common for drivers to return a special error code E_PENDING, or DXGI_ERROR_WAS_STILL_DRAWING from BeginFrame.

    The way D3D runtime handles this is it throws an error and catches it and returns the error code to caller. While debugging developers will see these exceptions being thrown and caught by debugger. Nothing to worry about.

    Monday, July 08, 2013 6:38 PM
  • Thanks Gabriel!

    Andrea Mantler

    Monday, July 08, 2013 6:40 PM