S
Simon Verona
I have a strange problem with a Windows Forms application.
It installs and runs fine on my development machine but consistently comes
up with errors on any installed machine.
I get an error about an unhandled exception as the application starts up.
If I go to debugger I get the error showing as :
[thread 0x1220] Unhandled exception generated: (0x04941b54)
<System.NullReferenc
eException>
_className=<null>
_exceptionMethod=<null>
_exceptionMethodString=<null>
_message=(0x04942e38) "Object reference not set to an instance of an
object."
_innerException=<null>
_helpURL=<null>
_stackTrace=(0x04942eb4) array with dims=[60]
_stackTraceString=<null>
_remoteStackTraceString=<null>
_remoteStackIndex=0x00000000
_HResult=0x80004003
_source=<null>
_xptrs=0x0012ed28
_xcode=0xc0000005
I've attempted to trace the problem in my code by inserted msgbox lines to
work out where it falls over.
The form is an inherited form (which itself inherits from a standard Windows
Form). It seems to crash as it instantiates a user control on the form.
The line it appears to fall over on is :
Me.DmsTextBox1 = New DMSControls.DmsTextBox
DMSTextBox is my usercontrol. If I put a msgbox before this line I see
it.
The start of the usercontrol reads:
Public Sub New()
MyBase.New()
MsgBox("Start_Input_Box")
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
You never see the msgbox that is at the top of this form....
I'm lost as to what the problem might be!
Anybody any further clues as to what I can do to locate / fix the problem?
The application was developed using VS.Net 2003. The deployed machine is a
Windows 2000 Server, with the .Net framework distributable V1.1 installed.
The project is deployed as an msi built as an install project in VS .net
2003.
Regards
It installs and runs fine on my development machine but consistently comes
up with errors on any installed machine.
I get an error about an unhandled exception as the application starts up.
If I go to debugger I get the error showing as :
[thread 0x1220] Unhandled exception generated: (0x04941b54)
<System.NullReferenc
eException>
_className=<null>
_exceptionMethod=<null>
_exceptionMethodString=<null>
_message=(0x04942e38) "Object reference not set to an instance of an
object."
_innerException=<null>
_helpURL=<null>
_stackTrace=(0x04942eb4) array with dims=[60]
_stackTraceString=<null>
_remoteStackTraceString=<null>
_remoteStackIndex=0x00000000
_HResult=0x80004003
_source=<null>
_xptrs=0x0012ed28
_xcode=0xc0000005
I've attempted to trace the problem in my code by inserted msgbox lines to
work out where it falls over.
The form is an inherited form (which itself inherits from a standard Windows
Form). It seems to crash as it instantiates a user control on the form.
The line it appears to fall over on is :
Me.DmsTextBox1 = New DMSControls.DmsTextBox
DMSTextBox is my usercontrol. If I put a msgbox before this line I see
it.
The start of the usercontrol reads:
Public Sub New()
MyBase.New()
MsgBox("Start_Input_Box")
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
You never see the msgbox that is at the top of this form....
I'm lost as to what the problem might be!
Anybody any further clues as to what I can do to locate / fix the problem?
The application was developed using VS.Net 2003. The deployed machine is a
Windows 2000 Server, with the .Net framework distributable V1.1 installed.
The project is deployed as an msi built as an install project in VS .net
2003.
Regards