This project has moved. For the latest updates, please go here.

StackOverflowException in AvalonDock while closing a LayoutAnchorable docked over a DocumentPane

Aug 5, 2014 at 5:37 PM
There is a bug in the latest release of Extended WPF Toolkit v2.2.1 where if you dock a LayoutAnchorable over a DocumentPane, a StackOverflowException will be generated.

Step to reproduce:

1- download the source code package for Extended WPF Toolkit (https://wpftoolkit.codeplex.com/SourceControl/latest#)

2- Extract the package and open the Source/ExtendedWPFToolkitSolution/Xceed.Wpf.Toolkit.sln with Visual Studio 2010 (also tried with 2012 & 2013)

3- Set Xceed.Wpf.Toolkit.LiveExplorer as the Startup Project

4- Build and launch the demo project. (Debug or Release doesn't make any difference)

5- Go to Other and Select AvalonDock in the demo list.

6- Take the Alarms or Journal window and drag it over the Document pane so it sit atop Document1.

7- Press the 'X' in the header of the Alarms window. Result: Crash with StackOverflowException

Here is an extract of the Call Stack:
Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutElement.Root.get() Line 118 + 0xffffffe4 bytes C#
Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 628 + 0x8 bytes  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.DockingManager._ExecuteCloseCommand(Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable anchorable = {Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable}) Line 2546   C#

Xceed.Wpf.AvalonDock.dll!Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.Close() Line 631  C#


Note that I can also reproduce it with the latest binary version of AvalonDock.

Is there a workaround for this issue? Will it be fixed in the next release and how long do we have to wait for this to happen?

Thanks you very much for any help you may give us.
Developer
Aug 5, 2014 at 7:39 PM
Hi,

I cannot reproduce the issue. After downloading the file you pointed out and running it in VS2012 Debug Mode. I dragged the Alarm Window over the Document1, Clicked the "X" from the Alarm window and the Alarm windows just closed without exceptions.
Developer
Aug 5, 2014 at 7:47 PM
Hi,
This bug will be fixed in v2.3.
Marked as answer by Ricje on 8/5/2014 at 12:52 PM