PoshTools crashes devenv.exe on exit
Issue #177
resolved
Steps to reproduce:
- Open Visual Studio 2017
- Create/edit a PoshTools project
- Save and close the project
- Exit Visual Studio
Observed behavior:
Visual Studio (devenv.exe) turns invisible and hangs for a while (One might think that it exited normally), then crashes. Next time you start Visual Studio, it will display warning saying that PowerShell Tools has crashed previously and will suggest disabling it.
This is the entry from Windows Event Log:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
at Microsoft.Internal.VisualStudio.Shell.Interop.IVsPackageManagerPrivate.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Services.AsyncQueryService.AsyncServiceProvider.<LoadServicePackage>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.AsyncQueryService.AsyncServiceProvider.<GetServiceByGuidThrowing>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.AsyncQueryService.AsyncServiceProvider.<>c__DisplayClass10_0.<<Microsoft-VisualStudio-OLE-Interop-IServiceProvider-QueryService>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Services.AsyncQueryService.AsyncServiceProvider.Microsoft.VisualStudio.OLE.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid, IntPtr& ppvObject)
at EnvDTE80.ToolWindows.get_TaskList()
at PowerShellTools.Classification.PowerShellTokenizationService.LoadTaskListTokens()
at PowerShellTools.Classification.PowerShellTokenizationService+<>c.<StartTaskListThread>b__17_0()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
Visual Studio 2017 version 15.9.15
Windows version 10.0.17763.0
$PSVersionTable:
Name Value
---- -----
PSVersion 5.1.17763.592
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.592
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Comments (2)
-
reporter -
- changed status to resolved
Fixes
#177→ <<cset c6552df9ba18>>
- Log in to comment
I must add, that this can’t be reproduced reliably, but happens quite often.