06-24-2016 06:40 PM
Hello,
I have a problem. I have a test dll that makes calls to both Ballard Arinc 429 API and the Ballard Arinc 708 API. I have an initialization function in the DLL that calls these API functions. A step in my test sequence calls this function. When I'm running this sequence in the sequence editor, everything works fine. When I switch to the custom GUI that opens an engine instance to Test Stand Engine, to run that same sequence, it dies a miserable death. No error code produces literally the sequence just stops at that step with not output. Running through the CVI debugger shows the a general protection fault occurred when the first call was made to the Ballard Arinc 708 API. Note the calls to the Ballard Arinc 429 library worked just fine. I don't doubt that this may indicate a problem on Ballard's end with respect to the Arinc 708 API or at their kernel driver. My question is more why does it work when run through the sequence editor? It's calling the same sequence I developed, and the same test DLL I developed, making the same API calls. My thought was somehow that subordinate dll's are loaded differently perhaps, or maybe DLL search paths are different between the two are different. Any help in appreciated.
Test Stand 2014 32-bit
LabWindows/CVI 2015 32 bit
Windows 10
06-27-2016 07:28 AM
Did you try standard GUIs provided with TestStand? Do they also generate the issue?
My guess is that it is some timing issue. E.g. disable tracing could create issues with slower instruments as tracing slows down sequence execution....
Norbert
06-27-2016 07:58 AM
Which process modell are you using?
06-27-2016 09:07 AM
Another thing to consider is the location of the dll. Is it in the same directory as seqedit.exe for examples? Or is it perhaps in the current working directory of the sequence editor, but not the UI? Also what do you mean by general protection fault? Do you mean you are getting an Access Violation exception?
-Doug
06-27-2016 01:00 PM
Try to answer as many of the previous questions here:
Did you try standard GUIs provided with TestStand? Do they also generate the issue?
I hadn't done this yet. Very good idea.
My guess is that it is some timing issue. E.g. disable tracing could create issues with slower instruments as tracing slows down sequence execution....
I don't believe so. Tracing really only should affect the timing at the sequence level, not when you are already in dll. All of the instrumentation calls in question are within same step.
Which process modell are you using?
Batch.
Is it in the same directory as seqedit.exe for examples?
The dll's in question. My test dll, was in it's own development directory. The API in question and the corresponding kernel dll, were in windows directories. I had this thought as well, as that proved an issue with some Excalibre cards a couple years back, that the API DLL could be wherever it wanted but the kernel level dll needed to by in the same directory as the process. I tried it though and no change.
Also what do you mean by general protection fault?
When running through the seqedit.exe all works great. When runnning release builds it literally just stops when it gets to the first function call to the Arinc 708 API. I added a series of popup messages to determine where it was stopping, once I did, I ran everything through the CVI debugger. When it got to that point it gave an error that said General Protection Fault at unknown address. The function itself never returned so no error code. Basically seemed like it couldn't load or execute the function.
Thanks everybody for the responses.
06-27-2016 05:25 PM
In reference to:
Did you try standard GUIs provided with TestStand? Do they also generate the issue?
Now I have tried this. Same result as my custom GUI. Seqedit.exe currently is the only way that my code works.
06-28-2016 12:45 AM
@BobMancuso wrote:
...Which process modell are you using?
Batch.
...
My idea was, you might have issues with parallel access to the dll originating from multiple UUTs. But I guess when you are running from SeqEdit, you also use the process model instead of just running the MainSequence without the modell?
06-28-2016 03:30 PM
Additionally,
Where this is called from is in the Pre-Batch call back. Separate threads aren't created yet.
06-29-2016 02:55 AM
@BobMancuso wrote:
In reference to:
Did you try standard GUIs provided with TestStand? Do they also generate the issue?
Now I have tried this. Same result as my custom GUI. Seqedit.exe currently is the only way that my code works.
Which one did you try? Can you also try both the MFC C++ and the .NET version?
Does this happen always, or is it OK for the first execution but after that it is occuring?
Norbert
06-29-2016 10:29 AM
I tried all of the example operator interfaces, but simple and full featured. All of them behaved the same, and none worked.