locked
Expression Blend 4 RC crashes when project is opened: Exception from HRESULT: 0x80131047 RRS feed

  • Question

  • I am opening a project in Blend 4 RC and it is crashing - it displays two dialogs:

      The document failed to open.  The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

    When I click on the first "close" button, Blend crashes.

    I ran "blend /ExceptionLog" and I copy below the full exception.

    My development environemnt:

    Windows 7 x64
    Visual Studio 2010 (RTM)
    Blend 4 RC

    My project:

    WPF Application, VB.NET (.vbproj)
    .NET 3.5 SP1
    Platform: x86

    In this project I am forced to compile in 32 bits (x86) instead of "Any CPU".  This project references a 32 bit DLL compiled in C++ and if I try to compile and run my project in "Any CPU", I get a "bad image" exception at runtime.

    I believe this is what is causing Blend 4 to crash.  With Blend 3, I would see a similar error and a crash if I tried to compile or run the project.  But as long as I compiled and ran in VS 2008 and only edited the XAML, everything worked ok.  With Blend 4 RC it just crashes.

    I have a hunch Blend 4 RC is trying to open the solution and compile as soon as I open the project.  Is there a way to force Expression Blend 4 RC to only open the project I select and not the solution that contains the project?

     

    Application Version: 3.0.0.0

    Common Language Runtime Version: 4.0.30319.1

     

    System.NullReferenceException: Object reference not set to an instance of an object.

       at Microsoft.Expression.DesignSurface.UserInterface.ResourcePane.ResourceManager.RecalculateDocumentContainersEnabled()

       at Microsoft.Expression.DesignSurface.UserInterface.ResourcePane.ResourceManager.set_TargetProjects(IEnumerable`1 value)

       at Microsoft.Expression.DesignSurface.UserInterface.ResourcePane.ResourceManager.ProjectManager_SolutionOpened(Object sender, SolutionEventArgs e)

       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)

       at Microsoft.Expression.Project.ProjectManager.OnSolutionOpened(SolutionEventArgs e)

       at Microsoft.Expression.Project.ProjectManager.OpenSolution(DocumentReference solutionOrProjectReference, Boolean addToRecentList, Boolean openInitialScene)

       at Microsoft.Expression.Project.Commands.OpenProjectCommand.<Execute>b__0()

       at Microsoft.Expression.Project.ErrorHandling.HandleBasicExceptions(Action action, Action`1 handledExceptionAction)

       at Microsoft.Expression.Project.ServiceExtensions.ErrorHandling.ErrorHandlingServiceExtensions.ExceptionHandler(IServiceProvider source, Action action, Func`1 errorMessage)

       at Microsoft.Expression.Project.Commands.ProjectCommandExtensions.HandleBasicExceptions(IProjectCommand source, Action action)

       at Microsoft.Expression.Project.Commands.OpenProjectCommand.Execute()

       at Microsoft.Expression.Framework.Commands.CommandTarget.Execute(String commandName, CommandInvocationSource invocationSource)

       at Microsoft.Expression.Framework.Commands.CommandService.Execute(String commandName, CommandInvocationSource invocationSource)

       at Microsoft.Expression.Blend.WelcomeScreen.OpenProjectDialogCommandCore()

       at Microsoft.Expression.Framework.Data.DelegateCommand.System.Windows.Input.ICommand.Execute(Object arg)

       at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)

       at System.Windows.Controls.Primitives.ButtonBase.OnClick()

       at System.Windows.Controls.Button.OnClick()

       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

       at System.Windows.Input.InputManager.ProcessStagingArea()

       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

       at System.Windows.Window.ShowHelper(Object booleanBox)

       at System.Windows.Window.Show()

       at System.Windows.Window.ShowDialog()

       at Microsoft.Expression.Blend.WelcomeScreen..ctor(IServices services)

       at Microsoft.Expression.Blend.BlendApplication.OnFirstIdle()

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)

       at System.Threading.ExecutionContext.runTryCode(Object userData)

       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.ProcessQueue()

       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

       at System.Windows.Threading.Dispatcher.Run()

       at System.Windows.Application.RunDispatcher(Object ignore)

       at System.Windows.Application.RunInternal(Window window)

       at System.Windows.Application.Run(Window window)

       at Microsoft.Expression.Framework.ExpressionApplication.RunApplication()

       at Microsoft.Expression.Application.Main(String[] args)


     

    Friday, April 23, 2010 8:25 PM

All replies

  • Would you be able to share the project?  If so, I'd love to take a look at it, especially because of the crash.  kellycan@microsoft.com

    If you can't, I understand that as well.

    Thanks, Kelly

    Friday, April 23, 2010 11:18 PM
  • I can’t really share the project – but I will try to create a simpler project that references the 32 bit C++ DLL that I believe is causing Blend 4 RC to crash.  

    Friday, April 23, 2010 11:59 PM
  • Just to follow up on this issue - since in this project I am using a mixed mode assembly built against the 2.0 CLR it was suggested I add this to Blend.exe.config:

      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" safemode="true"/>
        <requiredRuntime version="v4.0" safemode="true"/>
      </startup>
    

    I found an explanation on ‘useLegacyV2RuntimeActivationPolicy’ here:

      http://www.marklio.com/marklio/PermaLink,guid,ecc34c3c-be44-4422-86b7-900900e451f9.aspx

    Kelly and others from the Expression team were extremely helpful and followed up on this problem until the solutions were found - I am very impressed.  Thank you!

     

    Thursday, April 29, 2010 10:00 PM
  • Hi.

    I can't open windows with infragistics in Blend 4 RC.

    Exception is

    "the document failed to open. the given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) blend"

    help please.


    musado
    Friday, May 7, 2010 11:03 AM
  • Hi

    I cant open my project in expression blend 4 because I am using a xamDataGrid in the window. I get the same error message. When I take the grid out, all it ok.

    It is driving me crazy trying to work around the issue

    I have added the startup legacy code to the config file. No dice :(

    Saturday, July 10, 2010 4:48 AM