Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Base class defined and initialized variables loose initialization in subclass.

Reply
 
Old 12-02-2008   #1 (permalink)
Trygve Lorentzen


 
 

Base class defined and initialized variables loose initialization in subclass.

Hi

I have a very strange problem. In my development environment it works fine
and as expected to access base class member objects that have been
instantiated in the base class from a derived class. However, when I copy
the exact same program to my production server I always get the "Object
reference not set to an instance of an object" exception when trying to
access the base class objects member. I am running .net 3.5 SP1 in both
environments. The only real difference is that the dev environment is Win2k3
server 32 bit and the production server is 64 bit version of the same OS.

Is the .net installation FUBARed on the production server? Or is there some
settings for .net regarding how inheritance is handled that I'm completely
unaware of? I think it is really bad that the same excutables doesn't work
in the same way on different machines.

Best regards,
Trygve Lorentzen



My System SpecsSystem Spec
Old 12-02-2008   #2 (permalink)
Trygve Lorentzen


 
 

Re: Base class defined and initialized variables loose initialization in subclass.

Sorry everybody,

it was some bad error handling that caused this sideeffect after refactoring
some old code (moving common code into base class).

Trygve

"Trygve Lorentzen" <trygveloAThaldenDOTnet> wrote in message
news:eFIWh4FVJHA.1188@xxxxxx
Quote:

> Hi
>
> I have a very strange problem. In my development environment it works fine
> and as expected to access base class member objects that have been
> instantiated in the base class from a derived class. However, when I copy
> the exact same program to my production server I always get the "Object
> reference not set to an instance of an object" exception when trying to
> access the base class objects member. I am running .net 3.5 SP1 in both
> environments. The only real difference is that the dev environment is
> Win2k3 server 32 bit and the production server is 64 bit version of the
> same OS.
>
> Is the .net installation FUBARed on the production server? Or is there
> some settings for .net regarding how inheritance is handled that I'm
> completely unaware of? I think it is really bad that the same excutables
> doesn't work in the same way on different machines.
>
> Best regards,
> Trygve Lorentzen
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to access variables defined on another form .NET General
Test if a variables is defined or not .NET General
Using a Delegate to Simulate Invoking Events in Base Class .NET General
Creating a Custom Enumerator in a Base Class .NET General
Setting java class variables Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46