Groups | Blog | Home
all groups > c# > july 2005 >

c# : NullReferenceException in System.Windows.Forms.SafeNativeMethods.MessageBox


Greg Bacchus
7/11/2005 10:43:15 PM
Hi, I'm getting an exception that really has me stumped. It's sporadic
at best, it's only happened a handful of times.
This particular time it happened when the user pressed 'Alt-S' to save
the data that they were entering.

Following is all exception information.

Any thoughts much appreciated.

Cheers
Greg


User: *****
When: 2005-07-12T16:00:52
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Windows.Forms
Site: Int32 MessageBox(System.Runtime.InteropServices.HandleRef,
System.String, System.String, Int32)

Trace:
at System.Windows.Forms.SafeNativeMethods.MessageBox(HandleRef hWnd,
String text, String caption, Int32 type)
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner,
String text, String caption, MessageBoxButtons buttons, MessageBoxIcon
icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(IWin32Window owner, String
text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
at ConsignmentUI.Process.ShowConsignment.SaveClicked(Object sender,
EventArgs e)
at ConsignmentUI.Components.Pages.ConsignmentPage.OnSaveClicked()
at
ConsignmentUI.Components.Pages.ConsignmentPage.buttonSave_Click(Object
sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at IndigoControls.ImageButton.OnClick(EventArgs e)
at IndigoControls.ImageButton.PerformClick()
at IndigoControls.ImageButton.ProcessMnemonic(Char charCode)
at System.Windows.Forms.Control._ProcessMnemonic(Char charCode)
at System.Windows.Forms.ContainerControl.ProcessMnemonic(Char
charCode)
at System.Windows.Forms.ContainerControl.ProcessDialogChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.ContainerControl.ProcessDialogChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.ContainerControl.ProcessDialogChar(Char
charCode)
at System.Windows.Forms.Control.ProcessDialogChar(Char charCode)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at
System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG&
msg)
Madestro
7/13/2005 6:33:06 AM
Hi there,

You appear to be using a COM component in your application. Apparently the
component produces an error.
I am not sure though, tough to tell without the code.

Good luck!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't like
to do.
E.M. Gray


[quoted text, click to view]
Greg Bacchus
7/14/2005 3:01:21 PM
Ahh... where do you see that? I am using the HTML browser control but
nowhere near this part of the program... shouldn't even be loaded
here...

Greg
AddThis Social Bookmark Button