NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Differences in how subordinate DLLs get loaded between Sequence Editor vs. Custom GUIs

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

0 Kudos
Message 1 of 13
(4,063 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 13
(4,033 Views)

Which process modell are you using?

0 Kudos
Message 3 of 13
(4,030 Views)

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

0 Kudos
Message 4 of 13
(4,023 Views)

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. 

0 Kudos
Message 5 of 13
(4,005 Views)

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.

 

0 Kudos
Message 6 of 13
(3,995 Views)

@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?

0 Kudos
Message 7 of 13
(3,985 Views)

Additionally,

Where this is called from is in the Pre-Batch call back.  Separate threads aren't created yet.

0 Kudos
Message 8 of 13
(3,970 Views)

@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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 13
(3,957 Views)

I tried all of the example operator interfaces, but simple and full featured.  All of them behaved the same, and none worked.

0 Kudos
Message 10 of 13
(3,938 Views)