[Mono-bugs] [Bug 374663] Setting MdiParent crashes with Unhandled Exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Mar 28 18:51:49 EDT 2008


User charles.goodwin at gmail.com added comment

--- Comment #1 from Charles Goodwin <charles.goodwin at gmail.com>  2008-03-28 16:51:49 MST ---
Ok I had a look into this a bit more and seem to have found the problem.

My original suspicion was that if a Form had certain behaviours activated on it
before it had been notified it had an MdiParent, it would not like switching
from being a normal frame to an MDI frame. (Please excuse incorrect
terminology.) So I started by minimizing the actions called before setting
MdiParent, and with everything taken out that was not necessary, it seemed to
work fine.

However it the actual cause of the crash was not any specific one of the calls
that were taken out, but instead seems to be that too many demands are being
placed on the Forms in consecutive calls when MdiParent is involved.

Here's an overview of what's happening:

                PlatformController.theInstance.MdiParent = mainWindowMDI;
                PlatformController.theInstance.WindowState =

Here's the create() function:

            public static void create()
                if (theInstance == null)
                    theInstance = new PlatformController();

If I comment out the (in execution order) calls to Show(), Activate(), Hide(),
and Show(), then it runs OK. If I try and isolate them one at a time, they all
work in isolation, and (I didn't try all combinations) work ok when 3 are
active and any 1 is commented out.

More details here:

Whilst I would agree with any suggestion that you should not be calling Hide()
and Show() in quick succession like that, I would think that doing so should
not result in a crash.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list