Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

crash VBAI when it calls a vi

I have a cauchemard which name is Vision!!!

 

I have a problem to which I didn't find solution for 5 moths!!

 

I call a vi in an inspection in VBAI. this Vi call a .dll file to communicate with a device. The problem is that the VBAI crashs when it execute this inspection.

 

I launch the application it crashs..

I repeat it crashs..

I repeat again ...

Until it dosen't crash , after that it works properly for long time (12h).

If we close the inspection... and launch it, it crashs!! and the same scenario come back!

Some time it return this error " Memory manager .cpp" or "insufficient memory".

 I increase the Ram capacity of the PC to 1G. and no change.

 

The vi, when it works alone there is no problem. Some times the execution is heavy and that's all. 

 

You will say to me that the problem is in the .dll.  I have to use it. Why it is used in other programs and it dosen't matter?

 

Please find in attachement the Vi and .Dll

0 Kudos
Message 1 of 4
(3,258 Views)

I tried the VI calling the DLL and it crashed my LabVIEW (I probably didn't have the right HW or something). I would recommend generating LV code from the VBAI inspection under Tools>>Migrate Inspection to LabVIEW...

Once you have the inspection in LV, you can see if it is reproducible outside of the VBAI application. If it still crashes, you can put break points when the VI reference to your VI is opened, and executed in the Run LabVIEW step, and see where it is crashing. Just opening the VI was taking 10 seconds to load the DLL on my system...FYI

 

Its also worth noting that Vision Builder AI 2009 opens VIs using the connector pane (a single unwired terminal is now required in 2009), and this has performance improvements and it keeps the VI reserved instead of having the VI become unreserved after running the step and this may have an impact on the behavior since the DLL will not be unloaded in VBAI 2009, but I think it is loaded/unloaded in previous versions. I would recommend trying VBAI 2009 if you can't reproduce the crash in LV.

0 Kudos
Message 2 of 4
(3,250 Views)

Hi,

You have just to fix the value of the parameter String in the call library function node (512 or 1024 for exemple).

That is all 🙂

0 Kudos
Message 3 of 4
(2,771 Views)

Smiley Wink

0 Kudos
Message 4 of 4
(2,761 Views)