-1

Has anyone else ever seen this happen? I've had Visual Studio crash over and over again when typing in an object initializer: https://msdn.microsoft.com/en-us/library/bb384062.aspx

I suspect it's some kind of Intellisense bug, since it seems to occur only when the space or period key is pressed. I'm really curious what's triggering the sudden and reproducible crash and if there's any patches or workaround to prevent it from occurring.

enter image description here

The image shows where the cursor is when typing within the first set of brackets. This code appears in a method, which implements an interface member for the class.

Triynko
  • 18,766
  • 21
  • 107
  • 173
  • Your image has very low contrast and is hard to read - you should just type it in as text. I tried this locally (with VS 2013 SP 5) and didn't get a crash. Do you have any custom editor addons that may play a role in it? – xxbbcc Jan 17 '16 at 18:39
  • The image was taken at the time of crash, when Visual Studio greyed itself out and showed the crash dialog. There are about 20 extensions installed. Only 1 can be disabled, the rest have the option grayed out or only have an Uninstall option. It's something context-sensitive. That's why I'm asking to see if anyone has pinpointed what context this occurs in. For me, it's a member implementing an interface method. Perhaps it crashes trying to resolve members in a nested initializer? – Triynko Jan 17 '16 at 18:52

1 Answers1

0

This appears to have been caused by the "HideShow Comments" extension. I'm still not sure why it occurs, but disabling the plugin stops the crash from occurring and re-enabling the extension causes the crash to occur again. This must be a problem with Visual Studio itself, since it's the only common denominator in all these extension-related crashes.

I attached a debugger and caught the following error:

An unhandled exception of type 'System.NullReferenceException' occurred in HideShow.Implementation. Additional information: Object reference not set to an instance of an object.

Triynko
  • 18,766
  • 21
  • 107
  • 173