AvaloniaUI / TemplateStudio

Template Studio accelerates the creation of new Avalonia UI apps using a wizard-based experience.
Other
38 stars 7 forks source link

Avalonia Template Studio large cause of Visual Studio crashes #14

Closed davkean closed 1 year ago

davkean commented 1 year ago

Describe the bug

Our Visual Studio telemetry has captured Avalonia Template Studio as #11 cause of crashes in 17.6.

This is occuring due to this call to Debugger.Break here: https://github.com/AvaloniaUI/TemplateStudio/blob/d19e97591ae3429bc63c0a016aa094a4f6a2d4a9/code/SharedFunctionality.UI/VisualStudio/SolutionWizard.cs#L108.

The underlying exception is the following, however, its hard to know if this is representive as our Watson system is blaming the Debugger.Break. Given this code already tracks the exceptions via telemetry there's no reason to tear down Visual Studio on user machines, please delete this call to Debugger.Break.

   The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.ItemOperations.OpenFile(String FileName, String ViewKind)
   at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.<OpenItemsAsync>d__4.MoveNext() in Microsoft.Templates.UI.VisualStudio.GenShell\VsGenShellUI.cs:line 62
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in F:\dd\ndp\clr\src\BCL\system\runtime\exceptionservices\exceptionservicescommon.cs:line 133
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in F:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.<>c__DisplayClass3_0.<<OpenItems>b__0>d.MoveNext() in Microsoft.Templates.UI.VisualStudio.GenShell\VsGenShellUI.cs:line 42
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in F:\dd\ndp\clr\src\BCL\system\runtime\exceptionservices\exceptionservicescommon.cs:line 133
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in F:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() in D:\a\_work\1\s\src\Microsoft.VisualStudio.Threading\JoinableTask.cs:line 1061
   at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.OpenItems(String[] itemsFullPath) in Microsoft.Templates.UI.VisualStudio.GenShell\VsGenShellUI.cs:line 44
   at Microsoft.Templates.UI.VisualStudio.SolutionWizard.PostGenerationActions() in Microsoft.Templates.UI.VisualStudio\SolutionWizard.cs:line 118
   at Microsoft.Templates.UI.VisualStudio.SolutionWizard.<RunFinishedAsync>d__35.MoveNext() in Microsoft.Templates.UI.VisualStudio\SolutionWizard.cs:line 102

To Reproduce

This is via telemetry, we have no repro steps.

Additional context

No response

About your setup

We see this is all Visual Studio versions from 17.3 onwards.