Giter Club home page Giter Club logo

Comments (13)

lextm avatar lextm commented on May 18, 2024

The beginning of the crash log is as below, which should recursive calls.

Stack overflow: IP: 0x41e07d24, fault addr: (nil)
Stacktrace:
at WeifenLuo.WinFormsUI.Docking.DockPanel.SuspendLayout (bool) <0x00026>
<...>
at (wrapper remoting-invoke-with-check) WeifenLuo.WinFormsUI.Docking.DockPanel.SuspendLayout (bool) <0xffffffff>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_Pane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x00043>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel (WeifenLuo.WinFormsUI.Docking.DockPanel) <0x0002f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose (bool) <0x0003f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose () <0x00018>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed (object,System.EventArgs) <0x0000f>
at System.ComponentModel.Component.Dispose (bool) <0x000c1>
at System.Windows.Forms.Control.Dispose (bool) <0x001f3>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at System.Windows.Forms.Form.Dispose (bool) <0x00147>
at DockSample.ToolWindow.Dispose (bool) <0x00047>
at DockSample.DummySolutionExplorer.Dispose (bool) <0x00047>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at System.Windows.Forms.Control.Dispose (bool) <0x001cb>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at WeifenLuo.WinFormsUI.Docking.DockPane.Dispose (bool) <0x000df>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.RemoveFromPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0010b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_PanelPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0008b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_Pane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x000c3>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel (WeifenLuo.WinFormsUI.Docking.DockPanel) <0x0002f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose (bool) <0x0003f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose () <0x00018>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed (object,System.EventArgs) <0x0000f>
at System.ComponentModel.Component.Dispose (bool) <0x000c1>
at System.Windows.Forms.Control.Dispose (bool) <0x001f3>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at System.Windows.Forms.Form.Dispose (bool) <0x00147>
at DockSample.ToolWindow.Dispose (bool) <0x00047>
at DockSample.DummySolutionExplorer.Dispose (bool) <0x00047>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at System.Windows.Forms.Control.Dispose (bool) <0x001cb>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at WeifenLuo.WinFormsUI.Docking.DockPane.Dispose (bool) <0x000df>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.RemoveFromPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0010b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_PanelPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0008b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_Pane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x000c3>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel (WeifenLuo.WinFormsUI.Docking.DockPanel) <0x0002f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose (bool) <0x0003f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose () <0x00018>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed (object,System.EventArgs) <0x0000f>
at System.ComponentModel.Component.Dispose (bool) <0x000c1>
at System.Windows.Forms.Control.Dispose (bool) <0x001f3>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at System.Windows.Forms.Form.Dispose (bool) <0x00147>
at DockSample.ToolWindow.Dispose (bool) <0x00047>
at DockSample.DummySolutionExplorer.Dispose (bool) <0x00047>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at System.Windows.Forms.Control.Dispose (bool) <0x001cb>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at WeifenLuo.WinFormsUI.Docking.DockPane.Dispose (bool) <0x000df>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.RemoveFromPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0010b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_PanelPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0008b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_Pane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x000c3>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel (WeifenLuo.WinFormsUI.Docking.DockPanel) <0x0002f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose (bool) <0x0003f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose () <0x00018>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed (object,System.EventArgs) <0x0000f>
at System.ComponentModel.Component.Dispose (bool) <0x000c1>
at System.Windows.Forms.Control.Dispose (bool) <0x001f3>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at System.Windows.Forms.Form.Dispose (bool) <0x00147>
at DockSample.ToolWindow.Dispose (bool) <0x00047>
at DockSample.DummySolutionExplorer.Dispose (bool) <0x00047>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at System.Windows.Forms.Control.Dispose (bool) <0x001cb>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at WeifenLuo.WinFormsUI.Docking.DockPane.Dispose (bool) <0x000df>
at System.ComponentModel.Component.Dispose () <0x00018>
at (wrapper remoting-invoke-with-check) System.ComponentModel.Component.Dispose () <0xffffffff>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.RemoveFromPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0010b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_PanelPane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x0008b>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_Pane (WeifenLuo.WinFormsUI.Docking.DockPane) <0x000c3>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel (WeifenLuo.WinFormsUI.Docking.DockPanel) <0x0002f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose (bool) <0x0003f>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose () <0x00018>
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed (object,System.EventArgs) <0x0000f>
at System.ComponentModel.Component.Dispose (bool) <0x000c1>
at System.Windows.Forms.Control.Dispose (bool) <0x001f3>
at System.Windows.Forms.ContainerControl.Dispose (bool) <0x00017>
at System.Windows.Forms.Form.Dispose (bool) <0x00147>

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

