microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.52k stars 673 forks source link

Fail to reopen folder file. #7865

Closed ttSpace closed 3 months ago

ttSpace commented 3 months ago

Describe the bug

image

Steps to Reproduce

  1. Open a folder.
  2. Add a python file.
  3. Close the folder and reopen it.

Expected behavior

No error.

Additional context and screenshots

image

``` An error occurred in 'Miscellaneous Files' while attempting to open 'a.py' System.ArgumentNullException: Value cannot be null. Parameter name: serviceProvider at Microsoft.VisualStudio.Shell.PackageUtilities.QueryService(IServiceProvider serviceProvider, Guid serviceGuid) at Microsoft.VisualStudio.Shell.PackageUtilities.QueryService[TService](IServiceProvider serviceProvider) at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.<>c__DisplayClass287_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.d__91`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.d__81.MoveNext() ```

judej commented 3 months ago

Thanks for the report. I coud not repro this on Preview 2. But able to repro on Preview 3

judej commented 3 months ago

moved to vs editor team (#2013032)

judej commented 3 months ago

This issue has been fixed in main-34728.132