469,283 Members | 2,192 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

Visual Studio: StackOverflow

Hi all,

I think I may have created a bit of a problem earlier with some of my
classes....

I *think* that I may have inherited a class that was inheriting that class -
endless loop kinda scenario....although this wasn't built out of no where VS
pops this error up - whats more frustrating is that it does it now every
time i open the project in VS, its gives me an option to debug - yes, to
debug the deveng!!!! I'm not quite that advanced yet ... hehe..

Anyone got any ideas how I might recover my solution/project and get things
working again? I've tried amending the code in the files themselves but it
still fails...

Any help would be really appreciated.

Regards

Rob
Nov 19 '05 #1
23 2379
Step through the debugger and see where it runs away on you...

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Rob Meade" wrote:
Hi all,

I think I may have created a bit of a problem earlier with some of my
classes....

I *think* that I may have inherited a class that was inheriting that class -
endless loop kinda scenario....although this wasn't built out of no where VS
pops this error up - whats more frustrating is that it does it now every
time i open the project in VS, its gives me an option to debug - yes, to
debug the deveng!!!! I'm not quite that advanced yet ... hehe..

Anyone got any ideas how I might recover my solution/project and get things
working again? I've tried amending the code in the files themselves but it
still fails...

Any help would be really appreciated.

Regards

Rob

Nov 19 '05 #2
vs has to load your components to implement intellesence and the
webdesigner. use the debbuger to find the bad component. once you know,
delete your dll's, so vs has nothing to load, then fix the bug in your code.
its bound to be the constructor of one of your objects.

-- bruce (sqlwork.com)

"Rob Meade" <te**************@edaem.bbor> wrote in message
news:Zk*******************@text.news.blueyonder.co .uk...
Hi all,

I think I may have created a bit of a problem earlier with some of my
classes....

I *think* that I may have inherited a class that was inheriting that
class - endless loop kinda scenario....although this wasn't built out of
no where VS pops this error up - whats more frustrating is that it does it
now every time i open the project in VS, its gives me an option to debug -
yes, to debug the deveng!!!! I'm not quite that advanced yet ... hehe..

Anyone got any ideas how I might recover my solution/project and get
things working again? I've tried amending the code in the files
themselves but it still fails...

Any help would be really appreciated.

Regards

Rob

Nov 19 '05 #3
"Bruce Barker" / "Curt_C" wrote ...
use the debbuger


Hi guys,

Many thanks for the replies...I would love to try this, but I dont get given
the opportunity...

