Windows Develop Bookmark and Share   
 index > Windows Forms General > How can I get more information on why VS2008 is crashing
 

How can I get more information on why VS2008 is crashing

I am working on a converted VS2005 project and getting random crashes of the VS2008 IDE. Mostly when it is trying to open a source file or designer file, but it also happens for no appearant reason.It happens to frequently to allow me to effectively workon the project, but all I get is the dialogue that sends information to microsoft, giving me no clue what is wrong or what happened.

How can I find out why VS2008 crashes, so I may be able to sort it out and start using the tool.

Martin Koster  Monday, January 21, 2008 1:01 PM

Yeah, most of the time it is :-(

In VS2005 however, the project did not give any problems, and I use try/catch consistently.

Also, ... even if I forgot this construct at a crucial place, the exceptionwould bubble up - shouldn't it. And the IDE could catch it then - right? (well it seems not)

Your answer, however, trigggered a thought. I am using Infragistic components and I know from past experience that upgrading/moving projects alway gives problems with the license files. After fiddling a bit around with emptying cache directories, re-registering the components and using Infragistics upgrade tool (although I was not upgrading the components) my forms seems to behave much better now!!!

Almost no crashes after that :-)

Martin
Martin Koster  Tuesday, January 29, 2008 6:57 AM

There's not been a lot of response to my initial question ...

The crashes seems mostlyto appear when I open a form in the designer for the first time.

Subsequently opening a form after an initial crash isalmost never causing a crashafter that ...

This indicates there's maybe something in the "converted" files that's not behaving as it should be.

Martin Koster  Wednesday, January 23, 2008 11:06 AM

Martin -

I'm going to redirect you to the Windows Forms forum in the hopes that someone there may be able to help with your issue.

StevenPo  Thursday, January 24, 2008 6:24 PM

Hi Martin,

You may follow the steps listed in the blog below to use windbg to get a stack trace of your crash VS IDE:

"How to debug application crash/hang in production environment?"

http://blogs.msdn.com/msdnts/archive/2006/11/24/how-to-debug-application-crash-hang-in-production-environment.aspx

The stack trace is helpful for us to understand the crash. Thanks.

Note: if the stack trace is too long, you may input "k50" command to get a longer complete stack.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Jeffrey Tan - MSFT  Friday, January 25, 2008 6:56 AM

Hi Jeffrey,

The blog you point me to offers interesting stuff, however, it requires skills I do not (yet) have. Besides, I do not think I have the insight knowledge of how VS2008 is supposed to work. Clearly VS2008 is crashing for some reason, and I had hoped it's developpers would keep a log somewhere which could give me a hint of why it is crashing.

I do not want to test and debug VS2006 (a high quality, fully released and supported Microsoft product) , I want to use it to develop my own applications. And while doing that the tool is crashing and making it almost impossible to use it.

Martin

Martin Koster  Friday, January 25, 2008 7:14 AM

Though not impossible, it is not likely that you will find a magic bullet here. I do understand your position, believe me, however I have to point out that the software engineering gravy train left the station 25 years ago. Actually, it was never parked in the first place, the one's that keep popping up turn out to be illusions.

The fact is, you have a problem and you'll have to deal with it. While the tool may be the source of the problem, you cannot know that until you determine what the problem is.

The first thing I would check is your system. Have you removed all beta installations of .NET and Visual Studio? Have you tried this on another (preferably pristine) development machine?

Next I would start removing items from the project one at a time until you can isolate a single (or a few) items. If it's a particular form causing problems, try removing controls one at a time.

Once you have it in the simplest reproducable form you could visit Microsoft Connect and submit the project along with a report.

Tergiver  Friday, January 25, 2008 10:06 PM

I appreciate your answer (realy). My first computer was a Tandy TRS-80 to give you a feel ofwhere I am coming from. I have not installed any betas. Your next suggestion (removing the parts bit-by-bit) until you hit the culpritt is time consuming (I now from experience), and usually my last resort.

I was not looking for a magic bullet, but rather a hint of where i might find a bit of info a why the IDE crashed. (there's not even a run-time error!) That would make the removal of the bitsmuch more effecient.

ThanX

Martin

Martin Koster  Monday, January 28, 2008 7:12 AM

I had crashing problems with the last beta of VS2008, but the RTM release arrived shortly after I had installed it. I wiped my machine clean for the RTM install. I have had no problems with crashing so far. That's why I suggested you try the same project on a 'pristine' machine and see if it makes a difference. Did you try that?

Tergiver  Monday, January 28, 2008 2:02 PM

Ive had a fair few Forms and controls crash my IDE - and its always been my code thats done it!

The VS IDE runs your code when you show the designer, and you may have made certain assumptions in your code that say things like, this file will be here (maybe it gets copied on build), that registry key will be there, and so on. If these cases arent true, and your code doesnt protect against failure too well (ie a try-catch block), you can get an exception that might bubble all the way to the top of the exception stack and crash the IDE. Try looking for code in your form constructor, or Form load events. Try either sticking a try-catch block around, or checking if you are in design mode (a property of the form/control).

Try closing all open tabs in VS and opening each form one at a time, to see which one(s) actually are crashing the IDE. The start checking and double checking your code to make sure its a solid as possible. Make sure no error goes unchecked and then double check again.

It does suck that the IDE crashes under these sorts of conditions (why cant VS handle the errors more gracefully?), but ultimately its usually (y)our code thats failing and simply taking VS with it...........

thedo  Monday, January 28, 2008 3:16 PM

A good way to find out exactly which line of your code is causing the problem (assuming it is your code of course), is to

1: Open Visual Studio

2: Open Visual Studio (another one)

3: Using the 1st Visual Studio - go to Tools->Attach ToProcess, select devenv.exe

4: In the 2nd Visual Studio open your project. Then do whatever you do to make it crash.

When it crashes the 1st Visual Studio should pick it up and can usually show you the exact line that caused it to error. And if its in your code, thats even better, because you can fix it and not have to wait for MS Smile


Neil

thedo  Monday, January 28, 2008 3:22 PM

Yes I did, and itshows more or less the same sort of problems.

Martin Koster  Tuesday, January 29, 2008 6:47 AM

Yeah, most of the time it is :-(

In VS2005 however, the project did not give any problems, and I use try/catch consistently.

Also, ... even if I forgot this construct at a crucial place, the exceptionwould bubble up - shouldn't it. And the IDE could catch it then - right? (well it seems not)

Your answer, however, trigggered a thought. I am using Infragistic components and I know from past experience that upgrading/moving projects alway gives problems with the license files. After fiddling a bit around with emptying cache directories, re-registering the components and using Infragistics upgrade tool (although I was not upgrading the components) my forms seems to behave much better now!!!

Almost no crashes after that :-)

Martin
Martin Koster  Tuesday, January 29, 2008 6:57 AM

Ah! I had nothing but troubles when i went from the demo controls to the licensed ones of Infragistics. For a paid for set of controls, they arent hald flimsy when it comes to some of the basics like upgrading........
thedo  Tuesday, January 29, 2008 8:38 AM

You can use google to search for other answers

Custom Search

More Threads

• expanded treeview search
• Highlight text in MessageBox
• Weird side-effect of LinearGradientBrush
• Creating a draggable control?
• Button control in Form's Title Bar
• .NET evaluating web service date incorrectly--need help fast!
• .Net security issue
• RegionMaster C# to VB.NET References
• Windows Service
• ToolStrip control - can it be made taller - increase height for larger .png images?