locked
Media Foundation Access violation c0000005 exception RRS feed

  • Question

  • We are using media foundation via SharpDX .NET wrapper. And we are randomly getting this error from unmanaged code. Important is to say that this happens at the point when we are stopping couple of videos.

    This is complete output of error from windows dump file:

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

    FAULTING_IP: 
    +0
    7300c9f1 654c            dec     esp

    EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
    ExceptionAddress: 7300c9f1
       ExceptionCode: c0000005 (Access violation)
      ExceptionFlags: 00000000
    NumberParameters: 2
       Parameter[0]: 00000008
       Parameter[1]: 00000000
    Attempt to execute non-executable address 00000000

    CONTEXT:  00000000 -- (.cxr 0x0;r)
    eax=0c9e9328 ebx=00000000 ecx=0c7e005e edx=12e2fb60 esi=0c9f07a8 edi=12e2fbc4
    eip=00000000 esp=12e2fb48 ebp=12e2fbac iopl=0         nv up ei pl nz ac po nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010212
    00000000 ??              ???

    DEFAULT_BUCKET_ID:  WRONG_SYMBOLS

    PROCESS_NAME:  wrapper.exe

    ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

    EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

    EXCEPTION_PARAMETER1:  00000008

    EXCEPTION_PARAMETER2:  00000000

    WRITE_ADDRESS:  00000000 

    FOLLOWUP_IP: 
    mfplat!CMFByteStreamOnStream::GetLength+39
    5e975f75 85c0            test    eax,eax

    FAILED_INSTRUCTION_ADDRESS: 
    +39
    7300c9f1 654c            dec     esp

    NTGLOBALFLAG:  0

    APPLICATION_VERIFIER_FLAGS:  0

    APP:  wrapper.exe

    ANALYSIS_VERSION: 6.3.9600.17336 (debuggers(dbg).150226-1500) x86fre

    MANAGED_STACK: !dumpstack -EE
    OS Thread Id: 0xa50 (34)
    Current frame: 
    ChildEBP RetAddr  Caller, Callee

    PRIMARY_PROBLEM_CLASS:  WRONG_SYMBOLS

    BUGCHECK_STR:  APPLICATION_FAULT_WRONG_SYMBOLS

    LAST_CONTROL_TRANSFER:  from 5e975f75 to 00000000

    STACK_TEXT:  
    WARNING: Frame IP not in any known module. Following frames may be wrong.
    12e2fb44 5e975f75 0c9e9328 12e2fb60 00000001 0x0
    12e2fbac 5e892c2c 0c9f07a8 12e2fbc4 19588c98 mfplat!CMFByteStreamOnStream::GetLength+0x39
    12e2fbd0 5e893e6a 12e2fbf0 00000000 0c9f05c8 mf!MFCreateUrlmonSchemePlugin+0xaea74
    12e2fbfc 5e893f98 00000000 12e2fc18 5e961f7b mf!MFCreateUrlmonSchemePlugin+0xafcb2
    12e2fc08 5e961f7b 054b4a70 0c9f0d48 12e2fd20 mf!MFCreateUrlmonSchemePlugin+0xafde0
    12e2fc18 5e961b3c 0c9f0d48 00000000 00000000 mfplat!CCompletionPort::InvokeCallback+0x12
    12e2fd20 5e968cab 12e2fd60 76a61287 0c9f05c8 mfplat!CWorkQueue::CThread::ThreadMain+0xa5
    12e2fd28 76a61287 0c9f05c8 f0fa0967 00000000 mfplat!CWorkQueue::CThread::ThreadFunc+0xd
    12e2fd60 76a61328 12e2fd74 755733ca 0522a060 msvcrt!_endthreadex+0x44
    12e2fd68 755733ca 0522a060 12e2fdb4 776c9ed2 msvcrt!_endthreadex+0xce
    12e2fd74 776c9ed2 0522a060 6598815d 00000000 kernel32!BaseThreadInitThunk+0xe
    12e2fdb4 776c9ea5 76a612e5 0522a060 00000000 ntdll!__RtlUserThreadStart+0x70
    12e2fdcc 00000000 76a612e5 0522a060 00000000 ntdll!_RtlUserThreadStart+0x1b


    SYMBOL_STACK_INDEX:  1

    SYMBOL_NAME:  mfplat!CMFByteStreamOnStream::GetLength+39

    FOLLOWUP_NAME:  MachineOwner

    MODULE_NAME: mfplat

    IMAGE_NAME:  mfplat.dll

    DEBUG_FLR_IMAGE_TIMESTAMP:  4a5bda38

    STACK_COMMAND:  ~34s; .ecxr ; kb

    FAILURE_BUCKET_ID:  WRONG_SYMBOLS_c0000005_mfplat.dll!CMFByteStreamOnStream::GetLength

    BUCKET_ID:  APPLICATION_FAULT_WRONG_SYMBOLS_BAD_IP_mfplat!CMFByteStreamOnStream::GetLength+39

    ANALYSIS_SOURCE:  UM

    FAILURE_ID_HASH_STRING:  um:wrong_symbols_c0000005_mfplat.dll!cmfbytestreamonstream::getlength

    FAILURE_ID_HASH:  {437113f2-d01f-43e3-70a4-d2128193b3d1}

    Followup: MachineOwner

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

    Does anybody have clue what could be cause for this? It looks like this 

    mfplat!CMFByteStreamOnStream::GetLength+0x39 throws null reference exception.


    Tuesday, March 12, 2019 11:38 AM

All replies

  • The access violation alone is unlikely helpful here. You need to connect this error to specific high level MF related activity. Apparently you are trying to play some media stream, esp. such as network stream or hosted remotely media. So this could get a better guess about certain related violating component. 

    http://alax.info/blog/tag/directshow

    Tuesday, March 12, 2019 12:09 PM