"my" code fails to load and initiates the debugger for VS (deveng etc) -
when you choose a debugger (doesn't matter which) - I then get another popup
which says..."disassembly cannot be displayed in run mode"....

This is followed by a popup which says "An unhandled exception of type
system.stackoverflowexception occured in mscorlib.dll.

When something does load its a load of numbers in one column down the page,
some kind of actions by the looks of it in the next, and the nvalues in the
third - I've never ever seen anything like this so have absolutely no idea
what it means...the line it queries is this one:

00000030 mov ebp,eax

Across the top of this page there's a tab which says "Disassembly" -
underneath that there's a drop down with the current value displaying
"System.strig.tochararray"

After closing the debugger VS then just sits there and hangs....I have to
end the process for deveng to get back into windows...
I am completely open to suggestions and advice!

Rob
Nov 19 '05 #4
Set a breakpoint somewhere early (like Page_Load) and step through it to see
whats causing your stack overflow.

"Rob Meade" <te**************@edaem.bbor> wrote in message
news:zZ*******************@text.news.blueyonder.co .uk...
"Bruce Barker" / "Curt_C" wrote ...
use the debbuger


Hi guys,

Many thanks for the replies...I would love to try this, but I dont get
given the opportunity...

"my" code fails to load and initiates the debugger for VS (deveng etc) -
when you choose a debugger (doesn't matter which) - I then get another
popup which says..."disassembly cannot be displayed in run mode"....

This is followed by a popup which says "An unhandled exception of type
system.stackoverflowexception occured in mscorlib.dll.

When something does load its a load of numbers in one column down the
page, some kind of actions by the looks of it in the next, and the nvalues
in the third - I've never ever seen anything like this so have absolutely
no idea what it means...the line it queries is this one:

00000030 mov ebp,eax

Across the top of this page there's a tab which says "Disassembly" -
underneath that there's a drop down with the current value displaying
"System.strig.tochararray"

After closing the debugger VS then just sits there and hangs....I have to
end the process for deveng to get back into windows...
I am completely open to suggestions and advice!

Rob

Nov 19 '05 #5
"Steven Berkovitz" wrote ...
Set a breakpoint somewhere early (like Page_Load) and step through it to
see whats causing your stack overflow.


Argghhhhh!!!

hehe, you are all missing the point! I cannot put any break points in
because its Visual Studio that is dying, ie, I cannot fully open my project
to put a break point in to debug it - its the opening of hte project from
the START page in Visual Studio that causes the problem (well, thats where
it happens, its obviously my code not Visual Studio - but my point is the
same)...

Next! :oD

Rob
Nov 19 '05 #6
Rob Meade wrote:
"Steven Berkovitz" wrote ...
Set a breakpoint somewhere early (like Page_Load) and step through
it to see whats causing your stack overflow.


Argghhhhh!!!

hehe, you are all missing the point! I cannot put any break points in
because its Visual Studio that is dying, ie, I cannot fully open my
project to put a break point in to debug it - its the opening of hte
project from the START page in Visual Studio that causes the problem
(well, thats where it happens, its obviously my code not Visual
Studio - but my point is the same)...


Download the Microsoft Debugging Tools for Windows. (You can find them on
MSDN.) Attach cdb to the aspnet_wp.exe process (or w3wp process) in crash
mode. When the problem happens, it will generate a crash dump that you can
analyze in Windbg to see where the problem is.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #7
"JIMCO Software" wrote ...
Download the Microsoft Debugging Tools for Windows. (You can find them on
MSDN.) Attach cdb to the aspnet_wp.exe process (or w3wp process) in crash
mode. When the problem happens, it will generate a crash dump that you
can analyze in Windbg to see where the problem is.


Hi Jim,

Cheers for the reply, currently downloading it now - sounds a bit
complicated but hopefully I'll get through it - I'll post up any problems I
have/find....

Wish me luck!

Oh, and I had a suggestion from a colleague to just create a new project and
import the various files that I needed for it - sound like a plan or just a
way to recreate the same problem with a new project?

Rob
Nov 19 '05 #8
"JIMCO Software" wrote ...
Download the Microsoft Debugging Tools for Windows. (You can find them on
MSDN.) Attach cdb to the aspnet_wp.exe process (or w3wp process) in crash
mode. When the problem happens, it will generate a crash dump that you
can analyze in Windbg to see where the problem is.


Hi Jim,

OK - installed, I dont have an option to "Attach cdb" but I do have an
option which says "Attach to process..." - I selected the aspnet_wp.exe
one - just to check though - my project has both a Webby part, and a windows
service - is it the same process for the windows service? Because nowt it
happening, VS still just kicks off and then gives me the option to debug
(choice of debuggers etc) - this new thing just sits there and does nowt -
made me think perhaps its attached to the wrong thing?

Regards

Rob
Nov 19 '05 #9
"JIMCO Software" wrote ...
Download the Microsoft Debugging Tools for Windows. (You can find them on
MSDN.) Attach cdb to the aspnet_wp.exe process (or w3wp process) in crash
mode. When the problem happens, it will generate a crash dump that you
can analyze in Windbg to see where the problem is.


I tried attaching it to the "deveng" - when I did that it just sat there, I
found an option that said "Goto unhandled exception" - I clicked that - I
got this in a popup window:

An exception 'System.StackOverflowException' has occurred in DefaultDomain.

However, a debugger that cannot handle the exception type is already
attached to the process.
The debugger in VS did previously give me content - not that I had any idea
what I was looking at - all I get with this is a grey screen - most likely
me not knowing what I'm looking at or what I should be doing with it but I
thought I'd followed your instructions thus far - any ideas Jim?

Thanks in advance for any further help.

Regards

Rob
Nov 19 '05 #10
Rob Meade wrote:
"JIMCO Software" wrote ...
Download the Microsoft Debugging Tools for Windows. (You can find
them on MSDN.) Attach cdb to the aspnet_wp.exe process (or w3wp
process) in crash mode. When the problem happens, it will generate
a crash dump that you can analyze in Windbg to see where the problem
is.


Make sure that aspnet_wp.exe is running. Then go to a command prompt and
change into the directory where you installed the debugger. Run the
following command:

cscript adplus.vbs -crash -pn aspnet_wp.exe -quiet -o c:\aspnetdump

Once you see cdb on the task bar, reproduce your issue. When the stack
overflows, it will cause an AV in the process and it should create a crash
dump in the c:\aspnetdump folder. (Will be a file with a .dmp file
extension.)

Now you just need to open that dump file in Windbg and do a post-mortem
debug.

http://msdn.microsoft.com/library/de...asp?frame=true

If you can't figure it out, put the dump somewhere where I can get to it and
I'll analyze it for you.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #11
"JIMCO Software" wrote ...

Make sure that aspnet_wp.exe is running.
check - I ran up a .net page that works...the exe is running..
Once you see cdb on the task bar, reproduce your issue.
saw the cdb on the task bar, opened VS, clicked on the link to the project.
When the stack overflows, it will cause an AV in the process
AV?
and it should create a crash dump in the c:\aspnetdump folder. (Will be a
file with a .dmp file extension.)
I have three files and a folder in there, but no dump file...loads of text
in the command window too...
Now you just need to open that dump file in Windbg and do a post-mortem
debug.


Not sure that I have the right file Jim :o(

Rob
Nov 19 '05 #12
"JIMCO Software" wrote ...
cscript adplus.vbs -crash -pn aspnet_wp.exe -quiet -o c:\aspnetdump


If I do that, but with devenv.exe instead I then reproduce the problem and
get 5 dump files....
Nov 19 '05 #13
"JIMCO Software" wrote...
If you can't figure it out, put the dump somewhere where I can get to it
and I'll analyze it for you.


I just zipped up the contents of that folder it created and it weighs in at
113mb!!! I can make it available but are you sure you wanna download it?

Rob
Nov 19 '05 #14
Rob,

A few ideas:

1) FIRST: Copy all your project somewhere else as backup.

2) Try deleting the dlls that you have built. You'll still have the source. Then try
to open the project.

3) Try selectively deleting subsets of your pages from your dirs and opening the project.

