Probable bug in VS2008

B

Bruce HS

VS2008 crashes, then crashes again whenever I reopen VS.

Winforms, Visual Basic.

I have a solution with a class library project and an application project.
In VS2008, I have a form open from the application, and then change the
form's ancestor in the class library project. I don't recompile. I click on
the form at the application level whose ancestor has changed. VS2008
crashes. Upon reopening the solution, VS tries to show the forms that were
last open, and crashes again.

If I restore the library to the way it was before the problem, VS2008 stops
crashing. I'm not sure this would happen every time I change the library,
but it has happened twice now.

This was not a problem at VS2005.

I'd be interested in any feedback on this, including fixes.
 
B

Bruce HS

I have further information:

The line I removed in the library was

If fBrowse.ActiveForm IsNot Nothing Then ...

I had used this to avoid problems displaying the fBrowse form when
VS2005 tried to run my ancestor code which referred to null objects when it
was displaying the form in design mode.

In VS2005, this resulted in a long error message showing in the place of
the form design. This wasn't super friendly but it was much better than the
current situation, where VS2008 crashes.

So, the VS2008 bug seems to be that it cannot gracefully handle the display
of a form in design mode, when the form's ancestor code refers to a null
object. This should be fixed, since the programmer 1) probably won't know
why he can't get back into VS2008, and 2) will have to start a new project in
order to change the offending code, unless he recovers from backup.

I'll be happy to work with anyone who wants to try to fix this bug.
 
P

Peter Ritchie [C# MVP]

Visual Studio doesn't support opening a form in the Designer that doesn't
derive from Form.

The only solution is to not do that at the moment. You could log the defect
at http://connect.microsoft.com/VisualStudio/feedback/ Someone from
Microsoft may respond regarding whether the problem is known or not...

If it's an important issue, I suggest contacting product support directly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top