Bug 325470 (MONO82803) - [2.0] MenuStrip: NRE in ToolStripManager.ProcessMenuKey
Summary: [2.0] MenuStrip: NRE in ToolStripManager.ProcessMenuKey
Status: RESOLVED FIXED
Alias: MONO82803
Product: Mono: Class Libraries
Classification: Mono
Component: Windows.Forms (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Jonathan Pobst
QA Contact: Mono Bugs
URL:
Whiteboard: Strip
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 20:51 UTC by Gert Driesen
Modified: 2007-10-29 14:34 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Repro (8.45 KB, text/plain)
2007-09-11 21:03 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:53:19 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".

Comment 1 Gert Driesen 2007-09-18 12:53:54 UTC
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.
Comment 2 Jonathan Pobst 2007-10-29 14:34:55 UTC
Created new bug (337522) for mnemonic issue.  Closing this one as fixed.