4) Try importing half your files into a new project and try closing and opening the
project. If that works then try copying in another quarter. Repeat the close and
open. See if you can narrow down to a file that causes the problem.

Rob Meade wrote:
Hi all,

I think I may have created a bit of a problem earlier with some of my
classes....

I *think* that I may have inherited a class that was inheriting that class -
endless loop kinda scenario....although this wasn't built out of no where VS
pops this error up - whats more frustrating is that it does it now every
time i open the project in VS, its gives me an option to debug - yes, to
debug the deveng!!!! I'm not quite that advanced yet ... hehe..

Anyone got any ideas how I might recover my solution/project and get things
working again? I've tried amending the code in the files themselves but it
still fails...

Any help would be really appreciated.

Regards

Rob

Nov 19 '05 #15
"Randall Parker" wrote ...
2) Try deleting the dlls that you have built. You'll still have the
source. Then try to open the project.


Hi Randall,

Thanks for your reply. Its quite coincidental that I just tried this, as
soon as the dll's were gone the project opened again in VS!! It amazes me
that it was reading these at all when in a state of development, its seems
to be too easy to get yourself into one of these "round and round we go"
positions :(

Now all I have to do is try and find out what was going on!

Regards

Rob
Nov 19 '05 #16
"JIMCO Software" wrote ...
Now you just need to open that dump file in Windbg and do a post-mortem
debug.


Didn't have a lot of luck with the Windbg thing, as above, but when I opened
one of the files in notepad I saw this...

---
--- 1st chance DLL_Load exception ----
---------------------------------------------------------------
Sat Oct 29 22:25:55.302 2005 (GMT+1): System.Exception: An exception
occurred while trying to create an instance of
FrontPageHouseKeeper.FrontPageHouseKeeperBase. The exception was "Object
reference not set to an instance of an object.". --->
System.NullReferenceException: Object reference not set to an instance of an
object.
at System.String.ToCharArray(Int32 startIndex, Int32 length)
at System.ServiceProcess.ServiceController.ValidServi ceName(String
serviceName)
at System.ServiceProcess.ServiceBase.set_ServiceName( String value)
at System.ServiceProcess.ServiceBase..ctor()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
at FrontPageHouseKeeper.ApplicationConfiguration..cto r()
at FrontPageHouseKeeper.FrontPageHouseKeeperBase..cto r()
[repeats for a VERY long time]

Not entirely sure where things have gone tits up but at least now, since
deleting the dll's I can open the project to have a look!..

Thanks for your help Jim - appreciated.

Regards

Rob
Nov 19 '05 #17
Rob Meade wrote:
"JIMCO Software" wrote ...
Now you just need to open that dump file in Windbg and do a
post-mortem debug.


Didn't have a lot of luck with the Windbg thing, as above, but when I
opened one of the files in notepad I saw this...


That's it, Rob. You've just found the overflow.

AV means "access violates." That's what causes the process to crash.

If you want to point me to the dumps, I'll be glad to have a look as well,
but you've found the problem.

Keep this skill set handy. There are many times when this type of debugging
is what is required. You're only scratching the very thin surface here.
After a few years of doing it a lot, you can uncover just about any problem
using this method. Not many people know how to do it either. ;)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #18
JIMCO Software wrote:

