NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

restart the sequence editor .NET

Hello,

I'm using .NET dll's with TestStand, and often I get this problem: When I select more than one step in the sequence, to change a parameter, I get the message "An error ocurred. Please save your work and restart the sequence editor". The message just stays there if I select other steps, the only solution is to restart TS. This is very annoying, the only workaround is not to select more than one step at a time, but then I loose the possibility to edit some parameters for several steps which would remain equal.

 

Any ideas? At least a way to get around this without having to shut TS down would be nice.

 

Thanks!

0 Kudos
Message 1 of 10
(4,942 Views)

Hi,

 

What Teststand version are you using?

 

regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 10
(4,937 Views)
I'm using 4.2 (4.2.0.134)
0 Kudos
Message 3 of 10
(4,935 Views)
...Any suggestions?
0 Kudos
Message 4 of 10
(4,874 Views)

Hi paicolman,

 

I'm currently trying to reproduce this issue but haven't had any luck. Could you possibly provide sample files that reproduce this behavior?

 

Thanks!

Manooch H.
National Instruments
0 Kudos
Message 5 of 10
(4,858 Views)

Hello forum,

 

I had put this "on ice" since we had a lot of other things to do, but now I managed to "isolate" this problem as much as possible. I have attached a zip file with the sequence file and the dll's we use with testStand (compiled from .Net code). The sequence calls a method, which takes three parameters from different enums in that dll.

 

To reproduce:

- Open the file

- Selct the SubSequence

-Click on the first line (Action 1)

-Shift-click on the last line to select all.

 

In my case, I get in the step properties pane the "An error has occured. Please save your work and restart the sequence editor" message.

 

If I do it differently, like selecting first the last and then the first, or select them by ctrl-clickiung, everything works fine.

 

Any suggestions why this can be? Is it something wrong while reading the contents of the enums?

 

Thanks in advance!

 

0 Kudos
Message 6 of 10
(4,548 Views)

Hi paicolman,

 

for what it's worth: the good news is that I can reproduce your problem.
Otherwise, if I click on each Action, one by one, and select then all the Actions (with shift...), no error. 

 

Don't know if I'm correct, but you don't create an object of your FSTClient.dll ?
You're using an Object Reference 'Locals.myObjectRef' which is Nothing all the time.
The problem is also that the dll doesn't have a constructor, so that could be a problem if you want to create an object.

My suggestion: define a constructor in your dll, and in the SequenceFileLoad callback, create an object and assign the Locals.myObjectRef' to it.
And Dispose your object in the SequenceFileUnload.


HTH

0 Kudos
Message 7 of 10
(4,545 Views)

It is not wise to use the SequenceFileLoad and SequenceFileUnload for this purpose because once their executions has completed all references will not be valid.

 

Better to use ProcessSetup and ProcessCleanup.

 

regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 10
(4,540 Views)

HHi,

 

Thanks for the answers. This file is only a trial, that's why the object is not initialized. In our real sequence, the object is initialized, but the method called is within an interface, who's implementing class is defined internally in the c# code (that's why it does not have a constructors, interfaces are not allowed to have them, they are in the implementing class...).

 

The thing is, I would not expect TS to fail in such a way just by selecting steps in a sequence... The object reference should be defined at runtime, so if I'm editing and happen to select some steps, it's quite annoying to have TS "crashing".

 

The whole assembly runs quite OK, but I get no clue from TS of what is he unhappy with...

0 Kudos
Message 9 of 10
(4,533 Views)

paicolman -

 

Thank you for bringing this to our attention and providing the necessary files with exact steps to reproduce the behavior. I have informed R&D of this issue (219514). We will look into it in hopes of finding the cause.

 

Thanks again.

Manooch H.
National Instruments
0 Kudos
Message 10 of 10
(4,490 Views)