NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX and some other errors

Hi,

 

Pretty much since the start of this project I've been getting some errors regarding ActiveX. I have been ignoring them until now since I was unable to fix them. Some of the errors show up if a sequence fail. I might get a list of unreleased threads that start something like this

 

 References to PropertyObjects were not released properly.

              Total number of objects: 38811

              Number of top-level objects: 258

 

I'm not so much worried about this error. I think it's just a consequence of me forcing the program to kill all the treads. What causes the program to crash is a bit more worrying though.

 

I've had a discussion earlier regarding the dll's I'm using in my program. An explanation of what's going on in the sequence and some opinions about it can be found in this thread.

 

Here are some of the errors I'm getting:

 

error1.JPG

 

 

error2.JPG

 

 

error3.JPG

 

 

Any input on what's going on and how to fix this would be greatly appreciated!

 

0 Kudos
Message 1 of 15
(3,655 Views)

Why are you forcing the program to kill all threads? Killing threads often leaves a process in a bad state since the thread could have been in the middle of doing just about anything and was thus not cleaning up the resources for what it was doing properly.

 

-Doug

0 Kudos
Message 2 of 15
(3,640 Views)

I've only forced the program to kill all threads if it hangs. It might be because I tried something new that didn't work. After I've killed the threads I always close TestStand and start over. Should I use abort instead and wait for it to close?

 

The really issue is the ActiveX error that can pop up when everything seems to be running normally. I just can't seem to get rid of it.

0 Kudos
Message 3 of 15
(3,637 Views)

Let me make sure I understand. Are the errors you are talking about something that only happens when you kill threads or happens even when you don't kill threads?

 

-Doug

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

The unreleased objects happen when I kill threads. The ActiveX and 18001 related errors, the errors I have screen shots from, happen randomly when TestStand tries to run one of the VIs in my sequence. It seems to happen once every hour or two when my sequence is running.

 

Sorry fir the confusion

0 Kudos
Message 5 of 15
(3,616 Views)

Getting leaks when killing threads is definitely an expected possibility.

 

The other errors you are gettings are likely caused by something the VIs are doing, especially the access violation. The mostly likely cause of crashes like that are when calling into dlls or passing structs to dlls with the wrong prototype. Such calls can lead to random crashes and memory corruption. Ideally, if you can narrow down the VIs which must be called in order for the problems to occur, you can then look at those VIs more carefully to see if there are any problems with what they are doing. If it really is a memory corruption issue, then the location of the crash doesn't necessarily indicate the location of the error. But if you notice it always crashing at around the same place that might give you a clue. If there are changes you can make to the sequence that makes it happen more or less often, that could also give you a clue as to the VIs involved.

 

Hope this helps,

-Doug

0 Kudos
Message 6 of 15
(3,611 Views)

Thank you for your reply Doug.

 

I found this in the knowledge base:

http://digital.ni.com/public.nsf/allkb/5C692ACB049D0D30862575710051601F

 

I thought I would try it out, although I'm not really sure what settings to use or even what the run time engine is.

 

What you said about the dlls might be right. I built my VIs from a demo program that came with a serial board we purchased from General Standards, which calls a bunch of dlls. In the thread I linked to in my first post, the demo program got some critiques to say the least.. The calls to the dlls still has a few red coercion dots I couldn't get rid of. Do you think this might be the problem? What exactly do you mean by "passing structs to dlls with the wrong prototype"? I don't believe I'm passing anything other then numbers to the dlls.

 

Thanks again!

0 Kudos
Message 7 of 15
(3,602 Views)

I thought I'd mention some of the specifics about my project that could create this problem:

 

-Some of the VIs I use may have been created on an older version of LabVIEW. I used a demo program and then built on that.

-The dlls are using the UI thread configuration.

-One of the VIs that log serial data contains two loops that run in parallel; one that runs a subVI that contain all the dlls and one that uses a timer that sets a global variable that forces the other loop to exit. Maybe the reading/writing to this global is creating problems?

-I'm running a VI that only contains a VISA to write strings over GPIB quite often. All it contains is the VISE write function, a string input and the address for the GPIB instrument. The error sometimes appear when this VI is run.

-I'm creating binary files that I write data to in one of the VIs. This is happening in a stacked sequence along with the dll calls. I'm not certain I'm properly closing the file before the VI exits.

-I'm passing the UUT name as an input to one of the VIs. This is marked with red before I run the program, but it evaluates correctly at run time.

0 Kudos
Message 8 of 15
(3,593 Views)

Hi q-bertsuit,

 

In order to investigate the root cause of this issue, we'd like to take a look at the LabVIEW crash information.  Please attach the latest crash information file to this thread.  The file can be accessed from the LabVIEW crash dialog by clicking the "View Report" Link.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 9 of 15
(3,576 Views)

It sounds like you're seeing the same thing I'm seeing.  The sequence is running normally and then LabVIEW will crash at a random location.  Once the crash occurs, you see the TestStand dialog with the ActiveX Automation server error message, but the cause of that is the LabVIEW crash.

John

0 Kudos
Message 10 of 15
(3,571 Views)