2012-04-26 3 views
5

Stiamo sperimentando crash su varie macchine del progettista VS2010 WPF nel seguente scenario:Che cosa causa l'arresto anomalo di WPF Designer VS 2010 SP1?

  • VS 2010 SP1 installato
  • 64 bit di Windows 7
  • riferimento a NHibernate.dll (versione 1.2.0.712)

Per riprodurre l'errore, creare una nuova soluzione WPF, effettuare le seguenti operazioni:

  • creare una nuova soluzione WPF
  • aprire la finestra principale, aggiungere una casella di testo ad esso, impostare un testo statico
  • aggiungere un riferimento a FluentNhibernate.dll, versione 1.2.0.712
  • e ricostruire la soluzione
  • Aprire la finestra principale progettista di nuovo, modificare il testo
  • nella finestra di progettazione, fare clic a sinistra della finestra, poi di nuovo nel box di nuovo

non c'è dati/comando Associazioni, nessun codice che fa riferimento Influenza funzionalità entNHibernate o qualcosa di altamente sofisticato, solo una nuova soluzione di WPF con il seguente XAML nella MainWindow.xaml:

<Window x:Class="testWpfApplication2.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="800" 
    Title="MainWindow" Height="350" > 
    <Grid> 
    <TextBox Text="yxcydfdssdfsdfdsfsdsddsasdyxcasd" /> 
    </Grid> 
</Window> 

Ecco lo Stacktrace completo:

System.Reflection.TargetInvocationException 
Exception has been thrown by the target of an invocation. 
    at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) 
    at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) 
    at System.Delegate.DynamicInvokeImpl(Object[] args) 
    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) 

System.NullReferenceException 
Object reference not set to an instance of an object. 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetRuntimeTypeVariable(Type type) 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetRuntimeType(Type type) 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.EnsureRuntimeType(Type type) 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetRuntimeType(Type type) 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.TryGetRuntimeType() 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.EnsureRuntimeType(Type type) 
    at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkProvider.GetRuntimeType(Type reflectionType) 
    at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeType(Type reflectionType) 
    at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeType(Type reflectionType) 
    at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeType(Type reflectionType) 
    at MS.Internal.Metadata.ClrType.get_RuntimeMember() 
    at MS.Internal.Metadata.ClrMember`1.Microsoft.Windows.Design.Metadata.Reflection.IReflectionMember.get_MemberInfo() 
    at MS.Internal.Metadata.ClrType.Equals(Object obj) at System.Collections.Generic.ObjectEqualityComparer`1.Equals(T x, T y) 
    at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) 
    at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.<>c__DisplayClass5.<FindAttachableProperties>b__4(ITypeMetadata walkType) 
    at MS.Internal.Design.Metadata.Xaml.XamlType.<GetAllAttachableProperties>d__7.MoveNext() 
    at MS.Internal.Design.Metadata.Xaml.XamlType.<FindAttachableProperties>d__0.MoveNext() 
    at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.<FindAttachableProperties>d__7.MoveNext() 
    at MS.Internal.VirtualModel.VirtualModelPropertyCollection.<GetUncachedProperties>d__0.MoveNext() 
    at System.Linq.Buffer`1..ctor(IEnumerable`1 source) 
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) 
    at MS.Internal.VirtualModel.VirtualModelPropertyCollection.GetEnumerator() 
    at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelPropertyMerger.<GetFirstProperties>d__0.MoveNext() 
    at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList) 
    at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader) 
    at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly) 
    at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle() 

MS ha confermato questo come un Bug SP1, ma per un risultato soddisfacente, ho bisogno di capire di più sul problema ...

Che cosa causa questo, perché si verifica solo quando addind FNH, perché solo quando si aggiunge da una certa posizione (l'assemblaggio è lo stesso - noi fatto un confronto a byte)? Senza SP1, funziona ...

+1

L'ultima cosa che ho fatto per quanto riguarda questo è stato il download FluentNHibernate SourceCode (ultimo) e riferirlo come un progetto. Funziona bene, quindi in pratica deve essere qualcosa con la DLL in questione. Visual Studio esegue qualcosa come il calcolo del checksum sulle DLL di riferimento? –

+0

Succede con qualsiasi controllo che usi? Succede quando non ci sono controlli all'interno della finestra? E come hai installato NHibernate? – Kcvin

risposta

0

volte abbiamo intorno a questo con l'aggiunta di

if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) 
       return; 

in caso caricata del controllo incriminato