Base class defined and initialized variables loose initialization in subclass.

  • Thread starter Trygve Lorentzen
  • Start date
T

Trygve Lorentzen

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
 
T

Trygve Lorentzen

Sorry everybody,

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

Trygve
 

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