Bug 10622 - Crash moving a mouse over an object in OSX that I don't get in Linux
Summary: Crash moving a mouse over an object in OSX that I don't get in Linux
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: Macintosh Mac OS
: Lowest normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-24 12:24 UTC by Justin Shafer
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Tags: mono-community
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 10622 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Justin Shafer 2013-02-24 12:24:37 UTC
I am getting this problem with Xamarin and the 3.0.4 Mono with Open Dental... An Open Source WinForm Project. (Makes a great test platform for Mono)...

When I move my mouse over something called the pinboard, I get a crash. I don't get this with Linux. Running 10.7.5.

Something to do with the ClipBoard perhaps? Graphics don't display as well with OSX as they do Linux. GTK-Sharp problems? I wish Mono would use Open Dental as a test to improve MWF. =)

protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e) {
			base.OnMouseMove(e);
			if(mouseIsDown) {
				//regardless of whether a button is hot, nothing changes until the mouse is released.
				//a hot(pressed) button remains so, and no buttons are hot when hover
				//,so do nothing
			}
			else {//mouse is not down
				int button=HitTest(e.X,e.Y);//this is the button the mouse is over at the moment.
				//first handle the old hotbutton
				if(hotButton!=-1) {//if there is a previous hotbutton
					if(hotButton!=button) {//if we have moved to hover over a new button, or to hover over nothing
						sigButStates[hotButton].State=ToolBarButtonState.Normal;
						Invalidate();//hotButton.Bounds);
					}
				}
				//then, the new button
				if(button!=-1) {
					if(hotButton!=button) {//if we have moved to hover over a new button
						//toolTip1.SetToolTip(this,button.ToolTipText);
						sigButStates[button].State=ToolBarButtonState.Hover;
						Invalidate();//button.Bounds);
					}
					else {//Still hovering over the same button as before
						//do nothing.
					}
				}
				else {
					//toolTip1.SetToolTip(this,"");
				}
				hotButton=button;//this might be -1 if hovering over nothing.
				//if there was no previous hotbutton, and there is not current hotbutton, then do nothing.
			}
		}




System.NullReferenceException: Object reference not set to an instance of an object
  at OpenDental.UI.LightSignalGrid.HitTest (Int32 x, Int32 y) [0x00033] in /Users/justin/Desktop/OD12/opendental12.1/OpenDental/UI/LightSignalGrid.cs:245 
  at OpenDental.UI.LightSignalGrid.OnMouseMove (System.Windows.Forms.MouseEventArgs e) [0x0001b] in /Users/justin/Desktop/OD12/opendental12.1/OpenDental/UI/LightSignalGrid.cs:209 
  at System.Windows.Forms.Control.WmMouseMove (System.Windows.Forms.Message& m) [0x0009d] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5468 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001c7] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5075 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:228 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000c] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:209 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x0008e] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:240 
System.NullReferenceException: Object reference not set to an instance of an object
  at OpenDental.ContrImages.Dispose (Boolean disposing) [0x00020] in /Users/justin/Desktop/OD12/opendental12.1/OpenDental/Main Modules/ContrImages.cs:209 
  at System.ComponentModel.Component.Dispose () [0x00000] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/System/System.ComponentModel/Component.cs:111 
  at (wrapper remoting-invoke-with-check) System.ComponentModel.Component:Dispose ()
  at System.Windows.Forms.Control.Dispose (Boolean disposing) [0x0009d] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:980 
  at System.Windows.Forms.ContainerControl.Dispose (Boolean disposing) [0x00000] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:544 
  at System.Windows.Forms.Form.Dispose (Boolean disposing) [0x00045] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:1986 
  at OpenDental.FormOpenDental.Dispose (Boolean disposing) [0x00021] in /Users/justin/Desktop/OD12/opendental12.1/OpenDental/Main Modules/FormOpenDental.cs:338 
  at System.ComponentModel.Component.Dispose () [0x00000] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/System/System.ComponentModel/Component.cs:111 
  at (wrapper remoting-invoke-with-check) System.ComponentModel.Component:Dispose ()
  at System.Windows.Forms.Form.WmClose (System.Windows.Forms.Message& m) [0x000f0] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2602 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x000c0] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2438 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:228 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000c] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:209 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x0008e] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:240
Comment 1 Justin Shafer 2013-02-24 12:25:42 UTC
Oh yeah.. I put in break points and it crashes on this line.

int button=HitTest(e.X,e.Y);//this is the button the mouse is
over at the moment.
Comment 2 Justin Shafer 2013-02-24 12:27:34 UTC
Here is the source I am using..

For instance I had to add these lines as I cannot always "get to" Message Boxes in OSX. They display behind a window and no matter what I cannot access it.. So I have to comment it out.

ProgramEntry.cs Line 23 OpenDental
//if(processes[i].ProcessName.StartsWith("OpenDental")) {
					//isSecondInstance=true;
					//break;
				//}
FormPath.cs Line 365 OpenDental
//MsgBox.Show(this,"Could not find the path for the AtoZ folder.");

http://opendentalsoft.com/forum/viewtopic.php?f=2&t=4892