VisualGDB hangs when creating new project

Sysprogs forums Forums VisualGDB VisualGDB hangs when creating new project

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #11202
    jmkresse
    Participant

    One of the VisualGDB users here reports that VisualGDB hangs when creating a new project.

    He gets to the step labeled “New Linux Project” , and clicks on “Finish”. A pop-up shows VisualGDB doing a series of steps, and then disappears. At that point, the “New Linux Project” step is still on the screen, and VisualGDB is hung.

    Do you have any ideas on things we can try to figure out what is wrong?

    (Also is there a way to post screenshots on here?)

    Thanks!

     

    #11211
    support
    Keymaster

    Hi,

    If you are using VS2017, this could be caused by the bugs in the AddFilter() API in Visual Studio.

    We are actually experimenting with editing the .vcxproj files directly instead of using the buggy API, so feel free to try this build and let us know if it solves the problem: http://sysprogs.com/files/tmp/VisualGDB-5.3.1.1509.msi

    #11212
    jmkresse
    Participant

    Thanks! I’ll pass that along to that user.

    I don’t think he was using VS2017, though; probably VS2015. I’ll check on that.

    #11213
    support
    Keymaster

    Hi,

    If it was not VS2017, we would recommend attaching another VS instance to the hanging one and checking the call stack of the main thread. This should explain what exactly is causing the delay.

    #11214
    jmkresse
    Participant

    Ok, thanks for the quick reply!

    Would you please explain to me how to do that? I’m not that familiar with VS; most of my experience has been in embedded processors.

    #11215
    support
    Keymaster

    Hi,

    No problem. Please follow the steps below:

    1. Ensure you have exactly 1 instance of Visual Studio running
    2. Start another VS instance
    3. Select Debug->Attach to process
    4. In the process list select devenv.exe (Visual Studio) and in the “types of code to attach” select “automatic”.
    5. Click “Attach”
    6. Click Debug->Break All
    7. Open the Debug->Windows->Threads window, locate the GUI thread and double-click on it
    8. Open the Debug->Windows->Call Stack window, select all frames and copy-paste them here
    #11216
    jmkresse
    Participant

    Thanks! We’ll give that a try.

    #11219
    jmkresse
    Participant

    We tried to follow those steps, but when we got to step 7, we saw 34 threads, but didn’t see a GUI thread. Also, when we tried clicking on a thread, they all just came back with “[External Code]” in the Call Stack window.

    I have screenshots, and can attach them if you tell me how to do that.

    Thanks!

    #11222
    support
    Keymaster

    Hi,

    We have double-checked the window. The GUI thread should have the following attributes set:

    • Both Category and Name should read “Main Thread”
    • The Managed ID should be 1

    In order to get past the “external code” issue, please right-click in the Call Stack window and select “Show External Code”.

    Alternatively you can simply select Debug->Save Dump As, upload the dump file (~1GB) to dropbox and share a link so that we could investigate it on our side.

    #11234
    jmkresse
    Participant

    Thank you for that clarification.

    Here is the frame copy from the Call Stack window:

    >             WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)         Unknown
    
                    mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, 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
    
                   mscorlib.dll!System.Threading.WaitHandle.WaitOne()   Unknown
    
                   VisualGDB.exe!f61.h1.f.a_2()     Unknown
    
                   VisualGDB.exe!f61.x(f61.n2<int> a)        Unknown
    
                   VisualGDB.exe!ir1.Dispose()       Unknown
    
                   VisualGDB.exe!zk1.Dispose()     Unknown
    
                   VisualGDB.exe!kf.a1()   Unknown
    
                   VisualGDB.exe!z61.a1.c(kf a)      Unknown
    
                   VisualGDB.exe!z61.a1.d(string b, string a, z61.a1.h c)      Unknown
    
                   VisualGDB.exe!z61.o(SysprogsDevTools.Commands.RemoteHostSettings a)       Unknown
    
                   VisualGDB.exe!z61.o(SysprogsDevTools.Commands.RemoteHostSettings a)       Unknown
    
                   VisualGDB.exe!m1.i1(bool a)      Unknown
    
                   VisualGDB.exe!m1.t1() Unknown
    
                   VisualGDB.exe!m1.n1_2(gq1.x a)             Unknown
    
                   VisualGDB.exe!hk.b(int a)           Unknown
    
                   VisualGDB.exe!hk.d1()  Unknown
    
                   VisualGDB.exe!hk.e(d8 a, d8.u b)             Unknown
    
                   VisualGDB.exe!d8.g(object b, System.EventArgs a)         Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e)         Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e)          Unknown
    
                    System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)              Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks)     Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)                Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m)          Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m)                Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m)    Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)    Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)         Unknown
    
                   [Native to Managed Transition]
    
                   [Managed to Native Transition]
    
                    System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form)    Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context)    Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context)    Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form)                Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) Unknown
    
                   System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog()             Unknown
    
                   VisualGDB.exe!yj.a_2(wo1 b, string a, string c)   Unknown
    
                   VisualGDBPackage2015.dll!u9<yj>.Execute(object b, int c, ref object[] a, ref object[] e, ref EnvDTE.wizardResult d)                Unknown
    
                   [Native to Managed Transition]
    
                   [Managed to Native Transition]
    
                    Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.ServiceHelper.AddProjectFromSelectedTemplate(Microsoft.VisualStudio.Dialogs.INewProjectDialogData dialog, string projectPath, bool isExclusive)          Unknown
    
                    Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.SVsDialogService.CreateProject(Microsoft.VisualStudio.Dialogs.INewProjectDialogData npdd)    Unknown
    
                    Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.SVsDialogService.InvokeDialog(Microsoft.Internal.VisualStudio.Shell.Interop.VSNEWPROJECTDLGINFO dlgInfo, out string bstrLocation)                Unknown
    
                   [Native to Managed Transition]
    
                   [Managed to Native Transition]
    
                   Microsoft.VisualStudio.Shell.14.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(string verb, object pvaIn, out object pvaOut)              Unknown
    
                   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.MenuItem.InvokeClickAfterRender(object arg)                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!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)                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

     

    #11235
    support
    Keymaster

    Hi,

    Thanks, this looks like the hang is related to VisualGDB. Could you please let us know the exact VisualGDB build (from VisualGDB.exe file properties) so that we could pinpoint this further?

    Please also try manually killing the CppEngineHost.exe process next time the hang happens. If the hang is related to the Clang IntelliSense engine, this should help.

    #11239
    jmkresse
    Participant

    Hi,

    After being able to repeat the issue at will previously, my user was not able to repeat it today. Instead, things glitched at an earlier point, but he was able to recover and work around the issue. For now, given he has a workaround, he doesn’t want to pursue this any further. If (when) that changes, I’ll get back to you.

    For what it’s worth, the version we are using here is 5.2.15.1452.

    Thanks!

    #11243
    support
    Keymaster

    Hi,

    Thanks, according to the stack trace, VisualGDB was stuck waiting for a response from the Linux machine while trying to close an SSH connection. If you run into this problem again, please try updating your SSH server or try a different network connection (e.g. this could be caused by packet loss).

    #11250
    jmkresse
    Participant

    Thanks! That explains why the issue was intermittent; I’m guessing he was hitting network congestion when he had the issue.

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