Quick, short, and useful ASP.NET feature…

You usually expect that if a user presses Enter while inside a non-multiline TextBox would cause the form to be submitted via your Button on the bottom of the form.

However, if you have multiple “form areas” in your ASP.NET web form, one of the weird “isms” is that the user pressing Enter in one of the fields can have fairly random results, because the browser chooses which Submit button to use, usually based on the order it appears in the HTML. Some conditions will cause your Button_Click event to fire, some not.

A quick and simple way to solve this is to wrap your form section in an <asp:Panel> control, but use the DefaultButton attribute. So…

<asp:Panel runat=”server” ID=”myPanel” DefaultButton=”button1”>
<asp:Button runat=”server” ID=”button1” Text=”This is my button” />

</asp:Panel>

… will cause button1 to be the default “enter key” button when the user is within that panel.

I’ve been working with the Microsoft Expression toolset for about a year and a half now… in particular, Blend, for me, takes the cake. Blend is a visual designer that allows me to make pretty nifty UIs in Silverlight and WPF. I would consider it one of the most amazing Microsoft development tools to date.

Lately, though, Blend and I have had a rocky relationship. I’ve installed it on two similar machines (one a Dell mini-tower running Windows 7 x64, and my Dell Precision laptop, also running Windows 7 x64). On the mini-tower, it works fine, and on the laptop, it crashes when I pretty much do anything (including creating a brand new WPF or Silverlight project and placing a Button on the new window).

In fact, to see the reproducible steps, check out my Problem Steps Recorder report: http://static.x9tech.com/XNT/BlendCrash/Blend3CrashPSR.zip

I’ve gotten to know this set of windows pretty well so far:

image

Actual debug text:

Description:
  Stopped working

Problem signature:
  Problem Event Name:    CLR20r3
  Problem Signature 01:    blend.exe
  Problem Signature 02:    3.0.1927.0
  Problem Signature 03:    4a5d4331
  Problem Signature 04:    WindowsBase
  Problem Signature 05:    3.0.0.0
  Problem Signature 06:    4a17571f
  Problem Signature 07:    e4
  Problem Signature 08:    1b
  Problem Signature 09:    FatalError
  OS Version:    6.1.7600.2.0.0.256.1
  Locale ID:    1033

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:Windowssystem32en-USerofflps.txt

So far, I’ve tried (via various crash fixes and forum suggestions):

  • Windows Updates (I’m desperate)
  • Reinstalling Silverlight 3 Tools
  • Installing Silverlight 3 SDK
  • Reinstalling (well, “turning off” and “turning on” in Windows 7) .NET 3.5 SP1
  • Removing / Reinstalling Expression Studio
  • Repair Installing Expression Studio
  • Removing Visual Studio 2008 SP1 / reinstalling
  • Trying to launch Blend with Exception Logging turned on (but nothing is logged)

… in just about every combination possible.

Finally, broke out WinDbg (Debugging Tools for Windows x64) to watch the crash. Here’s the scene leading up to the crash:

...
System.Windows.Data Warning: 39 : BindingExpression path error: 'SceneNodeObjectSet' property not found on 'object' ''GradientBrushEditor' (HashCode=28052000)'. BindingExpression:Path=SceneNodeObjectSet.IsViewRepresentationValid; DataItem='GradientBrushEditor' (HashCode=28052000); target element is 'PropertyContainer' (Name='GradientStopOffsetEditor'); target property is 'NoTarget' (type 'Object')
ModLoad: 00000000`73b40000 00000000`73cd0000   C:WindowsWinSxSx86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_72fc7cbf861225cagdiplus.dll
CLR: Managed code called FailFast, saying "Unrecoverable system error."
(b2c.1440): WOW64 breakpoint - code 4000001f (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:Windowssyswow64KERNELBASE.dll -
KERNELBASE!DebugBreak+0x2:
762922a1 cc              int     3

So, .NET is trying to load gdiplus.dll from some WinSxS directory and failing, right? (WinSxS is Windows 7 “Side By Side”, so if you remember the old “dllcache” folder from XP/Vista, this is the new way that keeps a bunch of copies of DLLs around for compatibility between applications.) But my first thought was “OK, what if that can’t be found or something?”… well, it’s there, so that theory doesn’t work:

image

Debugging blend.exe in Visual Studio records the following on crash:

System.ExecutionEngineException was unhandled
  Message="Exception of type 'System.ExecutionEngineException' was thrown."
  InnerException:

Great, awesome. Thanks. That was helpful… not. All a System.ExecutionEngineException means is that something is blowing up in the .NET runtime.

Looking in the event log, this is confirmed with an event:

.NET Runtime version 2.0.50727.4927 - Unrecoverable system error.

Resolution: Well, I was in the right neighborhood, at least… crashing right after loading GdiPlus.dll (a graphics library DLL) was the biggest clue. Originally, I had allowed Windows 7 to automatically detect, update, and install my display drivers. It did pretty well, my Aero experience has been great, never had any other problems with it, but I downloaded the Vista / Win 7 drivers from NVidia, and this fixed it after a restart!

The actual chipset I have is NVidia Quadro FX 1600M (notebook display driver).