[Mono-bugs] [Bug 615940] New: [PATCH] NullReferenceException in context menu

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 21 10:17:16 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=615940

http://bugzilla.novell.com/show_bug.cgi?id=615940#c0


           Summary: [PATCH] NullReferenceException in context menu
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        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: dick at acm.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=370523)
 --> (http://bugzilla.novell.com/attachment.cgi?id=370523)
Test case

Run the attached test case, and right click at least once to show the context
menu.  With the context menu not displayed, press Cmd+A.  The following
NullReferenceException is thrown:


System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Windows.Forms.MenuTracker.FindItemByCoords
(System.Windows.Forms.Menu menu, Point pt) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.MenuTracker.GetItemAtXY (Int32 x, Int32 y) [0x00000]
in <filename unknown>:0 
  at System.Windows.Forms.MenuTracker.OnMotion
(System.Windows.Forms.MouseEventArgs args) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmMouseMove (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 



The attached patch fixes the issue.

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