sbeanland
Joined: 01 Aug 2013 Posts: 2
|
Posted: Thu Aug 01, 2013 4:15 pm Post subject: NullReferenceException on InitializeComponent() |
|
|
Hi, this is a bit of an edge case, but we're running destruction tests on our application, hoping to stamp any edge case issues out.
We have the ability to open a new window by pressing a key combination. If that key combination is held down, many many windows can of course pop up one after another. When doing so, eventually we get a crash. The debugger stops at InitializeComponent on a window and pops up a NullReferenceException. Sometimes this happens after a couple dozen windows, sometimes it doesn't happen til well over 100 are opened. Below is a partial stack trace. Let me know if you need any more information.
Quote: | 2013-08-01 09:55:30:327 System.NullReferenceException: Object reference not set to an instance of an object.
at Infralution.Localization.Wpf.MarkupExtensionManager.CleanupInactiveExtensions()
at Infralution.Localization.Wpf.MarkupExtensionManager.RegisterExtension(ManagedMarkupExtension extension)
at Infralution.Localization.Wpf.ManagedMarkupExtension..ctor(MarkupExtensionManager manager)
at Infralution.Localization.Wpf.UICultureExtension..ctor()
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.InvokeDelegate(Action`1 action, Object argument)
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CallCtorDelegate(XamlTypeInvoker type)
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CreateInstance(XamlTypeInvoker type)
at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)
at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.CreateInstance(XamlType xamlType, Object[] args)
at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndObject()
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadDeferredContent(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings parentSettings, Uri baseUri)
at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
at System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache)
at System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean canCacheAsThemeResource, Boolean& canCache)
at System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source)
at System.Windows.FrameworkElement.TryFindResource(Object resourceKey)
|
EDIT: As a bit of added information, we're using the Infragistics XamDataGrid in many places, and using localized strings for column headers. Not sure if this is relevant to the problem, but figured I'd put it out there anyway. |
|