The Dreaded Stackoverflow Exception
-
Can anyone help me basically my situation is as follow. I used to develop in .net 3.5 sp1 using visual studio 2008 I was able to run/debug my program without any hassles whatsoever. Then I recently upgraded my solutions to .net framework 4 on visual studio 2010 My programs still run fine but when i try to run it in debug mode i get the following exception in visual studio, An unhandled exception of type 'System.StackOverflowException' occurred If anyone can point me to something i can do or a hotfix for this i would be very happy. My System a Dual CORE CPU 4 Gigs ram running on a 64 bit windows 7 operating system. I do my development inside an XP Pro(32bit) virtual machine (VMware) 2.5 gigs of ram allocated. Many thanks
Chona1171 Web Developer (C#), Silverlight
-
Can anyone help me basically my situation is as follow. I used to develop in .net 3.5 sp1 using visual studio 2008 I was able to run/debug my program without any hassles whatsoever. Then I recently upgraded my solutions to .net framework 4 on visual studio 2010 My programs still run fine but when i try to run it in debug mode i get the following exception in visual studio, An unhandled exception of type 'System.StackOverflowException' occurred If anyone can point me to something i can do or a hotfix for this i would be very happy. My System a Dual CORE CPU 4 Gigs ram running on a 64 bit windows 7 operating system. I do my development inside an XP Pro(32bit) virtual machine (VMware) 2.5 gigs of ram allocated. Many thanks
Chona1171 Web Developer (C#), Silverlight
Unfortunately, this is one of those situations where you're going to have to do a lot of debugging yourself. You're going to have to set breakpoints in your code at strategic locations and start refining from there. Two things: Does this only happen in debug? Have you changed any code when you upgraded?
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Unfortunately, this is one of those situations where you're going to have to do a lot of debugging yourself. You're going to have to set breakpoints in your code at strategic locations and start refining from there. Two things: Does this only happen in debug? Have you changed any code when you upgraded?
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
Yes this only happens when i debug, and the code is a precise exact copy of what I had , aside from the fact that the projects are set to .net framework 4; also setting this back to 3.5 sp1 does not change anything From what i gather this error seems to be loosely related to COM classes that i am using , the second i try to run code associated with that com interop it gives me this error , I got a loader lock warning at the beginning and I told the debugger to ignore it now i am stuck with this stack overflow.
Chona1171 Web Developer (C#), Silverlight
-
Yes this only happens when i debug, and the code is a precise exact copy of what I had , aside from the fact that the projects are set to .net framework 4; also setting this back to 3.5 sp1 does not change anything From what i gather this error seems to be loosely related to COM classes that i am using , the second i try to run code associated with that com interop it gives me this error , I got a loader lock warning at the beginning and I told the debugger to ignore it now i am stuck with this stack overflow.
Chona1171 Web Developer (C#), Silverlight
There's your problem then. The Loader Lock was introduced in VS2005. From MSDN[^]: "The loaderLock managed debugging assistant (MDA) detects attempts to execute managed code on a thread that holds the Microsoft Windows operating system loader lock. Any such execution is illegal because it can lead to deadlocks and to use of DLLs before they have been initialized by the operating system's loader."
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
There's your problem then. The Loader Lock was introduced in VS2005. From MSDN[^]: "The loaderLock managed debugging assistant (MDA) detects attempts to execute managed code on a thread that holds the Microsoft Windows operating system loader lock. Any such execution is illegal because it can lead to deadlocks and to use of DLLs before they have been initialized by the operating system's loader."
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Then why was i able to debug my application in version 2008 and now in 2010 version I cant. Is there any workarounds/hotfixes that will be able to help me ?
Chona1171 Web Developer (C#), Silverlight
.NET 4 is a complete overhaul of .NET rather than an upgrade path from .NET 2. It sounds like the problem's actually in the COM part. Have a read of the link I gave you (specifically the Resolution part) and follow the links in that page.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Can anyone help me basically my situation is as follow. I used to develop in .net 3.5 sp1 using visual studio 2008 I was able to run/debug my program without any hassles whatsoever. Then I recently upgraded my solutions to .net framework 4 on visual studio 2010 My programs still run fine but when i try to run it in debug mode i get the following exception in visual studio, An unhandled exception of type 'System.StackOverflowException' occurred If anyone can point me to something i can do or a hotfix for this i would be very happy. My System a Dual CORE CPU 4 Gigs ram running on a 64 bit windows 7 operating system. I do my development inside an XP Pro(32bit) virtual machine (VMware) 2.5 gigs of ram allocated. Many thanks
Chona1171 Web Developer (C#), Silverlight
You might have to do some searching on the internet. There might be something in your code that causes this error to occur. I found a couple of threads where such issues have been discussed. One was this[^] and the other was with lambda expressions.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick
-
Then why was i able to debug my application in version 2008 and now in 2010 version I cant. Is there any workarounds/hotfixes that will be able to help me ?
Chona1171 Web Developer (C#), Silverlight
It seems you are hell-bent on finding a "fix" for this. Did you consider the possibility that you've been exploiting a bug in the .NET Framework and that bug has now been fixed under .NET 4.0? I can't find a hotfix, for either Visual Studio 2010 or .NET 4.0, for this problem anywhere, other than change your code.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
It seems you are hell-bent on finding a "fix" for this. Did you consider the possibility that you've been exploiting a bug in the .NET Framework and that bug has now been fixed under .NET 4.0? I can't find a hotfix, for either Visual Studio 2010 or .NET 4.0, for this problem anywhere, other than change your code.
A guide to posting questions on CodeProject[^]
Dave KreskowiakNope This problem only occurs when using visual studio 2010 even when setting the project back to 3.5 does not fix it. But nice theory. Again only occurs when debugging if compiled and running outside of debug mode the program runs beautifully, i can live with it but i sure am gonna miss stepping through code
Chona1171 Web Developer (C#), Silverlight
-
Can anyone help me basically my situation is as follow. I used to develop in .net 3.5 sp1 using visual studio 2008 I was able to run/debug my program without any hassles whatsoever. Then I recently upgraded my solutions to .net framework 4 on visual studio 2010 My programs still run fine but when i try to run it in debug mode i get the following exception in visual studio, An unhandled exception of type 'System.StackOverflowException' occurred If anyone can point me to something i can do or a hotfix for this i would be very happy. My System a Dual CORE CPU 4 Gigs ram running on a 64 bit windows 7 operating system. I do my development inside an XP Pro(32bit) virtual machine (VMware) 2.5 gigs of ram allocated. Many thanks
Chona1171 Web Developer (C#), Silverlight
you mentioned that you upgraded from VS 2008 .Net 3.5 to VS 2010 .Net 4.0 and that the problem is in some COM code. Go back and check your reference assemblies. Many reference assemblies have different .dll versions for 3.5 versus 4.0. Be sure you are using the updated assembly. Good luck. Robert Tanenbaum