Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After Debugging IDE popup error "Object Reference not set to instance of object"

After diligently working hard on code today I noticed something strange: after ending my debugging session and coming back to my MVC controller I get an actual pop up alert indicating "Object reference not set to an instance of an object". I don't get one, I get a whole cascade of them and VS basically locks up the point of needing a reboot. This seem unusual since I'm not debugging anything and this error is coming up in Visual Studio 2013 itself, not in any code errors or error panels.

What I've done to try to fix this:

  • Refreshed my database on localhost. This did not fix it.
  • Rapidly hit the keyboard shortcut to rebuild the project. This works about 75% of the time.
  • Try to clean the project before the alert cascade show happens. This always fixed it when coupled with a VS restart. If I run the debugger to test my web application it comes back.
  • This does not come back with other projects.

The code function I'm dealing with is related to quizzes - I've created tested the initial quiz taking function as of a week ago, but now I'm working on a "resume quiz" function. So very similar and some shared methods in the controller.

This is pretty much a hard stop for me since my entire IDE is useless for this part of code. Has anyone run into VS itself saying "object reference not set to an instance of an object"?

like image 731
Dreamcasting Avatar asked Oct 31 '22 04:10

Dreamcasting


1 Answers

Updating for those who come to see this later:

  • I don't know exactly what was broken, the devenv log didn't show it.
  • I uninstalled all my extensions and add-ons (just VS Web Essentials, Telerik Testing Studio and Ranorex Test Automation) and then repaired my VS install.
  • Lastly, I updated all frameworks in the project via the "Extensions and Updates" option under Tools in the VS Menu and my problem went away.
like image 75
Dreamcasting Avatar answered Nov 08 '22 07:11

Dreamcasting