0

I have a MVC5 app using Entity Framework code-first. It has been fine, working for months while I develop it. This morning it worked fine too. Then suddenly I run it for the 10th time of the day, and it won't run. I'm getting a crazy set of errors that aren't consistent.

First off it said it couldn't find mscorlib.pdb. I researched that and downloaded the latest symbols (first place didn't have it, second place did), and now I have the pdb. But I continue to get errors whenever I try to access the DB. I have seen entityframework.dll and mscorlib.dll mentioned, but very little info is given because it usually just says:

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

{Cannot evaluate expression because the current thread is in a stack overflow state.}

I did try to turn on stepping and then I get this file box that is asking me to find files, that I have no idea where they are. The first time, it asked me for enumerable.cs, the second was RType.cs, and the third was IPipelineRuntime.cs. It tries to look in a very obscure folder structure (f:\dd\ndp\clr\src\BCL\System\RtType.cs) but I don't have these files on my machine.

Suddenly none of my projects are working that need EF. I even created a brand new project, with a simple code-first model to try it out and got the same issue.

Please help!

mgordon12
  • 41
  • 1
  • 4
  • Have you restarted your computer? – JARRRRG Jun 14 '14 at 18:55
  • Haven't you enabled source stepping by mistake? http://stackoverflow.com/questions/8139269/how-do-you-enable-enable-net-framework-source-stepping – rene Jun 14 '14 at 19:20
  • I have restarted the computer a few times. I enabled source stepping to see if I could get more info, but now I've unchecked that. But I'm still getting a "find source" popup box whenever I try to initiate the database model. The latest popup is looking for Dictionary.cs – mgordon12 Jun 14 '14 at 21:56
  • And now everytime I run the project it brings up IPipelineRuntime.cs with an error and says: + $exception {Cannot evaluate expression because the current thread is in a stack overflow state.} System.Exception {System.StackOverflowException} – mgordon12 Jun 14 '14 at 22:02
  • UPdate: I was able to download the basic Contoso University test app and it worked. When I run the web app, the home page loads up fine. It also drops and recreates the main DB with seeded data. But it doesn't drop and recreate the Member Database (I'm using the basic Individual User authentication that is created when you create a new MVC5 project in VS2013. What is weird to me is that when it hangs and gives me these mscorlib.dll or system.web.dll errors, it always hangs in code in my schoolcontext.cs file at: – mgordon12 Jun 15 '14 at 16:39
  • public SchoolContext() : base("SchoolContext") {} – mgordon12 Jun 15 '14 at 16:40

1 Answers1

0

Answer found. I kept reading on other issues where a lot of people were saying that it was due to someone's own code and not a system issue.

I used the datemodified stamp of the files to determine all the files I had worked on in the few days leading up to the issue.

I went back through and began removing them one by one, and discovered the issue. It was my own recursive code.

mgordon12
  • 41
  • 1
  • 4