[Mono-bugs] [Bug 543540] New: repeatedly creating & disposing of forms on OSX causes problems
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Oct 1 11:39:06 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=543540
Summary: repeatedly creating & disposing of forms on OSX causes
problems
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: webservices at landmarkdigital.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=320685)
--> (http://bugzilla.novell.com/attachment.cgi?id=320685)
Test harness source
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us)
AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19
To be precise, this bug should be submitted against the mono 2.6 OSX preview,
but that is not in the web form version list.
On OSX, when a Form is displayed then Dispose'd, the system appears to retain a
reference of some sort to the disposed Form object. The code below repeatedly
creates a very simple form then disposes of the form once the ShowDialog()
method has returned. Usually after between 5 and 10 iterations of this,
problems start occuring: either the UI will stop responding entirely, or new
windows won't display, or new windows don't draw.
When the exact same compiled assembly is executed on SLES 11 mono 2.4, no
problems manifest.
Reproducible: Always
Steps to Reproduce:
public class formTest
{
public static void Main (string[] arg)
{
// creating and disposing of forms on mono/OSX causes problems...
for (int i=0; i<20; i++) {
System.Windows.Forms.Form form = new System.Windows.Forms.Form();
System.Windows.Forms.TableLayoutPanel tlPanel = new
System.Windows.Forms.TableLayoutPanel();
System.Windows.Forms.Label label = new System.Windows.Forms.Label();
label.Text = "" + i;
form.Controls.Add(label);
System.Windows.Forms.Button button = new System.Windows.Forms.Button();
button.Text = "Close";
button.DialogResult = System.Windows.Forms.DialogResult.OK;
button.Anchor = System.Windows.Forms.AnchorStyles.None;
tlPanel.Controls.Add(label, 0, 0);
tlPanel.Controls.Add(button, 0, 1);
tlPanel.Dock = System.Windows.Forms.DockStyle.Fill;
tlPanel.Size = new System.Drawing.Size(50, 50);
form.Controls.Add(tlPanel);
form.Size = form.GetPreferredSize(new System.Drawing.Size(0, 0));
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
//form.Scale(new System.Drawing.SizeF(2, 2));
try {
form.ShowDialog();
} finally {
form.Dispose();
}
}
}
}
gmcs -r:System.Windows.Forms.dll -r:System.Drawing.dll formTest.cs
--
Configure bugmail: http://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