-
Notifications
You must be signed in to change notification settings - Fork 17
NullReferenceException leads to disabling of IntelliSense components #75
Copy link
Copy link
Open
Description
Description
The IntelliSenseExtender extension throws a System.NullReferenceException when committing an IntelliSense completion. This error, originating from within the extension, causes a subsequent failure in Visual Studio's internal IntelliSense mechanism, leading to the AggregateTypeCompletionProvider being disabled and a related warning being shown.
Steps to Reproduce
- Install the IntelliSenseExtender extension.
- Write some C# code where IntelliSense completion is triggered.
- Select an item from the IntelliSense suggestions.
- Commit the completion (e.g., by pressing Enter or Tab).
- An error dialog will appear in the Visual Studio UI, and the stack trace for the exception will be logged.
Expected Behavior
The extension should handle IntelliSense completions without throwing exceptions or causing other built-in components to be disabled.
Actual Behavior
After committing a completion, two related error notifications appear:
- UI Warning: 'AggregateTypeCompletionProvider' has encountered an error and has been disabled.
- Stack Trace Error:
Error Message
System.NullReferenceException: Object reference not set to an instance of an object.
at async IntelliSenseExtender.ExposedInternals.LanguageServicesExtensions.GetPlacementOptionsAsync(<Unknown Parameter>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async IntelliSenseExtender.ExposedInternals.LanguageServicesExtensions.AddImportsAsync(<Unknown Parameter>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async IntelliSenseExtender.Editor.NamespaceResolver.AddNamespaceImportAsync(<Unknown Parameter>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async IntelliSenseExtender.IntelliSense.CompletionCommitHelper.GetChangeAsync(<Unknown Parameter>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameter>)
Environment Information
- Visual Studio Version: 17.14.16
- IntelliSenseExtender Version: 1.9.2
- Operating System: Windows 11
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels