[Mono-dev] Not sure if this is a bug or my env

Robert Wilkens robwilkens at gmail.com
Wed Sep 26 19:40:50 UTC 2012


I just acquired a new mac notebook this week, and tried creating a simple app as shown below in test.cs - which i am just doing in a hurry to test my mono built from mono-master (latest, if i did it right)…

It crashes immediately on run..  

If I run it against mono 2.10.9 it just seems to freeze and not create a window but not crash or exit either...

Is it likely that something is wrong with my environment, or is this a bug?  Or is it just bad code that i slopped together in a hurry causing this?

I know i did a patch about 4 months ago that affected XPlatUICarbon, but i think that patch was reverted, so i don't think i broke this if it is indeed broken, it doesn't look like the area of code that i was touching back then.

@ cat test.cs
using System.Windows.Forms;

class test {

	public static void Main() {	
		Form fm1 = new Form();
		TextBox Tb1 = new TextBox();
		Tb1.Text="text";
		Tb1.Location = new System.Drawing.Point(10,10);
		Tb1.Size=new System.Drawing.Size(80,20);
		
		fm1.Controls.Add(Tb1);
		Application.Run(fm1);
	}
}


[mono] ~/sample @ mono test.exe
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Windows.Forms.XplatUICarbon.CGDisplayBounds (intptr) <0xffffffff>
  at System.Windows.Forms.XplatUICarbon.get_WorkingArea () <0x00035>
  at System.Windows.Forms.XplatUICarbon.get_VirtualScreen () <0x00020>
  at System.Windows.Forms.XplatUI.get_VirtualScreen () <0x00025>
  at System.Windows.Forms.SystemInformation.get_VirtualScreen () <0x00019>
  at System.Windows.Forms.Screen..cctor () <0x0003f>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at System.Windows.Forms.Hwnd.GetNextStackedFormLocation (System.Windows.Forms.CreateParams,System.Windows.Forms.Hwnd) <0x00168>
  at System.Windows.Forms.XplatUICarbon.CreateWindow (System.Windows.Forms.CreateParams) <0x0041e>
  at System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams) <0x00024>
  at System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams) <0x00044>
  at System.Windows.Forms.Control.CreateHandle () <0x00078>
  at System.Windows.Forms.Form.CreateHandle () <0x00023>
  at System.Windows.Forms.Control.CreateControl () <0x00097>
  at System.Windows.Forms.Control.SetVisibleCore (bool) <0x000ac>
  at System.Windows.Forms.Form.SetVisibleCore (bool) <0x00386>
  at System.Windows.Forms.Control.set_Visible (bool) <0x00032>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible (bool) <0xffffffff>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00366>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x0006f>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00049>
  at test.Main () <0x0015c>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>



More information about the Mono-devel-list mailing list