NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does Step Fail cause a Lost ActiveX Connection Runtime Error?

A Step failure is a legitimate event. It should be recorded and execution should pass to the next step or cleanup as set up in the sequence or Station config. But I get this 17702 runtime error popup everytime. The steps are setup as single threads, dynamically loaded and unloaded.
0 Kudos
Message 1 of 8
(4,789 Views)
Hello Bob,

Error -17702 is a CVI OLE (ActiveX) adapter error. This scenario that I'm familiar with is the following steps:

1) TestStand's CVI adapter is configured to "Execute Steps in an External Instance of CVI".

2) From TestStand, step into a CVI code module.

3) While inside the code module in CVI, click the "Stop" button. This stops the CVI debugger, and TestStand interprets this as error -17702. Here's the error message you see:

Error Message: Lost ActiveX connection to CVI. The CVI adapter will attempt to reconnect on next execution. [Error Code: -17702]

Note that if this scenario occurs, ALL CVI steps after this in the sequence will be marked with this same error number.

In the scenario I just described, the step is listed by TestStand wi
th a status of "Error", not "Failed".

Are your steps being marked with a status of "Error" or "Failed"? If they are listed as "Error", then an unrecoverable error (which kills the CVI debugger) is what has happened, and that needs to be corrected.

For instance, in the scenario I described above, the correction is to NOT click the "Stop" button; always let the CVI debugger execute through the code.

However, if your steps being marked with a status of "Failed", then perhaps something else is going wrong. I would first repair the installation of TestStand and CVI on your computer to see if that fixes the problem.

David Mc.
NI Applications Engineer
0 Kudos
Message 2 of 8
(4,783 Views)

I have this Error at my environment also. and it is happenning During run-time.

I Use the Test Stand to call the CVI that is calling an external DLL and afterwards is openning a UIR.

I don't have an access to the sources of the external DLL, but I know it is bouild in Borland commander,

and uses it's own GUI.

I assume this is a question of memory management conflicts.

Can I override this?

0 Kudos
Message 3 of 8
(4,620 Views)

I am also getting this error when stepping through a Labwindows CVI dll. The error occurs when a call is made to a routine in another dll which was compiled with Microsoft Visual C++.

Before I recompiled the Labwindows dll as a debug build it was working OK, so I think the links to the Microsoft dll should be OK. I have tried setting Teststand to execute steps in an external instance of CVI, and also running CVI with Teststand specified as an external process. Both give the same error at the same point.

 

 

0 Kudos
Message 4 of 8
(4,547 Views)
This may help with the problem Shahar is getting.
 
Instead of setting Teststand - Configure - Adapters to 'Execute steps in an external instance of CVI' I selected the 'Execute steps in process' option. Then I specified Teststand sequence editor as an external process in Labwindows/CVI. Selecting 'run' in Labwindows causes Teststand to run and I can now step through my dll files without errors.
 
I think the problem is caused by the external tscvirun Labwindows application that runs when step execution is specified as an external instance of CVI.  
0 Kudos
Message 5 of 8
(4,542 Views)

Sorry, mate. it does not help.

I have tried to use an external process module but I have the same problem 'Lost ActiveX Connection Runtime Error'.

I understand this problem does not come from the Borland DLL, since some other users in my company (not CVI application) are using the same DLL with no problem.

My only solution is an ugly one, using an exe with my GUI, updating an external file, that is being read for a while and is updaing some peremeters in the CVI DLL.

any other suggestion?

0 Kudos
Message 6 of 8
(4,533 Views)
Hi Shahar,

    The crux of this problem has something to do with an interruption of the ActiveX connection to CVI. TestStand uses ActiveX to open an external instance of CVI, then uses CVI's ActiveX interface to step into a running project. The -17702 is occurring when something interrupts that ActiveX connection.

You mentioned that you were calling  a Borland DLL - is it possible that this DLL is throwing an exception?

The best idea is to step through your code modules and see if the -17702 error is always occurring at the same point, basically trying to find some consistency to the problem.

Let me know Shahar, have a good one!
Dan Weiland
0 Kudos
Message 7 of 8
(4,496 Views)

Hi again,

This error always pops up in the 'RunUserInterface' function, inside my CVI code.

The Borland DLL does not throw any exception for my knowledge, and also when the same code is running under CVI no error is popping.

Smiley Mad

Shahar

 

0 Kudos
Message 8 of 8
(4,472 Views)