NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

object reference not set message popup

Dear Fellow Teststand Developers,

 

I am developing tests using the C# adapter.

From time to time I get the following message when running the tests:

 

http://communities.vmware.com/servlet/JiveServlet/downloadImage/4227/error.JPG

 

I've been unable to locate the error because it dousn't happen very often.

The test keeps running when I get the message and dousn't fail because of it.

 

Anyone knows a way to locate the call generating this error ?

Maby there is a setting in teststand or windows to give more information about the error ?

(orriginating function call)

 

Teststand version : 4.0.1

Windows : XP SP3

 

Thanks,

Jeroen Coulembier

PsiControl Mechatronics

0 Kudos
Message 1 of 3
(3,564 Views)

Jeroen -

Here is some text I found that describes when this error typically occurs:

In .NET, types are either "value types" or "reference types". Value types are stored on the directly on the "stack" - a section of memory. Since they're addressed directly, they're initialized when they are created and you don't need a "New" operator for them. Reference types are objects stored on the "managed heap". They get their name because the variable actually consists of a pointer in memory - a reference - to the location of the object on the heap. Since reference types are actually pointers to memory, their value can be "Nothing". That is, there is no memory address. This can happen in a variety of ways and that's why this error can be so frustrating. The possibilities include:

  • You never assigned anything to the variable.
  • You never created an instance of the value assigned to the variable.
  • You set the variable equal to Nothing, or a called function did the same thing.

Questions:

  1. When the prompt occurs, is the TestStand application saying that it is running a specific test? Is it always the same test?
  2. If yes, does the test wait to complete until you click the OK button on the prompt?
  3. If yes, is the assembly that you are calling debuggable at the time of the prompt?
  4. If yes, can you attach a debugger to TestStand to see the native call stack and figure out what line is causing the problem?
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(3,524 Views)

Scott,

 

I cannot really see which test TestStand is calling at the moment of the pop-up, because the test dousn't wait to complete until I click the OK button on the prompt.

 

Regards,

Jeroen Coulembier

PsiControl Mechatronics

0 Kudos
Message 3 of 3
(3,519 Views)