5

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"?

8
  • 1
    Any change you are using some extensions or productivity tools? There is a tone of bugs in those alone. Commented May 12, 2015 at 16:51
  • You could attempt to get more information from VS by enabling the log. msdn.microsoft.com/en-us/library/ms241272.aspx Commented May 12, 2015 at 16:51
  • @FailedDev Nothing beyond the basic MVC5 template w/bootstrap and jQuery and Entity. I also didn't change any of these or update in the last several weeks. Commented May 12, 2015 at 16:53
  • I would do a "repair" install of Visual Studio before proceeding further - just to baseline things. Commented May 12, 2015 at 16:56
  • 1
    "update all the frameworks ... testing solutions" - could you please tell us what those are? In your question? Commented May 12, 2015 at 18:30

2 Answers 2

1

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.
Sign up to request clarification or add additional context in comments.

Comments

0

Had the same issue with VS2017 and fixed it with

https://stackoverflow.com/a/36056076/3772108

Then I changed the target browser from Chrome to IE. Then F5, wait, stop the whole thing and changed it back to the chrome. Maybe this helps someone too.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.