2

The following is a crash dump produced by my video streaming application written in .NET Core 3.1 with Windows Forms 32-bit. I'm trying to workout how to best interpret this information. I cannot find this dll being referenced anywhere.

Crash dump:
PROCESS_NAME:  Name.exe

EXCEPTION_CODE_STR:  80004005

FAULTING_THREAD:  ffffffff

STACK_TEXT:  
4700eaa4 04a18620 System_Private_CoreLib!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw+0x18
4700eaac 0ee6083c System_Private_CoreLib!System.Threading.ExecutionContext.RunInternal+0xbc
4700eae0 666c328f System_Private_CoreLib!System.Threading.ThreadHelper.ThreadStart+0x22db9d17


STACK_COMMAND:  ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb

SYMBOL_NAME:  System_Private_CoreLib!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw+18

MODULE_NAME: System_Private_CoreLib

IMAGE_NAME:  System.Private.CoreLib.dll

FAILURE_BUCKET_ID:  CLR_EXCEPTION_80004005_System.Private.CoreLib.dll!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw

OS_VERSION:  10.0.19041.1

BUILDLAB_STR:  vb_release

OSPLATFORM_TYPE:  x86

OSNAME:  Windows 10

IMAGE_VERSION:  4.700.22.16002

FAILURE_ID_HASH:  {a19b02e2-e5ea-3965-96bf-e2de5607741e}

Followup:     MachineOwner

Added additional information from WinDbg:

eax=6b82f220 ebx=00000005 ecx=00000005 edx=00000000 esi=e0434352 edi=6b82f2dc
eip=764fb982 esp=6b82f220 ebp=6b82f278 iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000212
KERNELBASE!RaiseException+0x62:
764fb982 8b4c2454        mov     ecx,dword ptr [esp+54h] ss:002b:6b82f274=2213319e
Exception object: 8eff28b0
Exception type:   System.InvalidOperationException
Message:          Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    6B82EE88 182A2633 System_Windows_Forms!System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)+0x2db
    6B82EF0C 182A2242 System_Windows_Forms!System.Windows.Forms.Control.BeginInvoke(System.Delegate, System.Object[])+0x4a
    6B82EF3C 050627FA System_Windows_Forms!System.Windows.Forms.WindowsFormsSynchronizationContext.Post(System.Threading.SendOrPostCallback, System.Object)+0x3a
    6B82EF50 1C19CB69 System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.PostAction(System.Object)+0x71
    6B82EF68 166EACFD System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback, System.Object, System.Threading.Tasks.Task ByRef)+0x3d
    6B82F3CC 05232A40 System_Private_CoreLib!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()+0x18
    6B82F3D4 6AD5BCD7 System_Private_CoreLib!System.Threading.Tasks.Task+<>c.<ThrowAsync>b__139_1(System.Object)+0x17
    6B82F3D8 0543AAD9 System_Private_CoreLib!System.Threading.QueueUserWorkItemCallback+<>c.<.cctor>b__6_0(System.Threading.QueueUserWorkItemCallback)+0x11
    6B82F3DC 0543AAAE System_Private_CoreLib!System.Threading.ExecutionContext.RunForThreadPoolUnsafe[[System.__Canon, System.Private.CoreLib]](System.Threading.ExecutionContext, System.Action`1<System.__Canon>, System.__Canon ByRef)+0x46
    6B82F3F4 0543AA4F System_Private_CoreLib!System.Threading.QueueUserWorkItemCallback.Execute()+0x2f
    6B82F400 24B2DE3B System_Private_CoreLib!System.Threading.ThreadPoolWorkQueue.Dispatch()+0x1db
    6B82F44C 24B2DC45 System_Private_CoreLib!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()+0x5

StackTraceString: <none>
HResult: 80131509
Rafael
  • 1,099
  • 5
  • 23
  • 47
  • duplicate? see [Unable to verify checksum for exe](https://stackoverflow.com/questions/25629962/unable-to-verify-checksum-for-exe) – Neitsa May 03 '22 at 10:07
  • 1
    avformat-58.dll is a file from FFMPEG. It might have been built without debug info. Or you need to configure a symbol server to download symbols from the FFMPEG project, if they provide them. Or you need to build the DLL yourself. Or you just ignore the warning if the crash isn't related to video encoding. – Thomas Weller May 03 '22 at 16:34
  • I didn't realize initially that was just a warning. I guess the real issue is then FAULTING_THREAD: ffffffff ? – Rafael May 03 '22 at 19:57
  • 1
    `EXCEPTION_CODE_STR: 80004005` I think that's unlucky. `0:000> !error 80004005 Error code: (HRESULT) 0x80004005 (2147500037) - Unspecified error` It's used for a lot of stuff. – Thomas Weller May 03 '22 at 20:57
  • Thanks @ThomasWeller It seems the binary crashing is System.Private.CoreLib.dll, which is .NET itself. Will it just mean a missing try/catch block? I'll add a bounty later – Rafael May 04 '22 at 08:52
  • 1
    Before adding a bounty, maybe add some more debugging details. Show that you know your stuff. What does `.ecxr; !pe` say? Are your symbols generally ok? Is it reproducible? If so, what other tools did you use to diagnose? Often, 80004005 is an access denied problem. Did you [reinstall .NET Framework](https://stackoverflow.com/questions/256370/fatal-clr-error-80004005) for a fix? Does it happen with other applications as well? Since it seems to work with FFMPEG, have you tried using application verifier in order to have some basic checks against native buffer overflows (which might corrupt .NET – Thomas Weller May 04 '22 at 09:35
  • 1
    Access denied may come from files not being accessible. Does Process Monitor report something? – Thomas Weller May 04 '22 at 09:36
  • "What does .ecxr; !pe say? Are your symbols generally ok?" I'm not sure how to check these – Rafael May 04 '22 at 16:02
  • The issue is not really reproducible, it appears randomly once every few hours. We are using .NET Core, so I think this is the framework we could reinstall if ever? – Rafael May 04 '22 at 16:04
  • Still no significant research done, questions answered or other tools used. You don't even know how to type `.ecxr; !pe` in WinDbg? What a waste of a bounty... – Thomas Weller May 12 '22 at 12:35
  • That is why I'm asking for help – Rafael May 13 '22 at 12:47
  • @ThomasWeller Could you please guide me on how to type `.ecxr; !pe` on WinDbg? I have already loaded the dmp file – Rafael May 16 '22 at 17:20
  • 1
    You type in the command window, the same way you typed `!analyze -v`. You need to load the SOS extension in order to get .NET support. See https://stackoverflow.com/a/25930140/480982. Type those commands in the command window. Then type `.ecxr; !pe` in the command window – Thomas Weller May 16 '22 at 17:26
  • Thanks Thomas, I have edited my question with the contents of `.ecxr; !pe`. I'm getting a clearer exception message now – Rafael May 17 '22 at 08:45

0 Answers0