Unhandled exception in Windows Forms

G

Guest

Hi

I have recentdly developed a large scale Windows Forms application and implemented it within our operation. Occasionly the application generates an unhandled exception as shown below

Error Source
System.Windows.Form

Error Message
Object reference not set to an instance of an object

Target Site Message
IntPtr CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr

Application Stack Trace
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at System.Windows.Forms.Control.WmUpdateUIState(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.ParkingWindow.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam

Please could anybody help with this
Regard
Jason Taylor
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi Jason,

The dialog showing the exception doesn't actually show the whole trace
stack. Try to catch that exception and examine the call stack in the
exception object. You may find some useful info there

--
HTH
B\rgds
100 [C# MVP]

Jason Taylor said:
Hi,

I have recentdly developed a large scale Windows Forms application and
implemented it within our operation. Occasionly the application generates an
unhandled exception as shown below.
Error Source:
System.Windows.Forms

Error Message:
Object reference not set to an instance of an object.

Target Site Message:
IntPtr CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)

Application Stack Trace:
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc,
IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at
System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at
System.Windows.Forms.Control.DefWndProc(Message& m) at
System.Windows.Forms.Control.WmUpdateUIState(Message& m) at
System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ScrollableControl.WndProc(Message& m) at
System.Windows.Forms.ContainerControl.WndProc(Message& m) at
System.Windows.Forms.ParkingWindow.WndProc(Message& m) at
System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at
System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at
System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top