[Mono-bugs] [Bug 686486] New: Mono crashes when setting the DialogResult in the FormClosing event method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Apr 10 10:10:20 EDT 2011



           Summary: Mono crashes when setting the DialogResult in the
                    FormClosing event method
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: openSUSE 11.4
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: floseflose at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=424131)
 --> (http://bugzilla.novell.com/attachment.cgi?id=424131)
test case for dialogresult bug

Description of Problem:
When setting the DialogResult in the FormClosing event method, mono immediately
calls FireClosingEvents again, which calls fires FormClosing, where
DialogResult is set again, so mono is caught in an endless loop and eventually

Steps to reproduce the problem:
1. combile the attached cs file: gmcs -r:System.Windows.Forms
2. run the program, an empty Form appears.
3. close the form

Actual Results:
mono crashes

Expected Results:
the form should simply be closed

How often does this happen? 

Additional Information:
a workaround is to check in the FormClosing method if the DialogResult hasn't
been set already and only then set the DialogResult.

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