09-01-2009 01:56 AM
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!
09-01-2009 05:23 AM
Hi,
What Teststand version are you using?
regards
Ray Farmer
09-01-2009 06:31 AM
09-09-2009 01:31 AM
09-09-2009 03:36 PM
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!
04-09-2010 02:04 AM
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!
04-09-2010 03:48 AM
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
04-09-2010 05:12 AM
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
04-09-2010 06:14 AM
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...
04-09-2010 02:28 PM
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.