Visual Studio Crashes when Debugger Stops

Sysprogs forums Forums VisualGDB Visual Studio Crashes when Debugger Stops

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #33650
    kurt123
    Participant

    Hi there,

    I am experiencing an issue where every time I stop my Visual GDB debugger, Visual Studio crashes and immediately restarts. I am running VisualGDB Embedded Edition (version 5.6R9 build 4777), Visual Studio Community 2022 (version 17.4.3), and a Segger J-Link ARM V11.00.

    I’ve tried reinstalling Visual GDB (including the previous version) but have had no success.

    Also, here is the output from the end of my log file:

    [   82396 ms] ~"The target is not responding to interrupt requests.\nStop debugging it? "
    [   82396 ms] ~"(y or n) [answered Y; input not from terminal]\n"
    [   82397 ms] =thread-exited,id="1",group-id="i1"
    [   82397 ms] =thread-group-exited,id="i1"
    [   82397 ms] &"Disconnected from target.\n"
    [  118461 ms] &"Quit\n"

    Does anyone have any thoughts on how I should go about fixing this? I would greatly appreciate the help.

    Thank you,

    Kurt

    #33651
    support
    Keymaster

    No problem, please try attaching a debugger to the devenv.exe process and capturing a stack trace of the crash as shown here:  https://visualgdb.com/support/callstack

    #33687
    kurt123
    Participant

    Hi there,

    Here is the Visual Studio call stack just before the crash, when Visual Studio hangs. Sorry for the delay.

     

    >	System.dll!System.Collections.Generic.Stack<System.Windows.DependencyObject>.Push(System.Windows.DependencyObject item)	Unknown
     	PresentationFramework.dll!System.Windows.FrameworkElement.InvalidateAutomationAncestorsCoreHelper(System.Collections.Generic.Stack<System.Windows.DependencyObject> branchNodeStack, out bool continuePastCoreTree, bool shouldInvalidateIntermediateElements)	Unknown
     	PresentationCore.dll!MS.Internal.UIElementHelper.InvalidateAutomationAncestors(System.Windows.DependencyObject o)	Unknown
     	PresentationCore.dll!System.Windows.UIElement.Arrange(System.Windows.Rect finalRect)	Unknown
     	PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout()	Unknown
     	PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg)	Unknown
     	PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()	Unknown
     	PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget)	Unknown
     	PresentationCore.dll!System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(object resizedCompositionTarget)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)	Unknown
     	WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()	Unknown
     	WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()	Unknown
     	WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()	Unknown
     	WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown
     	WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown
     	WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)	Unknown
     	WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)	Unknown
     	WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)	Unknown
     	PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox)	Unknown
     	PresentationFramework.dll!System.Windows.Window.ShowDialog()	Unknown
     	VisualGDBPackage2022.dll!oz2.y.a(System.Windows.Window a)	Unknown
     	VisualGDBPackage2022.dll!oz2.o5(System.Windows.Window a)	Unknown
     	VisualGDBCore.dll!d12.i1(wi3 b, string e, bool a, System.Threading.EventWaitHandle d, System.TimeSpan c, ref bool f)	Unknown
     	VisualGDBCore.dll!wi3.i1_2(string b, bool a, System.Threading.EventWaitHandle d, System.TimeSpan c)	Unknown
     	VisualGDBCore.dll!wi3.m8(int a)	Unknown
     	VisualGDBCore.dll!wi3.t7(bool c, string b, object[] a)	Unknown
     	VisualGDBCore.dll!h21.c1.j1(h21.c1.x2 a, bool b, h21.c1.m2 c)	Unknown
     	VisualGDBCore.dll!d12.b2.l(bool a, h21.c1.m2 b)	Unknown
     	VisualGDBCore.dll!d12.b2.n.d()	Unknown
     	VisualGDBPackage2022.dll!ld3.Delete()	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)	Unknown
     	mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext)	Unknown
     	VisualGDBCore.dll!wi3.m8(int a)	Unknown
     	VisualGDBCore.dll!dn2.Dispose()	Unknown
     	VisualGDBCore.dll!d12.Dispose()	Unknown
     	VisualGDBPackage2022.dll!VisualGDB.GDBDebugEngine.k(bool c, VisualGDB.GDBDebugEngine.u1 a, VisualGDB.GDBDebugEngine.h1 b, yx1 d)	Unknown
     	VisualGDBPackage2022.dll!VisualGDB.GDBDebugEngine.t(q03 b, bool a)	Unknown
     	VisualGDBPackage2022.dll!q03.Terminate()	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(object parameter)	Unknown
     	PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated)	Unknown
     	PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick()	Unknown
     	PresentationFramework.dll!System.Windows.Controls.Button.OnClick()	Unknown
     	Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsButton.OnClick()	Unknown
     	PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e)	Unknown
     	PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)	Unknown
     	PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)	Unknown
     	PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)	Unknown
     	PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent)	Unknown
     	PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e)	Unknown
     	PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)	Unknown
     	PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)	Unknown
     	PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)	Unknown
     	PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)	Unknown
     	PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args)	Unknown
     	PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()	Unknown
     	PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input)	Unknown
     	PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport)	Unknown
     	PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel)	Unknown
     	PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown
     	PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown
     	WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)	Unknown
     	WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)	Unknown
     	WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)	Unknown
     	WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)	Unknown
     	WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)	Unknown
    • This reply was modified 1 year, 10 months ago by kurt123.
    #33689
    support
    Keymaster

    Hi,

    This doesn’t look like a crash – it looks like you are ending the GDB session, VisualGDB sees that gdb is not responding, and shows the “GDB Command Timeout” window.

    Did you obtain this call stack by manually pausing the VS process (Debug->Break all), or did it stop with an exception? In the latter case, could you share the full exception message?

    #33693
    kurt123
    Participant

    Hi,

    You are correct. I end the GDB session and the GDB exit command times out. When I click “stop debugging” to forcibly end the debugger, that’s when the crash happens. For the previous stack trace I manually paused Visual Studio on the timeout message.

    I would like to get the VS stack trace after I press “stop debugging”, but the VS instance doesn’t halt, meaning that the second VS instance never gets a chance to get the threads/call stack.

    I’ve attached a picture of the error message, too.

    What are your thoughts on this?

     

    Attachments:
    You must be logged in to view attached files.
    #33695
    kurt123
    Participant

    Update: enabling “asynchronous GDB mode” might have fixed the crashing. This is odd though since I’m using an embedded application and the note about async mode says that embedded environments don’t support async mode.

    #33696
    kurt123
    Participant

    Enabling “asynchronous GDB mode” did not fix it 🙃

    #33706
    support
    Keymaster

    If the inner VS instance crashes without reporting anything to the outer one, you have likely selected an incorrect debug engine when attaching the outer VS instance to it.

    Please try selecting both “Native” and “Managed (.Net 4.x)” as the debug engines in the Attach dialog. This should catch crashes caused by both managed and native code.

    #33754
    kurt123
    Participant

    Sorry for the slow update here.

    I resolved the issue by re-cloning my git repository. I’m guessing there is a VS/Visual GDB config file somewhere that is not being tracked.

    #33755
    support
    Keymaster

    No worries and thanks for the update. If resetting the repository solved the issue, it was likely caused by corrupt VS-level or VisualGDB-level cache (although VisualGDB-level issues are usually visible on the call stack).

    Either way, if you weird intermittent behavior again, you can simply try deleting the .vs and .visualgdb subdirectories – it should have the same effect as re-cloning the repository, but you won’t need to do a full rebuild.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.