PurplePen.exe crashes on Ubuntu 10.04 with Mono 2.4.4

Bug #580619 reported by Darko Surjan on 2010-05-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Purple Pen
Wishlist
Unassigned

Bug Description

I've tried to run Purple Pen on Ubuntu 10.04 with Mono 2.4.4 (including libmono-winforms2.0-cil and libgdiplus packages). When I run Purple Pen, I get "Welcome to Purple Pen" dialog and when I select "Open an existing event..." it crashes with following message:

--begin--
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
  at System.Drawing.Drawing2D.Matrix.Invert () [0x00000]
  at (wrapper remoting-invoke-with-check) System.Drawing.Drawing2D.Matrix:Invert ()
  at PurplePen.MapView.MapViewer.CalculateWorldTransform () [0x00000]
  at PurplePen.MapView.MapViewer.ViewportChanged () [0x00000]
  at PurplePen.MapView.MapViewer.MapViewer_Resize (System.Object sender, System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnResizeInternal (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000]
  at System.Windows.Forms.Control.UpdateBounds () [0x00000]
  at System.Windows.Forms.Control.WmWindowPosChanged (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000]

Unhandled Exception: System.InvalidOperationException: Cannot call Invoke or BeginInvoke on a control until the window handle is created
  at System.Windows.Forms.Control.FindControlToInvokeOn () [0x00000]
  at System.Windows.Forms.Control.BeginInvokeInternal (System.Delegate method, System.Object[] args) [0x00000]
  at System.Windows.Forms.Control.BeginInvoke (System.Delegate method, System.Object[] args) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:BeginInvoke (System.Delegate,object[])
  at System.Windows.Forms.MWFVFS+WorkerThread.GetFolderContentThread () [0x00000]
--end--

When I select "Create New Event" in "Welcome to Purple Pen" dialog, I get "Create New Event" wizard and when I click "Finish" it crashes with following message:

--begin--
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
  at System.Drawing.Drawing2D.Matrix.Invert () [0x00000]
  at (wrapper remoting-invoke-with-check) System.Drawing.Drawing2D.Matrix:Invert ()
  at PurplePen.MapView.MapViewer.CalculateWorldTransform () [0x00000]
  at PurplePen.MapView.MapViewer.ViewportChanged () [0x00000]
  at PurplePen.MapView.MapViewer.MapViewer_Resize (System.Object sender, System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnResizeInternal (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000]
  at System.Windows.Forms.Control.UpdateBounds () [0x00000]
  at System.Windows.Forms.Control.WmWindowPosChanged (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000]
System.ObjectDisposedException: The object was used after being disposed.
  at System.Windows.Forms.Control.CreateHandle () [0x00000]
  at System.Windows.Forms.Form.CreateHandle () [0x00000]
  at System.Windows.Forms.Control.CreateControl () [0x00000]
  at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00000]
  at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000]
  at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000]
  at System.Windows.Forms.Control.Show () [0x00000]
  at PurplePen.InitialScreen.CreateNewEvent () [0x00000]
  at PurplePen.InitialScreen.okButton_Click (System.Object sender, System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000]
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000]
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000]
--end--

I know that Purple Pen requires Windows XP SP2 with .NET Framework 2.0 or Windows Vista, but is it possible to make it compatible with Mono too?

Peter Golde (peter-golde) wrote :

Sorry, I will not be supporting Linux with Purple Pen.

Changed in purple-pen:
importance: Undecided → Wishlist
status: New → Won't Fix
Jan Iven (iven-jan) wrote :

The solution to this one is rather easy, looks like the Linux libgdiplus inverts only invertible matrices.. and at least one of the transforms during intial setup is not.

MapViewer.cs : CalculateWorldTransform()
 ...
   if(! matrix.IsInvertible) {
    return;
   }
                       matrix.Invert();
..

Jan Iven (iven-jan) wrote :

(please ignore comment #2; LInux is clearly not supported. Filed upstream "libgdiplus" bug instead at https://bugzilla.xamarin.com/show_bug.cgi?id=4337 )

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.