To get the full log, make sure in step 4 you execute "mono DockSample.exe > crash.log 2>&1" at Terminal so that all log entries go to crash.log.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

By changing Win32Helper.IsRunningOnMono to always return true, I tried to reproduce the crash on Windows/.NET. However, I could not reproduce it. So now it seems to be a Mono issue (where Mono disposes objects differently).

Will review JArchitect's team's patch to see how they work around this difference.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

Tested with Mono 2.10.8 on Windows. The crash can be also reproduced.

Tested with Mono 2.11.1 alpha on Windows. The crash cannot be reproduced. It seems that the Mono issue has been fixed. However, another issue has been observed, which will be documented in another issue if Mono 2.11 finalizes.

from dockpanelsuite.

jumpinjackie avatar jumpinjackie commented on May 18, 2024

Just to add a data point. I had a similar crash in DockPanel in my application when running in Mono 2.10 (happens on exit), which I was able to workaround with boolean guard in DockContentHandler.Dispose()

http://trac.osgeo.org/mapguide/changeset/6768/trunk/Tools/Maestro

from dockpanelsuite.

roken avatar roken commented on May 18, 2024

This is curious, I would be interested in finding some documentation on this Mono bug...I wasn't able to locate anything after a quick search. It would seem that the call to DockPane.RemoveContent() believes the content doesn't exist in the Contents collection and returns without actually detaching the content.

As an unrelated side note, why are we locking in the DockContentHandler's Dispose(bool) method? Disposal should be happening on the UI thread; this lock seems superfluous.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

@jumpinjackie 's fix is interesting to me too. If it works then the disposal methods need to be carefully reviewed then. I did not yet test the current build on Mono 2.11 on openSUSE. Will perform more investigation on that and provide an update back here.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

Just tested on Mono 2.11.2/openSUSE 12.1. DockSample.exe crashed due to broken WinForms support. Will have to wait till another Mono release.

Next I am going to test @jumpinjackie 's patch and see if it works as desired. If yes, I will further investigate what are the other possible fixes.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

Modified a build of DPS to generate log entries in related Dispose method so as to track the disposing order. The result on Windows/.NET is as below,

Enter AutoHideWindowControl 7
Leave 7
Enter DockPanel 5
    Enter MdiClientController 9
    Leave 9
    Enter DockPaneCollection 6
        Enter DockPane 11
            Enter VS2005DockPaneCaption 12
            Leave 12
            Enter VS2005DockPaneStrip 13
            Leave 13
            Enter DockContentHandler 10
                Enter DockPane 11
                Leave 11
            Leave 10
        Leave 11
    Leave 6
    Enter DockContentHandler 8
    Leave 8
Leave 5

The DockPane's Dispose method was called twice. Since the second call does nothing, there is no infinite loop. Will run this build on Mono and see what is the result there.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

On Mono the result is quite different,

Enter AutoHideWindowControl 7
Leave 7
Enter DockPanel 5
    Enter MdiClientController 9
    Leave 9
    Enter DockPaneCollection 6
        Enter DockPane 11
            Enter VS2005DockPaneCaption 12
            Leave 12
            Enter VS2005DockPaneStrip 13
            Leave 13
            Enter DockContentHandler 10
                Enter DockPane 11
                    Enter VS2005DockPaneCaption 12
                    Leave 12
                    Enter VS2005DockPaneStrip 13
                    Leave 13
                    Enter DockContentHandler 10
                        Enter DockPane 11
                            Enter VS2005DockPaneCaption 12

So the second call to DockPane.Disposing(true) leads to an infinite loop of calls.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

As above shows, to avoid the issue on Mono, we might patch DockPane.Dispose to return immediately on the second call, which is better than @jumpinjackie 's patch. I have tested it locally on Mono 2.10.9/openSUSE 12.1. Will revise the patch later and commit.

from dockpanelsuite.

lextm avatar lextm commented on May 18, 2024

Wrote a blog post to include more details, http://www.lextm.com/2012/07/stack-overflow-issue-of-dockpanel-suite.html

from dockpanelsuite.

roken avatar roken commented on May 18, 2024

I have logged a bug with mono: https://bugzilla.xamarin.com/show_bug.cgi?id=6176

from dockpanelsuite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.