Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

Visual Studio ASP.NET Designer Crashes


:P
On this page:

Aaaargggh…

 

So last night for reasons unknown one of my Web projects started crashing Visual Studio consistently. It started on one form and originally I thought this was caused by introducing ATLAS into the application, but as it turns out the problem is something else altoghether (I think).

 

What’s happening is that I have a few rather complex pages with lots of controls including a fair number of custom controls. This has been working fine for a long time, but all of a sudden several of these complex forms are crashing VS hard – hard so bad that Dr. Watson starts going to 100% and coming close to hanging the entire system.

 

I’ve been screwing around with this for a half day now and I’m still no wiser as to what introduced this failure point. I think it’s something in my own custom control assemblies that’s triggering it – if I copy in some older control assemblies the problem goes away. However, everything works fine at runtime and in design mode it’s the designer that’s bonking.

 

I’ve been going through my changes trying to figure out what’s causing the problems, and I do see some code changes to a couple of controls that have their OnInit() code changed from previous versions and are accessing the Page object in the OnInit(). However, this works at runtime and it surely shouldn’t crash VS. I've even gone so far as to remove the OnInit() code in the couple of controls in question with mixed results. It gets better but doesn't go away. This is really strange too - the entire page comes up every time and all controls (at least that I can see) are visible at the top of the form. However, somewhere in there the designer stops with some of hte theming and style sheet rendering half assigned which is really odd. Not always the same place though.

 

[Update - appropriately 10 minutes after I posted this]

 

Sooooooooooooooooo.... Then for some odd reason I remembered that I had some problems with some of my images used in some of the CSS themes. One of the images was generated as GIF and for some reason renamed to a PNG file. Browsers seem to not care about that and render the PNG happily anyway...

 

However Visual Studio is not happy with this at all apparently and crashes - MOST of the time, but not all of the time. This is why I was apparently seeing some of this partial rendering of the browser. What's odd is that it seemed to work most of the time even on forms that have this image as part of the theme.

 

Talk about bizarre.

 

Still it seems to me Visual Studio should be a lot more pro-active in preventing crashes from the Web browser control hosted in the designer. That damn thing can fail in so many ways and certainly anything related to the control should be wrappered so that it can't possibly crash VS as a whole...

 

 

 

 

 


The Voices of Reason


 

Pete LePage
July 26, 2006

# re: Visual Studio ASP.NET Designer Crashes

Hi Rick,

I've filed this as a bug on Connect (http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=171408). If you've got any more info about the bug, please update the connect site so we can get it fixed, and make sure this doesn't happen in Orcas.

Not sure if we'll be able to get this into the SP yet, but I'll see what I can do to push it there.

Rick Strahl
July 26, 2006

# re: Visual Studio ASP.NET Designer Crashes

Thanks Pete...

I guess this isn't really a show stopper, self-inflicted at best, but frustrating nevertheless if you don't know what's happening.

Pete
July 27, 2006

# re: Visual Studio ASP.NET Designer Crashes

No problem Rick! Glad to be of help! I've got a repro, and we're going to see if it meets the bar for SP1, so no promises yet, but I'll see what I can do to push this. Sure it may be self-inflicted, but if you don't know, you're just shooting yourself in the foot without knowing why.

Nate
September 05, 2007

# re: Visual Studio ASP.NET Designer Crashes

Mahalo! I had identical problems with my custom controls being used in an Ajax enabled page.

No problems crashing VS 2005 when my custom controls were in a .ascx & then dropping the .ascx into the Ajax enabled page..

Hope this helps!!!

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2025