none
How to debug application crash with ExceptionCode: c0000409 (Stack buffer overflow)?

    Question

  • Hallo

    I searched many areas (from google to msdn forum) for the last 1.5 months on application crash with ExceptionCode: c0000409 (Stack buffer overflow) but nothing seems similar to what I have. Most of the queries manged to find something wrong with unmanged string management or wrong parameters.

    Can someone enlighten me on this application crash?

    Program structure:

    Application in WPF C#, main body is RichTexBox; Wrapper for unmanged code and event; C++ usb communication.

    1 unmanged thread will raise a event (callback) whenever a data comes back from USB or COM communication. The callback is being wrapped and using delegate to sent event to the application. The data is then update to the richtextbox via Dispatcher.BeginInvoke

    TextRange tr = new TextRange(rtb.Document.ContentEnd, rtb.Document.ContentEnd);
    tr.Text = message;
    tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Red);
    tr.ApplyPropertyValue(TextElement.FontWeightProperty, FontWeights.Bold);
    rtb.CaretPosition = rtb.CaretPosition.DocumentEnd; //richtextbox caret position to end doc.
    srtb.ScrollToBottom(); // Scroll viewer to scroll to bottom
    

    1 managed thread call a unmanged functions to sent a sequence of data to the communication. Before sending, the function uses similar callback as in the above unmanaged thread to update the Richtextbox.

    Start the application (Debug and Released) through Visual Studio 2010 ok. The crash happen only when run from explorer or when attached to Visual studio.

    Attached below is from WinDBG using attached process and crashed after starting the 2nd thread run: (using info from http://support.microsoft.com/kb/313109/en-gb)

    Is there any info below that could point to the location where some unmanaged string is the culprit?

    The application (x86 based, Win32) crashed on x64 quad core as well as normal 32bit Intel dual core PC.

    Mon Jul 12 16:17:16.324 2010 (UTC + 2:00): (1394.11bc): Break instruction exception - code 80000003 (first chance)
    eax=7ef9d000 ebx=00000000 ecx=00000000 edx=771af4e2 esi=00000000 edi=00000000
    eip=7712000c esp=1971f980 ebp=1971f9ac iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    ntdll!DbgBreakPoint:
    7712000c cc              int     3
    0:010> g
    Mon Jul 12 16:17:39.362 2010 (UTC + 2:00):
    STATUS_STACK_BUFFER_OVERRUN encountered
    Mon Jul 12 16:17:39.362 2010 (UTC + 2:00): (1394.3a8): Break instruction exception - code 80000003 (first chance)
    eax=00000000 ebx=72963b54 ecx=751603dc edx=002ddb41 esi=00000000 edi=00000000
    eip=75160259 esp=002ddd88 ebp=002dde04 iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    KERNEL32!UnhandledExceptionFilter+0x5f:
    75160259 cc              int     3
    0:000> k
    ChildEBP RetAddr 
    002dde04 72963b2f KERNEL32!UnhandledExceptionFilter+0x5f
    002de138 727a5b8c clr!__report_gsfailure+0xe1
    002de140 728130f6 clr!DoJITFailFast+0x8
    002de150 7254fc29 clr!CrawlFrame::SetCurGSCookie+0x1e
    002de160 72510b1a clr!CrawlFrame::GotoNextFrame+0x3d
    002de198 7254fbc8 clr!StackFrameIterator::NextRaw+0x73
    002de1a8 7254f6b3 clr!StackFrameIterator::Next+0x1a
    00000000 00000000 clr!Thread::StackWalkFramesEx+0xc5
    0:000> kb
    ChildEBP RetAddr  Args to Child             
    002dde04 72963b2f 72963b54 c1b9ef1b 3e4610e4 KERNEL32!UnhandledExceptionFilter+0x5f
    002de138 727a5b8c 002de1c8 728130f6 002de1c8 clr!__report_gsfailure+0xe1
    002de140 728130f6 002de1c8 002de1c8 002de198 clr!DoJITFailFast+0x8
    002de150 7254fc29 00000000 00010000 002de1c8 clr!CrawlFrame::SetCurGSCookie+0x1e
    002de160 72510b1a 00010000 002de1c8 002de8bc clr!CrawlFrame::GotoNextFrame+0x3d
    002de198 7254fbc8 002de474 7254fbc8 00000000 clr!StackFrameIterator::NextRaw+0x73
    002de1a8 7254f6b3 72552ea0 1859cb10 72552ea0 clr!StackFrameIterator::Next+0x1a
    00000000 00000000 00000000 00000000 00000000 clr!Thread::StackWalkFramesEx+0xc5
    0:000> dd 72963b54
    72963b54  72b168f8 72b16950 10c025ff 25ff724f
    72963b64  724f10bc 10b825ff 25ff724f 724f10b4
    72963b74  10b025ff 25ff724f 724f10ac 109425ff
    72963b84  1c68724f e872b16c 0000021f 078bc359
    72963b94  0274c085 c783d0ff 0ffe3b04 cf832383
    72963ba4  8bebebff d4b856ff be72963b 72963bd4
    72963bb4  3bf88b57 8b0f73c6 74c08507 83d0ff02
    72963bc4  fe3b04c7 5e5ff172 909090c3 00000000
    0:000> .exr 72b168f8
    ExceptionAddress: 727a5b8c (clr!DoJITFailFast+0x00000008)
       ExceptionCode: c0000409 (Stack buffer overflow)
      ExceptionFlags: 00000001
    NumberParameters: 0
    0:000> .cxr 72b16950
    eax=00000000 ebx=002de1a0 ecx=002de1c8 edx=00000003 esi=002de1c8 edi=00000000
    eip=727a5b8c esp=002de140 ebp=002de150 iopl=0         nv up ei pl nz na po nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
    clr!DoJITFailFast+0x8:
    727a5b8c cc              int     3

    • Edited by HockChow Tuesday, July 13, 2010 2:22 PM remove the information from kv, seems too much numbers. Also, I have modified the code to only update the RichTextbox from the unmanged thread and no update from the manged thread, application still crash. all crash end around clr!DoJITFailFast.
    Monday, July 12, 2010 3:17 PM

Answers

  • Hallo

    After some more searching, found the solution in the blog

    https://blogs.msdn.com/b/dsvc/archive/2009/12/28/investigating-a-gscookie-corruption.aspx

    By adding the __stdcall onto the callback, no more crash.

    Thank you.

    • Marked as answer by HockChow Friday, July 16, 2010 6:20 AM
    Friday, July 16, 2010 6:20 AM

All replies

  • Hallo

    Additional info from windbg using !analyze -v

    It seems that the TextRange set Text property and  ApplyPropertyValue has some limitation. Can someone confirm?

    Also how and where to start hunting for clr!DoJITFailFast and GS cookie?

    Thanks.

    0:000> !analyze -v
    *******************************************************************************
    *                                                                             *
    *                        Exception Analysis                                   *
    *                                                                             *
    *******************************************************************************

    *** WARNING: Unable to verify checksum for C:\p4rj\shared\releases\Hardware Model\2010.4\Bin\unitermwpf.exe
    *** WARNING: Unable to verify checksum for C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\4ff1f12a08d455f195ba996fe77497c6\mscorlib.ni.dll
    *** WARNING: Unable to verify checksum for C:\Windows\assembly\NativeImages_v4.0.30319_32\WindowsBase\f1f3a74eb37b27b7d05b8ffa941f8473\WindowsBase.ni.dll
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\p4rj\shared\releases\Hardware Model\2010.4\Bin\uniusb.dll -
    *** WARNING: Unable to verify checksum for C:\Windows\assembly\NativeImages_v4.0.30319_32\PresentationFramewo#\8357ade60159c25ee88db0aab8686e6d\PresentationFramework.ni.dll
    GetPageUrlData failed, server returned HTTP status 404
    URL requested: http://watson.microsoft.com/00050259.htm?Retriage=1

    FAULTING_IP:
    KERNEL32!UnhandledExceptionFilter+5f
    75e30259 cc              int     3

    EXCEPTION_RECORD:  73a668f8 -- (.exr 0x73a668f8)
    ExceptionAddress: 736f5b8c (clr!DoJITFailFast+0x00000008)
       ExceptionCode: c0000409 (Stack buffer overflow)
      ExceptionFlags: 00000001
    NumberParameters: 0

    FAULTING_THREAD:  000013f8

    PROCESS_NAME:  unitermwpf.exe

    ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION}  Breakpoint  A breakpoint has been reached.

    EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

    EXCEPTION_PARAMETER1:  00000000

    MOD_LIST: <ANALYSIS/>

    NTGLOBALFLAG:  400

    APPLICATION_VERIFIER_FLAGS:  0

    MANAGED_STACK:
    (TransitionMU)
    0036D770 6ECF0AF8 WindowsBase_ni!System.Windows.Threading.PriorityQueue`1[[System.__Canon, mscorlib]].Enqueue(System.Windows.Threading.DispatcherPriority, System.__Canon)+0x30
    0036D788 6ECEDE6C WindowsBase_ni!System.Windows.Threading.Dispatcher.BeginInvokeImpl(System.Windows.Threading.DispatcherPriority, System.Delegate, System.Object, Int32)+0xa0
    0036D7D8 6D346FC1 PresentationFramework_ni!System.Windows.BroadcastEventHelper.AddUnloadedCallback(System.Windows.DependencyObject, System.Windows.DependencyObject)+0x5d
    0036D7F8 6DAB6D01 PresentationFramework_ni!System.Windows.FrameworkContentElement.FireUnloadedOnDescendentsInternal()+0x2d
    0036D808 6DF19A11 PresentationFramework_ni!System.Windows.BroadcastEventHelper.FireUnloadedOnDescendentsHelper(System.Windows.DependencyObject)+0xba8b9d
    0036D814 6D39A50C PresentationFramework_ni!System.Windows.BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent(System.Windows.DependencyObject, System.Windows.DependencyObject, System.Windows.DependencyObject)+0x90
    0036D844 6D3BA10D PresentationFramework_ni!System.Windows.FrameworkContentElement.ChangeLogicalParent(System.Windows.DependencyObject)+0x8d
    0036D858 6DAB6F10 PresentationFramework_ni!System.Windows.FrameworkContentElement.RemoveLogicalChild(System.Object)+0x70
    0036D870 6DF4DB76 PresentationFramework_ni!System.Windows.LogicalTreeHelper.RemoveLogicalChild(System.Windows.DependencyObject, System.Object)+0xb76572
    0036D880 6DF5191C PresentationFramework_ni!System.Windows.Documents.TextContainer.ReparentLogicalChildren(System.Windows.Documents.SplayTreeNode, System.Windows.Documents.SplayTreeNode, System.Windows.DependencyObject, System.Windows.DependencyObject)+0xb6b7f0
    0036D8BC 6DF4D508 PresentationFramework_ni!System.Windows.Documents.TextContainer.ExtractElementInternal(System.Windows.Documents.TextElement, Boolean, ExtractChangeEventArgs ByRef)+0xb77648
    0036D938 6DAC0728 PresentationFramework_ni!System.Windows.Documents.TextElement.Reposition(System.Windows.Documents.TextPointer, System.Windows.Documents.TextPointer)+0x15c
    0036D97C 6DC11E9B PresentationFramework_ni!System.Windows.Documents.TextRangeEdit.SplitElement(System.Windows.Documents.TextPointer)+0x103
    0036D994 6DC11CBC PresentationFramework_ni!System.Windows.Documents.TextRangeEdit.InsertParagraphBreak(System.Windows.Documents.TextPointer, Boolean)+0x1cc
    0036D9B8 6DA9AED6 PresentationFramework_ni!System.Windows.Documents.TextPointer.InsertParagraphBreak()+0x9e
    0036DA00 6DA549D7 PresentationFramework_ni!System.Windows.Documents.TextRangeBase.SetText(System.Windows.Documents.ITextRange, System.String)+0x4e3
    0036DA54 6DA80B25 PresentationFramework_ni!System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.set_Text(System.String)+0x5
    0036DA58 00256395 UNKNOWN!smGuiTools.Uniterm.smsOnEvent(Boolean, System.String)+0xf5
    (TransitionUM)
    (TransitionMU)
    0036E218 71D1D689 mscorlib_ni!System.RuntimeMethodHandle.InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.Signature, System.Reflection.MethodAttributes, System.RuntimeType)+0x49
    0036E26C 71D1D37C mscorlib_ni!System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)+0xfc
    0036E2A8 71D1BCDB mscorlib_ni!System.Delegate.DynamicInvokeImpl(System.Object[])+0x77
    0036E2C0 6EF5AE8A WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)+0x26b34a
    0036E2E0 6ECEFAC2 WindowsBase_ni!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x42
    0036E328 6ECF29B5 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeImpl()+0x8d
    0036E364 6ECF2918 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)+0x38
    0036E36C 71C94DB5 mscorlib_ni!System.Threading.ExecutionContext.runTryCode(System.Object)+0x51
    (TransitionUM)
    (TransitionMU)
    0036E80C 71C94CBA mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x6a
    0036E824 71C97FC2 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0x7e
    0036E848 71C97F34 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x2c
    0036E864 6ECF2848 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.Invoke()+0x68
    0036E8A0 6ECEE57E WindowsBase_ni!System.Windows.Threading.Dispatcher.ProcessQueue()+0x15e
    0036E8E4 6ECEE70F WindowsBase_ni!System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)+0x63
    0036E934 6ECEFDB6 WindowsBase_ni!MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)+0xbe
    0036E980 6ECEFCE5 WindowsBase_ni!MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)+0x7d
    0036E990 6ECEFB93 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)+0x53
    0036E9B0 6ECEFAC2 WindowsBase_ni!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x42
    0036E9F8 6ECEE050 WindowsBase_ni!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)+0xb4
    0036EA40 6ECEF5E0 WindowsBase_ni!MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)+0x104
    (TransitionUM)
    (TransitionMU)
    0036EBC0 6ED08A7C WindowsBase_ni!DomainBoundILStubClass.IL_STUB_PInvoke(System.Windows.Interop.MSG ByRef)+0x3c
    (TransitionUM)
    (TransitionMU)
    0036EC08 6ECED5B5 WindowsBase_ni!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)+0xc1
    0036EC58 6ECED2A1 WindowsBase_ni!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)+0x49
    0036EC64 6ECDFBA0 WindowsBase_ni!System.Windows.Threading.Dispatcher.Run()+0x4c
    0036EC70 6D2ECCBB PresentationFramework_ni!System.Windows.Application.RunDispatcher(System.Object)+0x17
    0036EC7C 6D2EC8FF PresentationFramework_ni!System.Windows.Application.RunInternal(System.Windows.Window)+0x6f
    0036ECA0 6D2EC682 PresentationFramework_ni!System.Windows.Application.Run(System.Windows.Window)+0x26
    0036ECB0 002500A4 unitermwpf!unitermwpf.App.Main()+0x34
    (TransitionUM)

    MANAGED_STACK_COMMAND:  _EFN_StackTrace

    CONTEXT:  73a66950 -- (.cxr 0x73a66950)
    eax=00000000 ebx=0036cec0 ecx=0036cee8 edx=00000003 esi=0036cee8 edi=00000000
    eip=736f5b8c esp=0036ce60 ebp=0036ce70 iopl=0         nv up ei pl nz na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    clr!DoJITFailFast+0x8:
    736f5b8c cc              int     3
    Resetting default scope

    LAST_CONTROL_TRANSFER:  from 738b3b2f to 75e30259

    ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

    BUGCHECK_STR:  APPLICATION_FAULT_STACK_BUFFER_OVERRUN_WRONG_SYMBOLS

    PRIMARY_PROBLEM_CLASS:  STACK_BUFFER_OVERRUN

    DEFAULT_BUCKET_ID:  STACK_BUFFER_OVERRUN

    STACK_TEXT: 
    0036d770 6ecf0af8 windowsbase_ni!System.Windows.Threading.PriorityQueue_1[[System.__Canon,_mscorlib]].Enqueue+0x30
    0036d788 6ecede6c windowsbase_ni!System.Windows.Threading.Dispatcher.BeginInvokeImpl+0xa0
    0036d7d8 6d346fc1 presentationframework_ni!System.Windows.BroadcastEventHelper.AddUnloadedCallback+0x5d
    0036d7f8 6dab6d01 presentationframework_ni!System.Windows.FrameworkContentElement.FireUnloadedOnDescendentsInternal+0x2d
    0036d808 6df19a11 presentationframework_ni!System.Windows.BroadcastEventHelper.FireUnloadedOnDescendentsHelper+0xba8b9d
    0036d814 6d39a50c presentationframework_ni!System.Windows.BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent+0x90
    0036d844 6d3ba10d presentationframework_ni!System.Windows.FrameworkContentElement.ChangeLogicalParent+0x8d
    0036d858 6dab6f10 presentationframework_ni!System.Windows.FrameworkContentElement.RemoveLogicalChild+0x70
    0036d870 6df4db76 presentationframework_ni!System.Windows.LogicalTreeHelper.RemoveLogicalChild+0xb76572
    0036d880 6df5191c presentationframework_ni!System.Windows.Documents.TextContainer.ReparentLogicalChildren+0xb6b7f0
    0036d8bc 6df4d508 presentationframework_ni!System.Windows.Documents.TextContainer.ExtractElementInternal+0xb77648
    0036d938 6dac0728 presentationframework_ni!System.Windows.Documents.TextElement.Reposition+0x15c
    0036d97c 6dc11e9b presentationframework_ni!System.Windows.Documents.TextRangeEdit.SplitElement+0x103
    0036d994 6dc11cbc presentationframework_ni!System.Windows.Documents.TextRangeEdit.InsertParagraphBreak+0x1cc
    0036d9b8 6da9aed6 presentationframework_ni!System.Windows.Documents.TextPointer.InsertParagraphBreak+0x9e
    0036da00 6da549d7 presentationframework_ni!System.Windows.Documents.TextRangeBase.SetText+0x4e3
    0036da54 6da80b25 presentationframework_ni!System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.set_Text+0x5
    0036da58 00256395 unknown!smGuiTools.Uniterm.smsOnEvent+0xf5
    0036e218 71d1d689 mscorlib_ni!System.RuntimeMethodHandle.InvokeMethodFast+0x49
    0036e26c 71d1d37c mscorlib_ni!System.Reflection.RuntimeMethodInfo.Invoke+0xfc
    0036e2a8 71d1bcdb mscorlib_ni!System.Delegate.DynamicInvokeImpl+0x77
    0036e2c0 6ef5ae8a windowsbase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall+0x26b34a
    0036e2e0 6ecefac2 windowsbase_ni!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen+0x42
    0036e328 6ecf29b5 windowsbase_ni!System.Windows.Threading.DispatcherOperation.InvokeImpl+0x8d
    0036e364 6ecf2918 windowsbase_ni!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext+0x38
    0036e36c 71c94db5 mscorlib_ni!System.Threading.ExecutionContext.runTryCode+0x51
    0036e80c 71c94cba mscorlib_ni!System.Threading.ExecutionContext.RunInternal+0x6a
    0036e824 71c97fc2 mscorlib_ni!System.Threading.ExecutionContext.Run+0x7e
    0036e848 71c97f34 mscorlib_ni!System.Threading.ExecutionContext.Run+0x2c
    0036e864 6ecf2848 windowsbase_ni!System.Windows.Threading.DispatcherOperation.Invoke+0x68
    0036e8a0 6ecee57e windowsbase_ni!System.Windows.Threading.Dispatcher.ProcessQueue+0x15e
    0036e8e4 6ecee70f windowsbase_ni!System.Windows.Threading.Dispatcher.WndProcHook+0x63
    0036e934 6ecefdb6 windowsbase_ni!MS.Win32.HwndWrapper.WndProc+0xbe
    0036e980 6ecefce5 windowsbase_ni!MS.Win32.HwndSubclass.DispatcherCallbackOperation+0x7d
    0036e990 6ecefb93 windowsbase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall+0x53
    0036e9b0 6ecefac2 windowsbase_ni!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen+0x42
    0036e9f8 6ecee050 windowsbase_ni!System.Windows.Threading.Dispatcher.InvokeImpl+0xb4
    0036ea40 6ecef5e0 windowsbase_ni!MS.Win32.HwndSubclass.SubclassWndProc+0x104
    0036ebc0 6ed08a7c windowsbase_ni!DomainBoundILStubClass.IL_STUB_PInvoke+0x3c
    0036ec08 6eced5b5 windowsbase_ni!System.Windows.Threading.Dispatcher.PushFrameImpl+0xc1
    0036ec58 6eced2a1 windowsbase_ni!System.Windows.Threading.Dispatcher.PushFrame+0x49
    0036ec64 6ecdfba0 windowsbase_ni!System.Windows.Threading.Dispatcher.Run+0x4c
    0036ec70 6d2eccbb presentationframework_ni!System.Windows.Application.RunDispatcher+0x17
    0036ec7c 6d2ec8ff presentationframework_ni!System.Windows.Application.RunInternal+0x6f
    0036eca0 6d2ec682 presentationframework_ni!System.Windows.Application.Run+0x26
    0036ecb0 002500a4 unitermwpf!unitermwpf.App.Main+0x34


    FOLLOWUP_IP:
    clr!DoJITFailFast+8
    736f5b8c cc              int     3

    SYMBOL_STACK_INDEX:  2

    SYMBOL_NAME:  clr!DoJITFailFast+8

    FOLLOWUP_NAME:  MachineOwner

    MODULE_NAME: clr

    IMAGE_NAME:  clr.dll

    DEBUG_FLR_IMAGE_TIMESTAMP:  4ba1d9ef

    STACK_COMMAND:  _EFN_StackTrace ; ** Pseudo Context ** ; kb

    FAILURE_BUCKET_ID:  STACK_BUFFER_OVERRUN_80000003_clr.dll!DoJITFailFast

    BUCKET_ID:  APPLICATION_FAULT_STACK_BUFFER_OVERRUN_WRONG_SYMBOLS_clr!DoJITFailFast+8

    WATSON_STAGEONE_URL:  http://watson.microsoft.com/00050259.htm?Retriage=1

    Followup: MachineOwner
    ---------

    Tuesday, July 13, 2010 2:12 PM
  • Hallo

    After some more searching, found the solution in the blog

    https://blogs.msdn.com/b/dsvc/archive/2009/12/28/investigating-a-gscookie-corruption.aspx

    By adding the __stdcall onto the callback, no more crash.

    Thank you.

    • Marked as answer by HockChow Friday, July 16, 2010 6:20 AM
    Friday, July 16, 2010 6:20 AM
  •  

    Hello,

    I have come across this c0000409 Exception in my C# app.

    I have a single event-handler that I do some data processing in. The data is coming from attached hardware. 

    Is it possible that if the frequencey of calls to this event-handler are high and the event-handler is taking a long time to process data,  a c0000409 exception can happen? The exception takes sometimes upto 2 days for it to happen, so it is a nasty bug to reproduce.

     

    Tuesday, November 09, 2010 2:00 PM