Share via


An exception has been encountered. This may be caused by an extension - except it isn't

Question

Tuesday, May 28, 2019 1:59 PM

I've had a few of these recently. Looking in the ActivtyLog.xml, I see an error entry like this...

System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation.AsyncCompletionBroker.IsCompletionActive(ITextView textView) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.GetSessions(ITextView textView) at Microsoft.Html.Editor.Completion.HtmlCompletionController.OnTreeUpdateCompleted(Object sender, HtmlTreeUpdatedEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Microsoft.Html.Editor.Tree.HtmlEditorTree.FireOnUpdateCompleted(TreeUpdateType updateType, Boolean fullParse) at Microsoft.Html.Editor.Tree.TreeUpdateTask.ProcessComplexChange(TextChangeContext context) at Microsoft.Html.Editor.Tree.TreeUpdateTask.ProcessChange(TextChangeContext context) at Microsoft.Html.Editor.Tree.TreeUpdateTask.OnTextChanges(List`1 textChanges) at Microsoft.Html.Editor.Tree.HtmlEditorTree.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) End of stack trace from previous location where exception was thrown at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

This looks like part of VS, not an extension.

Anyone know what might be causing this?

VS017 Enterprise, Win7 64-bit Pro

All replies (9)

Wednesday, May 29, 2019 9:52 AM

Hi Mr Yossu,

Welcome to MSDN forum.

Based on the log, it seems that the error occurs while referring html editor. And "Object reference not set to an instance of an object" is a known exception, it often occurs in the code. So please set some breakpoints in your code to find out where this mistake came from.

If possible, could you share more details or screenshots that would help to explain what your issue is?

Look forward to your reply.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Wednesday, May 29, 2019 12:53 PM

Hi Dylan, thanks for your reply.

I'm not sure where you want me to set breakpoints, as far as I can see, the exception was from VS, not form my code. This occurred while I was editing a Razor file, not executing any of my code.

As for screenshots, what do you want me to show you? All I was doing was typing in the text editor, when a message box popped up with the exception, directing me to the activity log for more details.

Thanks again


Thursday, May 30, 2019 8:49 AM

Hi Mr Yossu,

Thank you for feedback.

>> This occurred while I was editing a Razor file, not executing any of my code.

It seems that there is a process running in the background. From the log, it seems to be from the extension ,and it may be monitoring your input constantly. 

Please run visual studio with safe mode to check if the box would be popped up, if it persists, please run visual studio installer as administrator then repair it.

If there is any update information, please feel free to contact us.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Thursday, May 30, 2019 12:43 PM

It seems that there is a process running in the background. From the log, it seems to be from the extension ,and it may be monitoring your input constantly. 

What extension? As far as I can see, the stack trace only mentioned VS code, I didn't see any mention of any extensions.

Also, the problem is intermittent. It can happen a couple of times in a day, or it might not happen for several days. I'd have to run in safe mode for a week before I was confident that it was an extension. Not a very productive way to work.

Any other ideas? Thanks.


Monday, June 3, 2019 1:44 AM

Hi Mr Yossu,

Sorry for delay in reply.

Did you have a try to repair the visual studio?

If it persists, you could report this problem to MS product team through open VS -> click “Report a Problem” in upper right of IDE. And we will appreciate that your patience for waiting the response from the VS Product Team Engineers.

Thank you for understanding.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Wednesday, June 5, 2019 8:29 AM

That's exactly what happens to me using VS 2019 Professional v. 16.1.1.

<entry>
    <record>1150</record>
    <time>2019/06/05 08:12:54.841</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.NullReferenceException: Riferimento a un oggetto non impostato su un&apos;istanza di oggetto.&#x000D;&#x000A;   in Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation.AsyncCompletionBroker.IsCompletionActive(ITextView textView)&#x000D;&#x000A;   in Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.GetSessions(ITextView textView)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Completion.HtmlCompletionController.OnTreeUpdateCompleted(Object sender, HtmlTreeUpdatedEventArgs e)&#x000D;&#x000A;   in System.EventHandler`1.Invoke(Object sender, TEventArgs e)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Tree.HtmlEditorTree.FireOnUpdateCompleted(TreeUpdateType updateType, Boolean fullParse)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Tree.TreeUpdateTask.ProcessComplexChange(TextChangeContext context)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Tree.TreeUpdateTask.ProcessChange(TextChangeContext context)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Tree.TreeUpdateTask.OnTextChanges(List`1 textChanges)&#x000D;&#x000A;   in Microsoft.WebTools.Languages.Html.Editor.Tree.HtmlEditorTree.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A;   in Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)&#x000D;&#x000A; Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione &#x000D;&#x000A;   in Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
  </entry>

Thursday, June 6, 2019 10:06 AM

Hi tedebus,

Sorry for delay in reply.

From this log, I find a similar issue here. Maybe you could clean your component cache of visual studio

https://social.msdn.microsoft.com/Forums/windows/en-US/b0a82b28-1a59-4d10-8e08-1a0486dd2e20/error-on-quoteditor-or-editor-extensionquot?forum=visualstudiogeneral

Hope it can help you.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Thursday, June 6, 2019 12:54 PM

Thanks for that. As it happens, I didn't have a cache in the folder shown there, but I found it in a similar location, so deleted it. I'll see if the problem goes away.

Thanks again


Thursday, June 6, 2019 2:40 PM

Hi Mr Yossu,

Thank you for reply.

If there is any update information, please feel free to contact us.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]