[Mono-bugs] [Bug 448929] New: [PATCH] NRE navigating MDI menu with keyboard
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Nov 25 16:33:13 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=448929
Summary: [PATCH] NRE navigating MDI menu with keyboard
Product: Mono: Class Libraries
Version: SVN
Platform: All
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: equistango at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
This is a patch that adds some checks to MenuAPI.cs to avoid some NRE that show
only when navigating an MDI form's menu using the keyboard.
The third check (CurrentMenu is MenuItem) is specially important because for
some reason that escapes to me, the "sender" for MenuTracker.ProcessKeys()
-which is a MenuItem for a regular form or an MDI form with no active children-
is a ContextMenu for an MDI form with an active children. To reproduce the
problem, create an MDI application, open up a children form, activate any menu
and hit left-arrow twice.
Here are some dumps:
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Windows.Forms.MenuTracker.ProcessKeys
(System.Windows.Forms.Message& msg, Keys keyData) [0x0028e] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs:743
at System.Windows.Forms.Menu.ProcessCmdKey (System.Windows.Forms.Message&
msg, Keys keyData) [0x0000d] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Menu.cs:323
at System.Windows.Forms.Control.ProcessCmdKey (System.Windows.Forms.Message&
msg, Keys keyData) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4683
at System.Windows.Forms.TextBoxBase.ProcessCmdKey
(System.Windows.Forms.Message& msg, Keys keyData) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs:1100
at System.Windows.Forms.Control.InternalPreProcessMessage
(System.Windows.Forms.Message& msg) [0x00038] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4176
at System.Windows.Forms.Control.PreProcessMessage
(System.Windows.Forms.Message& msg) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4167
at System.Windows.Forms.Control.PreProcessControlMessageInternal
(System.Windows.Forms.Message& msg) [0x00064] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4142
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:PreProcessControlMessageInternal
(System.Windows.Forms.Message&)
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x0027d] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:953
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x0002e] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:776
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:759
at Lazaro.Aplicacion.IniciarNormal () [0x001a6] in
/home/usuario/Lazaro/Sistema/Clases/Aplicacion.cs:421
at Lazaro.Aplicacion.Main (System.String[] args) [0x003da] in
/home/usuario/Lazaro/Sistema/Clases/Aplicacion.cs:321
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Windows.Forms.MenuTracker.GetNextItem (System.Windows.Forms.Menu
menu, ItemNavigation navigation) [0x00035] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs:497
at System.Windows.Forms.MenuTracker.ProcessKeys
(System.Windows.Forms.Message& msg, Keys keyData) [0x001fc] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs:729
at System.Windows.Forms.Menu.ProcessCmdKey (System.Windows.Forms.Message&
msg, Keys keyData) [0x0000d] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Menu.cs:323
at System.Windows.Forms.Control.ProcessCmdKey (System.Windows.Forms.Message&
msg, Keys keyData) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4683
at System.Windows.Forms.TextBoxBase.ProcessCmdKey
(System.Windows.Forms.Message& msg, Keys keyData) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs:1100
at System.Windows.Forms.Control.InternalPreProcessMessage
(System.Windows.Forms.Message& msg) [0x00038] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4176
at System.Windows.Forms.Control.PreProcessMessage
(System.Windows.Forms.Message& msg) [0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4167
at System.Windows.Forms.Control.PreProcessControlMessageInternal
(System.Windows.Forms.Message& msg) [0x00064] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4142
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:PreProcessControlMessageInternal
(System.Windows.Forms.Message&)
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x0027d] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:953
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x0002e] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:776
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/home/usuario/mono/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:759
at Lazaro.Aplicacion.IniciarNormal () [0x001a6] in
/home/usuario/Lazaro/Sistema/Clases/Aplicacion.cs:421
at Lazaro.Aplicacion.Main (System.String[] args) [0x003da] in
/home/usuario/Lazaro/Sistema/Clases/Aplicacion.cs:321
--
Configure bugmail: https://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