NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the message popup not appear the first time when using the TestStand API?

I am using the TestStand 3.0 API and am trying to run a sequence file that contains one or more popup messages.
The first time the sequence is read, the message box does not appear and an access violation exception is raised by the TestStand engine.  The second and subsequent times the sequence is run, the message box appears and there are no exceptions.

I am new to this so any help would be appreciated.
0 Kudos
Message 1 of 6
(3,628 Views)

AutoT,

Could you post your sequence file?
Are you using the API to execute the sequence?
What happens if you execute the sequence in the TestStand sequence editor?
Could you provide more details about your use case?

Regards.

0 Kudos
Message 2 of 6
(3,628 Views)

The sequence file was created with TestStand and simply included a single popup.

I am using the following line to execute the sequence file:

    TS::SequenceFilePtr modelSeqFile = script->GetModelSequenceFile(&modelDescriptionString);
    myData.engine->NewExecution(script, entryPoint, modelSeqFile, VARIANT_FALSE, TS_ExecTypeMask_Normal);

    where script is simply  a sequence file pointer.

When I try running this from code the first time, the popup is not displayed and an error is encountered.  When it is run subsequent times, things run ok.

If the sequence is run in the TestStand sequence editor, it runs fine each time.

Regards,

AutoT

0 Kudos
Message 3 of 6
(3,624 Views)

AutoT,

What type of error do you get?
Could you attach the error description?

Thank you.

0 Kudos
Message 4 of 6
(3,622 Views)
I don't actually get an error message, I simply get an access violation if I run under Visual Studio.
0 Kudos
Message 5 of 6
(3,617 Views)

Autot,

I could not reproduce the behavior you describe.
Could you attach a simple example containing your sequence and simplified code.
It could be that you are getting the exception because of an invalid pointer.
I would recommend to make sure all the pointers are valid. (Probably you already did this)
You could try to call other API methods and verify you do not get the acces violation.

Antonio Lie.



 

0 Kudos
Message 6 of 6
(3,592 Views)