Strange deployment problem  
Author Message
wdaschner





PostPosted: Mon Dec 01 10:26:31 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem

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 de**** 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

Visual Studio297  
 
 
One





PostPosted: Mon Dec 01 10:26:31 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem Hmm,
This is a third party control right ?, I would suggest you
contact the vendors.

Regards - OHM

======================


> 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 de**** 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




 
 
Simon





PostPosted: Mon Dec 01 10:37:30 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem no not third party... I wrote it... It's just a usercontrol that contains a
text box. It's used to extend the standard textbox control for some custom
databinding etc. It works in other solutions, and runs fine on my
development system in this project.

What I can't see, is why it seems to fall over so early in the control!

It looks from the debug message that it's trying to dimension something, but
can't see what.

Not sure if this helps.

Simon


> Hmm,
> This is a third party control right ?, I would suggest you
> contact the vendors.
>
> Regards - OHM
>
> ======================
>

> > 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 de**** 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
>

>
>


 
 
EricJ





PostPosted: Mon Dec 01 10:40:58 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem probably not mutch help but anyway it wont hurt

are you sure that the server has al the updates from ms (probably not the
problem but i've had a pc acting up on me becouse of that)

are you sure that the installer isn't forgetting any references (since you
are using custom controls this could be an issue) do you use the user
control somewhere else? dous it work there? have you tried using the control
static (putting it somwhere on the form in designer instaid of using code)

hope it helps a bit
these things can be very hard to find

eric



> 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 de**** 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
>
>


 
 
Armin





PostPosted: Mon Dec 01 10:38:14 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem
> 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....

What if you put the msgbox *before* MyBase.New? Means:


Public Sub New()

MsgBox("MyBase.New()")

MyBase.New()

MsgBox("InitializeComponent")

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
 
Jay





PostPosted: Mon Dec 01 10:54:54 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem Armin,
> What if you put the msgbox *before* MyBase.New? Means:
>
> Public Sub New()
> MsgBox("MyBase.New()")
> MyBase.New()

However remember that the call to MyBase.New needs to be the very first
statement in the constructor, so the above code will not compile.

Hope this helps
Jay




> > 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....
>
> What if you put the msgbox *before* MyBase.New? Means:
>
>
> Public Sub New()
>
> MsgBox("MyBase.New()")
>
> MyBase.New()
>
> MsgBox("InitializeComponent")
>
> 'This call is required by the Windows Form Designer.
>
> InitializeComponent()
>
> 'Add any initialization after the InitializeComponent() call
>
> End Sub
>
>
> --
> Armin
>
> http://www.plig.net/nnq/nquote.html
> http://www.netmeister.org/news/learn2quote.html
>


 
 
One





PostPosted: Mon Dec 01 11:10:17 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem DMSControls.DmsTextBox is apparently not returning an object. As to why, I
dont know. If you change from Debug to Release on your development machine,
does this also exhibit the same problem ?

Can you simplify the problem by creating a new tempory form as a startup
form and without altering your control in anyway, recreate this. In other
words, without disturbing the project too much use the control on a new
starup form.

These sorts of things are difficult to deal with at best, you just need to
play Sherlock Homes and apply deducive reasoning.

Regards - OHM






> no not third party... I wrote it... It's just a usercontrol that
> contains a text box. It's used to extend the standard textbox
> control for some custom databinding etc. It works in other
> solutions, and runs fine on my development system in this project.
>
> What I can't see, is why it seems to fall over so early in the
> control!
>
> It looks from the debug message that it's trying to dimension
> something, but can't see what.
>
> Not sure if this helps.
>
> Simon
> "One Handed Man [ OHM ]"


>> Hmm,
>> This is a third party control right ?, I would suggest you
>> contact the vendors.
>>
>> Regards - OHM
>>
>> ======================
>>

>>> 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 de**** 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
>>





 
 
Simon





PostPosted: Mon Dec 01 11:09:51 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem It won't then compile.. says mybase.new must be the first line of the
subroutine....




> > 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....
>
> What if you put the msgbox *before* MyBase.New? Means:
>
>
> Public Sub New()
>
> MsgBox("MyBase.New()")
>
> MyBase.New()
>
> MsgBox("InitializeComponent")
>
> 'This call is required by the Windows Form Designer.
>
> InitializeComponent()
>
> 'Add any initialization after the InitializeComponent() call
>
> End Sub
>
>
> --
> Armin
>
> http://www.plig.net/nnq/nquote.html
> http://www.netmeister.org/news/learn2quote.html
>


 
 
Simon





PostPosted: Mon Dec 01 11:12:49 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem I've checked all the dll's that are there. The only possibility is a com
interop where I don't install the actual dll as it has it's own installer
(which has been installed).

I'm going to keep trying to locate the problem... I'm now looking at all the
module based dim statements in the usercontrol and putting msgbox's in each
of their constructors to try and locate if the problem is in there - I'm
presuming that these are instantiated before the constructor for the
usercontrol itself??

Regards
Simon


> probably not mutch help but anyway it wont hurt
>
> are you sure that the server has al the updates from ms (probably not the
> problem but i've had a pc acting up on me becouse of that)
>
> are you sure that the installer isn't forgetting any references (since you
> are using custom controls this could be an issue) do you use the user
> control somewhere else? dous it work there? have you tried using the
control
> static (putting it somwhere on the form in designer instaid of using code)
>
> hope it helps a bit
> these things can be very hard to find
>
> eric
>


> > 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 de**** 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
> >
> >
>
>


 
 
Simon





PostPosted: Mon Dec 01 11:22:16 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem Ok found the problem...

The user control creates an instance of another object (which is also home
grown), which trys to read some stuff from the registry. Unfortunately,
the registry settings is set by another bit of my software which wasn't
installed on these servers. I somehow had omitted a try/catch around the
registry reading code, which was falling over when it tried to traverse the
keys!

Strange error message though!

Thanks for the help

Regards
Simon


> probably not mutch help but anyway it wont hurt
>
> are you sure that the server has al the updates from ms (probably not the
> problem but i've had a pc acting up on me becouse of that)
>
> are you sure that the installer isn't forgetting any references (since you
> are using custom controls this could be an issue) do you use the user
> control somewhere else? dous it work there? have you tried using the
control
> static (putting it somwhere on the form in designer instaid of using code)
>
> hope it helps a bit
> these things can be very hard to find
>
> eric
>


> > 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 de**** 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
> >
> >
>
>


 
 
Armin





PostPosted: Tue Dec 02 07:50:56 CST 2003 Top

Visual Basic [VB] >> Strange deployment problem
> It won't then compile.. says mybase.new must be the first line of
> the subroutine....


Ahhh...yes ..ok.. I should have tested this. (sorry!)


--
Armin