Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception pops up while editing F# code in Visual Studio 2017, log shows TaskCanceledException #5033

Closed
abelbraaksma opened this issue May 29, 2018 · 6 comments

Comments

@abelbraaksma
Copy link
Contributor

I just received the following exception while editing in Visual Studio 2017, 15.7.2 RTM.

image

Repro steps

No repro, sorry, but it has happened in the past, in which case I always just clicked it away. It seems to be in the same line as other reports (including mine) about deteriorating editing experience where the editor quickly gets slower and slower while using it.

Expected behavior

No exceptions should popup.

Actual behavior

Exception. This is what the ActivityLog shows:

System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at Roslyn.Utilities.TaskExtensions.WaitAndGetResult_CanCallOnBackground[T](Task`1 task, CancellationToken cancellationToken)
   at Roslyn.Utilities.TaskExtensions.WaitAndGetResult[T](Task`1 task, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.ModelComputation`1.WaitForController()
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Session`3.WaitForController()
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.AbstractController`4.WaitForController()
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Controller.ChangeSelection(Action computationAction)
   at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Controller.TryHandleUpKey()
   at Microsoft.CodeAnalysis.Editor.CommandHandlers.SignatureHelpCommandHandler.TryHandleUpKey(UpKeyCommandArgs commandArgs)
   at Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractIntelliSenseCommandHandler.ExecuteCommand(UpKeyCommandArgs args, Action nextHandler, CommandExecutionContext context)
   at Microsoft.VisualStudio.Commanding.CommandHandlerExtensions.ExecuteCommand[T](ICommandHandler commandHandler, T args, Action nextCommandHandler, CommandExecutionContext executionContext)
   at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.<>c__DisplayClass14_1`1.<Execute>b__1()
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
@cartermp
Copy link
Contributor

It looks like something timed out upon attempting to get Signature Help, which unfortunately can mean any number of things (too long to typecheck, too long to do some other work prior to typechecking, etc.)

Based on this and #4718, it seems like you have code that has a shape that is uncommon enough to not have similar issues raised by others, not be covered in manual usage of our own codebase, and stress the tools in some way which hasn't been accounted for.

@abelbraaksma
Copy link
Contributor Author

it seems like you have code that has a shape that is uncommon enough to not have similar issues raised by others

Will it make me famous? :P. Perhaps I can share my desktop or send you (part of) the project that has this behavior (see other thread).

@abelbraaksma
Copy link
Contributor Author

PS: if this happens again, is there a more substantial log that I can switch on and/or send that could help us further (apart from profiling and recording)?

@cartermp
Copy link
Contributor

Not that I'm aware of, unfortunately. The stack trace there is basically saying, "some concurrent work was cancelled", which leads me to believe that a different exception was thrown somewhere else. But without a reliable reproduction, it's impossible to say what part of the tools ends up throwing that exception.

@cartermp
Copy link
Contributor

Given that this is a task being cancelled in Roslyn, my guess is that there was some other error or timeout associated with the action you took. I don't think there is a specific bug that is unrelated to just the general pile of performance issues you have with the F# compiler, Visual Studio, and your codebase 😢

I'll close this out. If you see it repeatedly for something that doesn't appear to be perf-related, please do ping and we can re-open it.

@abelbraaksma
Copy link
Contributor Author

Ok, I'll let you know if that's the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants