Bugzilla – Bug 325470
[2.0] MenuStrip: NRE in ToolStripManager.ProcessMenuKey
Last modified: 2007-10-29 14:34:55 UTC
---- Reported by gert.driesen@pandora.be 2007-09-11 13:51:30 MST ---- When using the keyboard to drop down a menu, a NullReferenceException is thrown in ToolStripManager.ProcessMenuKey: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at System.Windows.Forms.ToolStripManager.ProcessMenuKey (System.Windows.Forms.Message&) <0x0011d> at System.Windows.Forms.Control.WmSysKeyUp (System.Windows.Forms.Message&) <0x00113> at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x002ff> at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message&) <0x0000d> at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message&) <0x0000d> at System.Windows.Forms.ToolStripDropDown.WndProc (System.Windows.Forms.Message&) <0x00059> at ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00014> at ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00022> at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0015c> at System.Windows.Forms.XplatUIWin32.InternalWndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00046> at (wrapper native-to-managed) System.Windows.Forms.XplatUIWin32.InternalWndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0004d> at (wrapper managed-to-native) System.Windows.Forms.XplatUIWin32.Win32DispatchMessage (System.Windows.Forms.MSG&) <0x00004> at System.Windows.Forms.XplatUIWin32.DispatchMessage (System.Windows.Forms.MSG&) <0x0000a> at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&) <0x00015> at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00735> at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00024> at MainForm.Main () <0x0001f> To reproduce: 1. compile and run the attached source code. 2. follow the on-screen instructions. ---- Additional Comments From gert.driesen@pandora.be 2007-09-11 14:03:51 MST ---- Created an attachment (id=172667) Repro ---- Additional Comments From monkey@jpobst.com 2007-09-13 12:59:38 MST ---- I think this is fixed in r85763, but please verify as I had a hard time consistently reproducing the bug. Thanks! 2007-09-13 Jonathan Pobst <monkey@jpobst.com> * ToolStrip.cs: Don't FocusInternal if there is no selected item. This was causing keyboard opened dropdowns to lose focus. [Fixes https://bugzilla.novell.com/show_bug.cgi?id=MONO82803] Imported an attachment (id=172667) Unknown operating system unknown. Setting to default OS "Other".
The only remaining issue is that on Mono the mnemonic character are underlined when the Alt is released, while on MS these are displayed immediately when the Alt key is pressed.
Created new bug (337522) for mnemonic issue. Closing this one as fixed.