Exception message

D

Darin

Some of our customers get this message, occasionally and randomly. What
does it mean and what can I do to trap it or (better yet) fix it so it
doesn't occur?

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.WndProc.Invoke(IntPtr hWnd, Int32 msg, IntPtr
wParam, IntPtr lParam)
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)



I know this might not be a lot of information but I don't know where to
start. Since it is random (I haven't ever duplicated it), it must be
something unique to them.



Darin
 
C

Chris

Darin said:
Some of our customers get this message, occasionally and randomly. What
does it mean and what can I do to trap it or (better yet) fix it so it
doesn't occur?

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.WndProc.Invoke(IntPtr hWnd, Int32 msg, IntPtr
wParam, IntPtr lParam)
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)



I know this might not be a lot of information but I don't know where to
start. Since it is random (I haven't ever duplicated it), it must be
something unique to them.



Darin

this error mean the object you are trying to reference is set to
nothing. So something like this is happening

Dim Obj as Object
Obj = nothing
Obj.ToString() <- Throws error.
 
H

Herfried K. Wagner [MVP]

Darin said:
Some of our customers get this message, occasionally and randomly. What
does it mean and what can I do to trap it or (better yet) fix it so it
doesn't occur?

* When does the exception occur?

* Are you using multiple threads? If you are doing so, are you sure you
are using invoking techniques to access forms and controls from other
threads?
 
D

Darin

It seems most errors happen in my Processing Occuring window defined as:

Public Class cMyWaitForm
Inherits fLBPleaseWait
Private tText As String

Public Property iisText() As String
Get
Return tText
End Get
Set(ByVal value As String)
tText = value
End Set
End Property

Sub New()
MyBase.StartPosition = FormStartPosition.CenterScreen
MyBase.WindowState = FormWindowState.Normal
If Not IsBlank(tText) Then
MyBase.lText.Text = "Processing " & Trim(tText) & "Please Wait"
End If
MyBase.Show()
MyBase.Refresh()
MyBase.Cursor = Cursors.WaitCursor
End Sub

Private Sub cMyWaitForm_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
MyBase.Cursor = Cursors.Default
End Sub
End Class

I do the following when I need a please wait form:

dim xwait as new cmywaitform
xwait.show

When I am done w/ it, I do:

xwait.close

Now, should I force a xwait.dispose to clear out everything or will the
close do that instantly?

Darin
 

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