Sysprogs forums › Forums › VisualGDB › Visual Studio Crashes when Debugger Stops
This topic contains 9 replies, has 2 voices, and was last updated by support 5 days, 15 hours ago.
-
AuthorPosts
-
January 9, 2023 at 15:13 #33650
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:
C++123456[ 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
January 9, 2023 at 15:15 #33651No 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
January 12, 2023 at 13:45 #33687Hi there,
Here is the Visual Studio call stack just before the crash, when Visual Studio hangs. Sorry for the delay.
C++123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384> System.dll!System.Collections.Generic.Stack<System.Windows.DependencyObject>.Push(System.Windows.DependencyObject item) UnknownPresentationFramework.dll!System.Windows.FrameworkElement.InvalidateAutomationAncestorsCoreHelper(System.Collections.Generic.Stack<System.Windows.DependencyObject> branchNodeStack, out bool continuePastCoreTree, bool shouldInvalidateIntermediateElements) UnknownPresentationCore.dll!MS.Internal.UIElementHelper.InvalidateAutomationAncestors(System.Windows.DependencyObject o) UnknownPresentationCore.dll!System.Windows.UIElement.Arrange(System.Windows.Rect finalRect) UnknownPresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() UnknownPresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) UnknownPresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() UnknownPresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) UnknownPresentationCore.dll!System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(object resizedCompositionTarget) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) UnknownWindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() UnknownWindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj) Unknownmscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknownmscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknownmscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) UnknownWindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state) UnknownWindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() UnknownWindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() UnknownWindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) UnknownWindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) UnknownWindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) UnknownWindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) UnknownWindowsBase.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) UnknownPresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox) UnknownPresentationFramework.dll!System.Windows.Window.ShowDialog() UnknownVisualGDBPackage2022.dll!oz2.y.a(System.Windows.Window a) UnknownVisualGDBPackage2022.dll!oz2.o5(System.Windows.Window a) UnknownVisualGDBCore.dll!d12.i1(wi3 b, string e, bool a, System.Threading.EventWaitHandle d, System.TimeSpan c, ref bool f) UnknownVisualGDBCore.dll!wi3.i1_2(string b, bool a, System.Threading.EventWaitHandle d, System.TimeSpan c) UnknownVisualGDBCore.dll!wi3.m8(int a) UnknownVisualGDBCore.dll!wi3.t7(bool c, string b, object[] a) UnknownVisualGDBCore.dll!h21.c1.j1(h21.c1.x2 a, bool b, h21.c1.m2 c) UnknownVisualGDBCore.dll!d12.b2.l(bool a, h21.c1.m2 b) UnknownVisualGDBCore.dll!d12.b2.n.d() UnknownVisualGDBPackage2022.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) Unknownmscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext) UnknownVisualGDBCore.dll!wi3.m8(int a) UnknownVisualGDBCore.dll!dn2.Dispose() UnknownVisualGDBCore.dll!d12.Dispose() UnknownVisualGDBPackage2022.dll!VisualGDB.GDBDebugEngine.k(bool c, VisualGDB.GDBDebugEngine.u1 a, VisualGDB.GDBDebugEngine.h1 b, yx1 d) UnknownVisualGDBPackage2022.dll!VisualGDB.GDBDebugEngine.t(q03 b, bool a) UnknownVisualGDBPackage2022.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) UnknownPresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated) UnknownPresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick() UnknownPresentationFramework.dll!System.Windows.Controls.Button.OnClick() UnknownMicrosoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsButton.OnClick() UnknownPresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) UnknownPresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) UnknownPresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) UnknownPresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) UnknownPresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent) UnknownPresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) UnknownPresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) UnknownPresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) UnknownPresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) UnknownPresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) UnknownPresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) UnknownPresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() UnknownPresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) UnknownPresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) UnknownPresentationCore.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) UnknownPresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) UnknownPresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) UnknownWindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) UnknownWindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) UnknownWindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) UnknownWindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) UnknownWindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown-
This reply was modified 2 weeks, 3 days ago by
kurt123.
January 12, 2023 at 13:50 #33689Hi,
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?
January 13, 2023 at 08:46 #33693Hi,
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.January 13, 2023 at 08:57 #33695Update: 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.
January 13, 2023 at 09:27 #33696Enabling “asynchronous GDB mode” did not fix it 🙃
January 16, 2023 at 16:53 #33706If 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.
January 24, 2023 at 12:22 #33754Sorry 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.
January 24, 2023 at 12:26 #33755No 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.
-
This reply was modified 2 weeks, 3 days ago by
-
AuthorPosts
You must be logged in to reply to this topic.