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

Attempt to access UI from background thread when event handler shown in intellisense window #4695

Closed
mrward opened this Issue Apr 27, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@mrward
Member

mrward commented Apr 27, 2018

VS Mac 7.5.0.1236

Error while adding overload : [CompletionData: Icon=md-newmethod, DisplayText=FileService_FileRemoved, Description=, CompletionText=FileService_FileRemoved, DisplayFlags=None]
System.InvalidOperationException: Operation not supported in background thread
  at MonoDevelop.Core.Runtime.AssertMainThread () [0x00012] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs:443 
  at MonoDevelop.Ide.Editor.TextEditor.get_IndentationTracker () [0x00000] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs:1529 
  at MonoDevelop.CSharp.Completion.Provider.DelegateCompletionProvider.GetInsertText (System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue] properties, System.String& beforeText, System.String& afterText, System.String& newMethod) [0x00021] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CompletionProvider/DelegateCompletionProvider.cs:411 
  at MonoDevelop.CSharp.Completion.Provider.DelegateCompletionProvider.GetTextChangeAsync (Microsoft.CodeAnalysis.Completion.CompletionItem selectedItem, System.Nullable`1[T] ch, System.Threading.CancellationToken cancellationToken) [0x00000] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CompletionProvider/DelegateCompletionProvider.cs:400 
  at Microsoft.CodeAnalysis.Completion.CommonCompletionProvider.GetTextChangeAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Completion.CompletionItem selectedItem, System.Nullable`1[T] ch, System.Threading.CancellationToken cancellationToken) [0x00000] in /_/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs:93 
  at Microsoft.CodeAnalysis.Completion.CommonCompletionProvider+<TryAddSnippetInvocationPart>d__3.MoveNext () [0x0003c] in /_/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs:55 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 
  at Microsoft.CodeAnalysis.Completion.CommonCompletionProvider+<GetDescriptionAsync>d__2.MoveNext () [0x000d0] in /_/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs:42 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 
  at MonoDevelop.Ide.CodeCompletion.RoslynCompletionData+<CreateTooltipInformation>d__37.MoveNext () [0x000b1] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/RoslynCompletionData.cs:292 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at MonoDevelop.Ide.CodeCompletion.TooltipInformationWindow+<AddOverload>d__11.MoveNext () [0x00036] in /Users/builder/data/lanes/5965/e52c63d9/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs:87 

VS bug #607628

mkrueger added a commit that referenced this issue May 3, 2018

Fixes issue #4695 Attempt to access UI from background thread when
event handler shown in intellisense window

monojenkins added a commit that referenced this issue May 3, 2018

Fixes issue #4695 Attempt to access UI from background thread when ev…
…ent handler shown in intellisense window

mkrueger added a commit that referenced this issue May 3, 2018

Merge pull request #4707 from mono/master-issue4695
Fixes issue #4695 Attempt to access UI from background thread when
@xamarin-release-manager

This comment has been minimized.

Contributor

xamarin-release-manager commented May 3, 2018

Fixed in version 7.6.0.697 (master)

Pull Request #4707 merged by: Mike Krüger
Author: mono
Commit: e593380 (mono/monodevelop)

slluis added a commit that referenced this issue May 9, 2018

Merge pull request #4708 from mono/backport-pr-4707-to-d15-7
[d15-7] Fixes issue #4695 Attempt to access UI from background thread when
@xamarin-release-manager

This comment has been minimized.

Contributor

xamarin-release-manager commented May 9, 2018

Fixed in version 7.5.1.5 (d15-7)

Pull Request #4708 merged by: Lluis Sanchez
Author: mono
Commit: ea63358 (mono/monodevelop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment