Exception in ActiproSoftware.Docking.Wpf351.dll

Docking/MDI for WPF Forum

Posted 13 years ago by SledgeHammer01
Version: 11.1.0543
Platform: .NET 4.0
Environment: Windows 7 (32-bit)
Avatar
I get a null reference exception in ActiproSoftware.Docking.Wpf351.dll when I use IsOpen binding and the layout serializer.

My ToolWindow is defined as:

<docking:ToolWindow Name="twStateCountry" Title="State &amp; County" Focusable="False" IsOpen="{Binding StateCountryIsOpen}">
</docking:ToolWindow>

StateCountryIsOpen is defined as:

public bool StateCountryIsOpen
{
get
{
return _stateCountryIsOpen;
}

set
{
if (_stateCountryIsOpen != value)
{
_stateCountryIsOpen = value;
OnPropertyChanged("StateCountryIsOpen");
}
}
}

Layout serialization is done as:

DockSite dockSite = window.FindName("dockSite") as DockSite;

if ((object)dockSite != null)
{
DockSiteLayoutSerializer layoutSerializer = new DockSiteLayoutSerializer();

if ((object)layoutSerializer != null)
layoutSerializer.LoadFromString(xxx.yyy.Admin.Properties.Settings.Default.Layout.OuterXml, dockSite);

If I remove the IsOpen binding, everything works correctly.

Call stack is:

ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(ActiproSoftware.Windows.Controls.Docking.DockingWindow A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, ActiproSoftware.Windows.Controls.Docking.DockingWindowCloseReason A_1 = Other, bool A_2 = false, bool A_3 = false) + 0x43e bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(ActiproSoftware.Windows.Controls.Docking.DockingWindow A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, ActiproSoftware.Windows.Controls.Docking.DockingWindowCloseReason A_1 = Other, bool A_2 = false) + 0x30 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockingWindow.Close() + 0x57 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockingWindow.p(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, System.Windows.DependencyPropertyChangedEventArgs A_1 = {System.Windows.DependencyPropertyChangedEventArgs}) + 0x90 bytes
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) + 0x4c bytes
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) + 0x50 bytes
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) + 0x3c bytes
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex = {System.Windows.EntryIndex}, System.Windows.DependencyProperty dp = {System.Windows.DependencyProperty}, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry = {System.Windows.EffectiveValueEntry}, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) + 0x723 bytes
WindowsBase.dll!System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty dp) + 0xad bytes
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.Invalidate(bool isASubPropertyChange) + 0x62 bytes
PresentationFramework.dll!System.Windows.Data.BindingExpression.TransferValue(object newValue, bool isASubPropertyChange) + 0x1fd bytes
PresentationFramework.dll!System.Windows.Data.BindingExpression.Activate(object item) + 0x194 bytes
PresentationFramework.dll!System.Windows.Data.BindingExpression.OnDataContextChanged(System.Windows.DependencyObject contextElement) + 0x67 bytes
PresentationFramework.dll!System.Windows.Data.BindingExpression.HandlePropertyInvalidation(System.Windows.DependencyObject d = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, System.Windows.DependencyPropertyChangedEventArgs args) + 0xc7 bytes
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs args) + 0x5f bytes
PresentationFramework.dll!System.Windows.Data.BindingExpression.OnPropertyInvalidation(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs args) + 0xcc bytes
WindowsBase.dll!System.Windows.DependentList.InvalidateDependents(System.Windows.DependencyObject source = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, System.Windows.DependencyPropertyChangedEventArgs sourceArgs) + 0x89 bytes
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) + 0x19b bytes
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex = {System.Windows.EntryIndex}, System.Windows.DependencyProperty dp = {System.Windows.DependencyProperty}, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry = {System.Windows.EffectiveValueEntry}, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) + 0x723 bytes
PresentationFramework.dll!System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(System.Windows.TreeChangeInfo info, System.Windows.DependencyObject d, ref MS.Internal.FrameworkObject fo, System.Windows.DependencyProperty dp, System.Windows.FrameworkPropertyMetadata fMetadata, System.Windows.Style selfStyle, System.Windows.Style selfThemeStyle, ref System.Windows.ChildRecord childRecord, bool isChildRecordValid, bool hasStyleChanged, bool isSelfInheritanceParent) + 0x10a bytes
PresentationFramework.dll!System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(System.Windows.TreeChangeInfo info, System.Windows.FrameworkElement fe, System.Windows.FrameworkContentElement fce, System.Windows.Style selfStyle = null, System.Windows.Style selfThemeStyle = {System.Windows.Style}, ref System.Windows.ChildRecord childRecord = {System.Windows.ChildRecord}, bool isChildRecordValid = false, bool hasStyleChanged = false, bool isSelfInheritanceParent = true) + 0x151 bytes
PresentationFramework.dll!System.Windows.FrameworkElement.InvalidateTreeDependentProperties(System.Windows.TreeChangeInfo parentTreeState, bool isSelfInheritanceParent) + 0x188 bytes
PresentationFramework.dll!System.Windows.FrameworkElement.OnAncestorChangedInternal(System.Windows.TreeChangeInfo parentTreeState) + 0x8e bytes
PresentationFramework.dll!System.Windows.TreeWalkHelper.OnAncestorChanged(System.Windows.DependencyObject d, System.Windows.TreeChangeInfo info) + 0x56 bytes
PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.TreeChangeInfo>.StartWalk(System.Windows.DependencyObject startNode, bool skipStartNode) + 0x7c bytes
PresentationFramework.dll!MS.Internal.PrePostDescendentsWalker<System.Windows.TreeChangeInfo>.StartWalk(System.Windows.DependencyObject startNode = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, bool skipStartNode = false) + 0x33 bytes
PresentationFramework.dll!System.Windows.TreeWalkHelper.InvalidateOnTreeChange(System.Windows.FrameworkElement fe, System.Windows.FrameworkContentElement fce, System.Windows.DependencyObject parent, bool isAddOperation) + 0x331 bytes
PresentationFramework.dll!System.Windows.FrameworkElement.ChangeLogicalParent(System.Windows.DependencyObject newParent) + 0xa8 bytes
PresentationFramework.dll!System.Windows.FrameworkElement.RemoveLogicalChild(object child) + 0x7e bytes
PresentationFramework.dll!MS.Internal.Controls.InnerItemCollectionView.ClearModelParent(object item) + 0xaa bytes
PresentationFramework.dll!MS.Internal.Controls.InnerItemCollectionView._RemoveAt(int index = 0, int indexR, object item = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x41 bytes
PresentationFramework.dll!MS.Internal.Controls.InnerItemCollectionView.RemoveAt(int index) + 0x4d bytes
PresentationFramework.dll!System.Windows.Controls.ItemCollection.RemoveAt(int removeIndex) + 0x22 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.Track}, System.Windows.DependencyObject A_1 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, bool A_2 = true) + 0x14c bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.Track}, System.Windows.DependencyObject A_1 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x28 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.af(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x47 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.ab(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x68 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.y(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0xcf bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.ap(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x14b bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.z(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0xae bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.aa(System.Windows.DependencyObject A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}) + 0x63 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(ActiproSoftware.Windows.Controls.Docking.DockingWindow A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, ActiproSoftware.Windows.Controls.Docking.DockingWindowCloseReason A_1 = LayoutCleared, bool A_2 = true, bool A_3 = false) + 0x167 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(ActiproSoftware.Windows.Controls.Docking.DockingWindow A_0 = {ActiproSoftware.Windows.Controls.Docking.ToolWindow}, ActiproSoftware.Windows.Controls.Docking.DockingWindowCloseReason A_1 = LayoutCleared, bool A_2 = true) + 0x30 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.b(ActiproSoftware.Windows.Controls.Docking.EventNotifier A_0 = {ActiproSoftware.Windows.Controls.Docking.EventNotifier}) + 0x352 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Serialization.DockSiteLayoutSerializer.a(ActiproSoftware.Windows.Controls.Docking.DockSite A_0 = {FirstAmerican.RubiSoft.UI.DockSiteEx}, ActiproSoftware.Windows.Controls.Docking.Serialization.XmlDockSiteLayout A_1 = {ActiproSoftware.Windows.Controls.Docking.Serialization.XmlDockSiteLayout}) + 0x159 bytes
ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Serialization.DockSiteLayoutSerializer.ApplyTo(ActiproSoftware.Windows.Controls.Docking.DockSite obj = {FirstAmerican.RubiSoft.UI.DockSiteEx}) + 0x5b bytes
ActiproSoftware.Shared.Wpf351.dll!ActiproSoftware.Windows.Serialization.XmlSerializerBase<ActiproSoftware.Windows.Controls.Docking.DockSite,ActiproSoftware.Windows.Controls.Docking.Serialization.XmlDockSiteLayout>.LoadFromString(string xml = "<DockSiteLayout xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" SerializationFormat=\"ToolWindowsOnly\"><AutoHideHost /><Content xsi:type=\"SplitContainer\" AutoHideSize=\"785,476\" DockedSize=\"785,476\" DocumentSize=\"785,476\" FloatingSize=\"785,476\" Size=\"785,476\" Orientation=\"Horizontal\"><UIElement xsi:type=\"ToolWindowContainer\" AutoHideSize=\"200,446\" DockedSize=\"200,446\" DocumentSize=\"200,446\" FloatingSize=\"200,446\" Size=\"200,446\" /><UIElement xsi:type=\"Workspace\" AutoHideSize=\"785,476\" DockedSize=\"785,476\" DocumentSize=\"785,476\" FloatingSize=\"785,476\" Size=\"785,476\"><Content xsi:type=\"TabbedMdiHost\"><Content xsi:type=\"TabbedMdiContainer\" AutoHideSize=\"200,200\" DockedSize=\"200,200\" DocumentSize=\"200,200\" FloatingSize=\"200,200\" Size=\"200,200\" /></Content></UIElement></Content><ToolWindows><ToolWindow UniqueId=\"035750c0-1bf7-4b73-9865-6d23af1dc5a5\" AutoHideSize=\"200,200\" DockedSize=\"200,200\" DocumentSize=\"200,200\" FloatingSize=\"200,200\" Size=\"200,200\" IsOpen=\"true\" LastState=\"Docked\" Name=\"twStateCountry\" State=\"Docked\" /></ToolWindows></DockSiteLayout>", ActiproSoftware.Windows.Controls.Docking.DockSite obj = {FirstAmerican.RubiSoft.UI.DockSiteEx}) + 0x34 bytes

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Based on the information you provided, we've corrected the only possible null reference exception in that method. If you'd like us to verify the fix based on your case then please put together a small sample project that reproduces your issue and email it over. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.