Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Perpetual Expression Blend Crashes

As part of building Windows Phone applications I’m forever flipping between Visual Studio and Expression Blend. Sometimes I encounter issues with Blend that it just can’t deal with and will simply self combust, giving me a text file crash stack. The most common cause is where I’ve accidentally crossed threads, resulting in the following:

System.UnauthorizedAccessException: Invalid cross-thread access.
   at MS.Internal.XcpImports.CheckThread()
   at MS.Internal.XcpImports.CreateObjectByTypeIndex(UInt32 typeIndex)
   at System.Windows.Threading.DispatcherTimer..ctor(UInt32 nativeTypeIndex)
   at System.Windows.Threading.DispatcherTimer..ctor()

Unfortunately the resolution isn’t that simple – I can fix the code ok, but the issue is that Blend won’t load the project again without crashing. This is because Blend uses a compiled version of the application to display the design surface. On startup it attempts to use the version that has already been built (in this case it includes the faulty code that causes the exception) so it crashes again. Unlike Visual Studio that handles this gracefully, there is no capability within Blend to for example open the project without any files open….

The solution: Delete the bin/obj folders from your application and open in Blend (of course after fixing the code issue). Blend will then be forced to do a new build of the application that should no longer raise the exception.

  • Generic Viagra

    15/03/2011 11:19:35 PM |

    This is how an article should be written; I gotta say that you are one of the inspirational writers.

  • New Jordans 2011

    16/05/2011 10:18:17 PM |

    Do you find it rational that they are suspicious connected with an full industry due to a very few terrible cheerios? There are actually not less than not one but two vital disparities, it appears to be with me. Initially, not one person worries this scientific research is proven to work, anything erroneous plus counterfeit lay claim could ever so often often be available. Nonetheless if there are actually every "miraculous" products out of faith-healing, above the male bodys private capability get rid of on its own, is rather a great deal during dilemma. The second thing is, a expose' with dupery plus blunder around scientific research created just about completely by way of scientific research. Although the vulnerability with dupery plus blunder around faith-healing will be under no circumstances executed by way of alternative faith-healers.

  • Home Improvement and Interior Design

    21/05/2011 8:10:58 PM |

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  • Thomasina Freker

    22/05/2011 2:56:01 AM |

    Even you will find many running for years, when you begin your barefoot working training the very first thing you should know is that you'll have to cut way back on your standard routine, and begin as though you were merely getting started managing.

Pingbacks and trackbacks (2)+

Comments are closed