[Mono-bugs] [Bug 656701] New: Calling Dispose(true) on a Panel in a form Incorrectly doesn't remove panel from form's Controls list.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 30 18:57:37 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=656701

https://bugzilla.novell.com/show_bug.cgi?id=656701#c0


           Summary: Calling Dispose(true) on a Panel in a form Incorrectly
                    doesn't remove panel from form's Controls list.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=402818)
 --> (http://bugzilla.novell.com/attachment.cgi?id=402818)
Test case showing different between .NET and mono when calling dispose(true) on
a component.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.5
(KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5

Disposing a control should remove it from parent.

See attached test case.

Reproducible: Always

Steps to Reproduce:
1. Compile and Run Attached test case.

Actual Results:  
True

Unhandled Exception: System.ApplicationException: Already disposed
  at ComponentTest.MyPanel.ThrowIfDisposed () [0x00016] in
/home/hindlet/Projects/ComponentTest/ComponentTest/ComponentTest.cs:69 
  at ComponentTest.MyForm.LoopOverAllControls (System.Windows.Forms.Control
control) [0x00051] in
/home/hindlet/Projects/ComponentTest/ComponentTest/ComponentTest.cs:39 
  at ComponentTest.MyForm.LoopOverAllControls (System.Windows.Forms.Control
control) [0x0001d] in
/home/hindlet/Projects/ComponentTest/ComponentTest/ComponentTest.cs:36 
  at ComponentTest.MyForm.Dispose () [0x00000] in
/home/hindlet/Projects/ComponentTest/ComponentTest/ComponentTest.cs:29 
  at (wrapper remoting-invoke-with-check) ComponentTest.MyForm:Dispose ()
  at ComponentTest.MainClass.Main (System.String[] args) [0x00035] in
/home/hindlet/Projects/ComponentTest/ComponentTest/ComponentTest.cs:18

Expected Results:  
False

-- 
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