Didn't have a lot of luck with the Windbg thing, as above, but when I
opened one of the files in notepad I saw this...


Rob,

One more thing. You need to load an extension into windbg to see the
managed stacks. That's all detailed in the link I sent you. If you want
something more high-level, I wrote an MSDN article on it as well:

http://support.microsoft.com/default...B;EN-US;892277

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #19
"JIMCO Software" wrote ...
One more thing. You need to load an extension into windbg to see the
managed stacks. That's all detailed in the link I sent you. If you want
something more high-level, I wrote an MSDN article on it as well:

http://support.microsoft.com/default...B;EN-US;892277


Hi Jim,

Many thanks for all the info and links - I'll check it out.

Ironically, you maybe interested in the app I'm writing - well probably
not - but hey I'll tell you about it anyway :D

We run a clustered web service at work, IIS/Application Center 2000 - and
FPSE's...I'd noticed a while back that when we remove users in the Frontpage
Administration - it removes their permissions, but if you check the
permissions page again they are still listed, just with no access to the
side of it, so I've written a service which will periodically check the
_roles.ini files and correct them, ie remove the lines which have no access
levels granted to them. So far this has been working nicely, in addition
I've added support for an Active Directory lookup so that it will map NT
names to proper names, email addresses, phone numbers, dump them all the SQL
Server which then allows our "Webmasters" page to have a decent lookup.
I've just started expanding it to work on more than 1 web site - which is
when I encountered my lovely error! :o) I should now be able to map the
webiste ID (wsvc1 etc) to its name ("Default Web Site" etc), and then get
the list of Webmasters for each of the sites.

Neat huh - well I think so ;o)

Just thought I'd mention it as I know you write a lot of FP addins and
bobbins :o)

Regards

Rob
Nov 19 '05 #20
Rob Meade wrote:

Ironically, you maybe interested in the app I'm writing - well
probably not - but hey I'll tell you about it anyway :D


Thanks, Rob. Pretty cool.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #21
"JIMCO Software" wrote ...
Thanks, Rob. Pretty cool.


Hopefully so, should I ever get it finished and near the production box! :D

Rob
Nov 19 '05 #22
Another trick in these sitauations:
- backup all project
- delete BIN and OBJ directories
- delete .SUO file

Open in VS your project. It will not try to open any files. Open them step
by step, this way you can determine which file is determining the problem.
Repeat previous steps. Open concerned file in Notepad and Comment ALL (maybe
you already can guess which part is causing the problem and correct it). Then
use binary-search by commenting the first half/second half . then again half
of the half. This way you can find WHAT is causing the problem.

Works well in VS2K3

Pazu

"Rob Meade" wrote:
"Randall Parker" wrote ...
2) Try deleting the dlls that you have built. You'll still have the
source. Then try to open the project.


Hi Randall,

Thanks for your reply. Its quite coincidental that I just tried this, as
soon as the dll's were gone the project opened again in VS!! It amazes me
that it was reading these at all when in a state of development, its seems
to be too easy to get yourself into one of these "round and round we go"
positions :(

Now all I have to do is try and find out what was going on!

Regards

Rob

Nov 19 '05 #23
"Pazu" wrote ...
Another trick in these sitauations:
- backup all project
- delete BIN and OBJ directories
- delete .SUO file


[snip]

Hi Pazu, thanks for your reply and suggestions :o)

Rob
Nov 19 '05 #24

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by marathoner | last post: by
3 posts views Thread by Johnson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.