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

NullReferenceException in ClassifierTagger #1

Open
mrward opened this issue May 6, 2022 · 0 comments
Open

NullReferenceException in ClassifierTagger #1

mrward opened this issue May 6, 2022 · 0 comments

Comments

@mrward
Copy link
Owner

mrward commented May 6, 2022

Seeing this in VS Mac 17.1.

Failed assertion: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.GetTags(NormalizedSnapshotSpanCollection spans)+MoveNext() in /Users/runner/work/1/s/src/Editor/Text/Impl/ClassificationAggregator/ClassifierTagger.cs:line 38
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GetTagsForBuffer(NormalizedSnapshotSpanCollection snapshotSpans, BufferState taggersForBuffer, ITextSnapshot root, Nullable`1 cancel)+MoveNext() in /Users/runner/work/1/s/src/Editor/Text/Impl/TagAggregator/TagAggregator.cs:line 494
   at Microsoft.VisualStudio.Editor.Implementation.ExtensionErrorHandler.Fail(System.String message)
   at Microsoft.VisualStudio.Editor.Implementation.ExtensionErrorHandler.HandleError(System.Object sender, System.Exception exception)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.HandleException(System.Object errorSource, System.Exception e)
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1+<GetTagsForBuffer>d__49.MoveNext()
   at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierAggregator.InternalGetClassificationSpans(SnapshotSpan span, IEnumerable`1 tags)
   at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierAggregator.GetClassificationSpans(SnapshotSpan span)
   at Microsoft.VisualStudio.Text.Formatting.Implementation.CocoaNormalizedSpanGenerator.CreateClassifiedRuns(SnapshotSpan span, IAccurateClassifier classifier, ICocoaClassificationFormatMap classificationFormatMap, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Formatting.Implementation.CocoaNormalizedSpanGenerator.Create(ITextAndAdornmentCollection elements, ITextSnapshot sourceSnapshot, IAccurateClassifier classifier, ICocoaClassificationFormatMap classificationFormatMap, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Formatting.Implementation.CocoaFormattedLineSource.Microsoft.VisualStudio.Text.Formatting.ICocoaFormattedLineSource.FormatLineInVisualBuffer(ITextSnapshotLine visualLine, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.FormatSnapshotLine(ITextSnapshotLine visualLine, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView+LayoutLineCache.DoAnchorFormat(SnapshotPoint anchorPosition, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.DoAnchorLayout(Microsoft.VisualStudio.Text.Editor.Implementation.LayoutDescription layout, SnapshotPoint anchorPosition, Double verticalDistance, Double topToBaselineDistance, ViewRelativePosition relativeTo, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop, Nullable`1 cancel)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.AdvanceSnapshot(Microsoft.VisualStudio.Text.TextSnapshotChangedEventArgs e)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.AdvanceSnapshotOnUIThread(Microsoft.VisualStudio.Text.TextSnapshotChangedEventArgs e)
   at Microsoft.VisualStudio.Text.Editor.Implementation.BaseTextView.OnVisualBufferChanged(System.Object sender, Microsoft.VisualStudio.Text.TextContentChangedEventArgs e)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(System.Object sender, System.EventHandler`1 eventHandlers, Microsoft.VisualStudio.Text.Utilities.TArgs args)
   at Microsoft.VisualStudio.Text.Implementation.BaseBuffer.RawRaiseEvent(Microsoft.VisualStudio.Text.TextContentChangedEventArgs args, Boolean immediate)
   at Microsoft.VisualStudio.Text.Implementation.BaseBuffer+TextContentChangedEventRaiser.RaiseEvent(Microsoft.VisualStudio.Text.Implementation.BaseBuffer baseBuffer, Boolean immediate)
   at Microsoft.VisualStudio.Text.Implementation.BufferGroup.RaiseEvents()
   at Microsoft.VisualStudio.Text.Implementation.BufferGroup.FinishEdit()
   at Microsoft.VisualStudio.Text.Implementation.BaseBuffer+TextBufferEdit.Apply()
   at Microsoft.VisualStudio.Components.ConsoleViewController.WriteOutput(System.String text, Boolean allowEditing)
   at Microsoft.VisualStudio.Components.ConsoleViewController.WriteOutput(System.String text)
   at MonoDevelop.CSharpInteractive.CSharpInteractivePad.CreateConsoleView()
   at MonoDevelop.CSharpInteractive.CSharpInteractivePad.Initialize(IPadWindow window)
   at MonoDevelop.Ide.Gui.PadContent.Init(IPadWindow window)
   at MonoDevelop.Ide.Codons.PadCodon.InitializePadContent(IPadWindow window)
   at VisualStudioMac.UI.Pads.PadManager.CreatePadContent(Boolean force, MonoDevelop.Ide.Codons.PadCodon padCodon, VisualStudioMac.UI.Pads.PadWindow window, IDockItem item)
   at VisualStudioMac.UI.Pads.PadWindow.OnContentRequested()
   at VisualStudioMac.UI.Docking.DockItem.<get_Content>g__CreatePadContent|57_0()
   at VisualStudioMac.UI.Docking.DockItem.get_Content()
   at VisualStudioMac.UI.Docking.DockItem.LoadView()
   at System.RuntimeMethodHandle.InvokeMethod(System.Object target, Span`1 ByRef arguments, System.Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
   at ObjCRuntime.Runtime.InvokeMethod(System.Reflection.MethodBase method, System.Object instance, IntPtr native_parameters)
   at ObjCRuntime.Runtime.InvokeMethod(ObjCRuntime.MonoObject* methodobj, ObjCRuntime.MonoObject* instanceobj, IntPtr native_parameters)
   at ObjCRuntime.Runtime.bridge_runtime_invoke_method(ObjCRuntime.MonoObject* method, ObjCRuntime.MonoObject* instance, IntPtr parameters, IntPtr ByRef exception_gchandle)
   at ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper(IntPtr receiver, IntPtr selector)
   at ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper(IntPtr receiver, IntPtr selector)
   at AppKit.NSViewController.get_View()
   at VisualStudioMac.UI.Docking.DockItemViewController..ctor(IDockFrame dockFrame, VisualStudioMac.UI.Docking.Model.DockLayoutItem dockObject, VisualStudioMac.UI.Docking.DockItem dockItem, Boolean createTabBar)
   at VisualStudioMac.UI.Docking.DockFrame.CreateViewControllerForItem(VisualStudioMac.UI.Docking.Model.DockLayoutItem o, IDockItem item)
   at VisualStudioMac.UI.Docking.DockFrame.LoadRecursive(VisualStudioMac.UI.Docking.Model.DockLayoutGroup group, System.Collections.Generic.List`1 controllers, System.Collections.Generic.List`1 dockBarItems)
   at VisualStudioMac.UI.Docking.DockFrame.LoadRecursive(VisualStudioMac.UI.Docking.Model.DockLayoutGroup group, System.Collections.Generic.List`1 controllers, System.Collections.Generic.List`1 dockBarItems)
   at VisualStudioMac.UI.Docking.DockFrame.LoadRecursive(VisualStudioMac.UI.Docking.Model.DockLayoutGroup group, System.Collections.Generic.List`1 controllers, System.Collections.Generic.List`1 dockBarItems)
   at VisualStudioMac.UI.Docking.DockFrame.LoadRecursive(VisualStudioMac.UI.Docking.Model.DockLayoutGroup group, System.Collections.Generic.List`1 controllers, System.Collections.Generic.List`1 dockBarItems)
   at VisualStudioMac.UI.Docking.DockFrame.LoadLayout(VisualStudioMac.UI.Docking.Model.DockLayoutModel layout)
   at VisualStudioMac.UI.Docking.DockFrame.LayoutChangedHandler(System.Object sender, VisualStudioMac.UI.Docking.LayoutChangedEventArgs args)
   at VisualStudioMac.UI.Docking.LayoutManager.set_CurrentLayout(System.String value)
   at VisualStudioMac.CocoaWorkbenchController.set_CurrentLayout(System.String value)
   at MonoDevelop.Ide.Gui.Workbench.SetCurrentLayout(System.String name)
   at MonoDevelop.Ide.Gui.Workbench.EnsureLayout()
   at MonoDevelop.Ide.Gui.Workbench.Present()
   at MonoDevelop.Ide.RootWorkspace+<OpenWorkspaceItem>d__109.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start(System.Runtime.CompilerServices.TStateMachine ByRef stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start(System.Runtime.CompilerServices.TStateMachine ByRef stateMachine)
   at MonoDevelop.Ide.RootWorkspace.OpenWorkspaceItem(FilePath file, Boolean closeCurrent, Boolean loadPreferences, MonoDevelop.Ide.OpenWorkspaceItemMetadata metadata)
   at MonoDevelop.Ide.RootWorkspace.OpenWorkspaceItem(FilePath file, Boolean closeCurrent, Boolean loadPreferences)
   at MonoDevelop.Ide.RootWorkspace.OpenWorkspaceItem(FilePath file, Boolean closeCurrent)
   at MonoDevelop.Ide.RootWorkspace.OpenWorkspaceItem(FilePath file)
   at MonoDevelop.Ide.Projects.NewProjectDialogController+<OpenCreatedSolution>d__162.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start(System.Runtime.CompilerServices.TStateMachine ByRef stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start(System.Runtime.CompilerServices.TStateMachine ByRef stateMachine)
   at MonoDevelop.Ide.Projects.NewProjectDialogController.OpenCreatedSolution(MonoDevelop.Ide.Templates.ProcessedTemplateResult templateResult)
   at MonoDevelop.Ide.Projects.NewProjectDialogController+<Create>d__143.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1.MoveNext(System.Threading.Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation+<>c.<.cctor>b__17_0(System.Object state)
   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task ByRef currentTask)
   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run(System.Threading.Tasks.Task task, Boolean canInlineContinuationTask)
   at System.Threading.Tasks.Task.RunContinuations(System.Object continuationObject)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(System.Threading.Tasks.Task`1 task, System.Runtime.CompilerServices.TResult result)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult()
   at MonoDevelop.Ide.ProjectOperations+<SaveAsyncInternal>d__49.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1.MoveNext(System.Threading.Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation+<>c.<.cctor>b__17_0(System.Object state)
   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task ByRef currentTask)
   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run(System.Threading.Tasks.Task task, Boolean canInlineContinuationTask)
   at System.Threading.Tasks.Task.RunContinuations(System.Object continuationObject)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(System.Threading.Tasks.Task`1 task, System.Runtime.CompilerServices.TResult result)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult()
   at MonoDevelop.Projects.WorkspaceItem+<>c__DisplayClass39_0+<<SaveAsync>b__0>d.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1.MoveNext(System.Threading.Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation+<>c.<.cctor>b__17_0(System.Object state)
   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task ByRef currentTask)
   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run(System.Threading.Tasks.Task task, Boolean canInlineContinuationTask)
   at System.Threading.Tasks.Task.RunContinuations(System.Object continuationObject)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(System.Threading.Tasks.Task`1 task, System.Runtime.CompilerServices.TResult result)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult()
   at MonoDevelop.Projects.Solution+<OnSaveUserProperties>d__78.MoveNext()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1.MoveNext(System.Threading.Thread threadPoolThread)
   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation+<>c.<.cctor>b__8_0(System.Object state)
   at Foundation.NSAsyncSynchronizationContextDispatcher.Apply()
   at System.RuntimeMethodHandle.InvokeMethod(System.Object target, Span`1 ByRef arguments, System.Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
   at ObjCRuntime.Runtime.InvokeMethod(System.Reflection.MethodBase method, System.Object instance, IntPtr native_parameters)
   at ObjCRuntime.Runtime.InvokeMethod(ObjCRuntime.MonoObject* methodobj, ObjCRuntime.MonoObject* instanceobj, IntPtr native_parameters)
   at ObjCRuntime.Runtime.bridge_runtime_invoke_method(ObjCRuntime.MonoObject* method, ObjCRuntime.MonoObject* instance, IntPtr parameters, IntPtr ByRef exception_gchandle)
   at AppKit.NSApplication.NSApplicationMain(Int32 argc, System.String[] argv)
   at AppKit.NSApplication.NSApplicationMain(Int32 argc, System.String[] argv)
   at AppKit.NSApplication.Main(System.String[] args)
   at VisualStudioMac.MainClass.Main(System.String[] args)
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

1 participant