Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

An exception occured within the external code called by Call Library Node - How to fix it ?

Using LabView 7.1 with Imaq 3.1.3 on windows XP, I sporadically get the error message : An exception occurred within the external code called by Call Library Node... (see screenshot attached).
 
The error message is pointing several Imaq VIs (not always the same). Most of the time, my application works well and I can't figure out the cause of this error. Sometimes, Labview crash after the error, sometimes not.
 
Note that this appear while using two PCI-1426 acquisition cards (a VI with only one card works well). I also try my application in a new computer and the problem is still there.
 
I found several posts about this error message on the forum, but most of them end by "I'm in contact with a NI application engineer" and no final solution are explained. Some suggests that data may be corrupted somewere, other talks about keeping Imaq-Init/Create/Close on the same level... is there some design rules to be sure to avoid this kind of errors ?
 
Thank's again for your help !
 
David
 
 
 
0 Kudos
Message 1 of 14
(6,589 Views)
Hi David,
 
The problem you have described does indeed sound quite odd.  To clarify, when you use one 1426 you seem to have no errors, but the problem begins when you are using multiple 1426s in the same machine? 
 
If this is the case, when operating system are you working on, and can you attach the code you are using when this error is seen?
 
Thanks,
 
Robert
0 Kudos
Message 2 of 14
(6,562 Views)
Hi Robert,
 
Thank you for your reply.
 
Effectively, I first see this error screen while using two 1426 on the same computer.
 
I don't have access to the faulty computer for the moment. But can this error be caused while using SUB-VIs to control the acquisition cards ? I do the INIT in the main window, and after I pass the device ID to multiple home-made SUB-VIs to setup the acquisition parameters, start the acquisition and get the buffers. I finally do the CLOSE in the same window than the INIT. Can the use of SUB-VIs sometimes causes memory corruption by accidently allocating the same memory to the two occurences of the 1426 used ?
 
Regards,
 
David
0 Kudos
Message 3 of 14
(6,558 Views)

For those it may interest...

I think I have found a solution to my problem.

I was using several acquisition functions in a loop. Since I don't want to re-initialize and close the acquisition card each time, I use "IMAQ Close" only when stopping the application. But, for my application, I need to use the "Imaq List Buffer" at each iteration to allow the user to modify the acquisition time (and implicitly the number of buffers) . After each iteration, I use "IMAQ dispose" to free up the memory. But it don't seem to be enough... if I add the very low-level vi "imgDisposeBufList.vi" after each iteration, I don't see the error anymore.

I hope this is not just a coincidence !

 

 

0 Kudos
Message 4 of 14
(6,535 Views)
Hi David,
 
I'm glad that you seem to have found the problem in your code.  Properly managing memory and interfaces can be tricky.
 
Let us know if it comes back!
 
Regards,
 
Robert
 
0 Kudos
Message 5 of 14
(6,531 Views)
I am having the same problem, but with a single pci-6229 card installed. It seems to be happening at random times without changing the input conditions. I also am running Labview 7.1 on a Windows 2000 machine. The computer must be restarted before the program may be run again. The error message is attached. Any suggestions or fixes would be greatly appreciated.
0 Kudos
Message 6 of 14
(5,946 Views)

Hi,

 

 

Thank you for posting to the NI forums.  Which version of the DAQmx driver are you using?  If you are not using the most current, I would recommend upgrading to DAQmx version 8.3.1.

 

 

If this does not fix the problem, please reply back with some more specifics of your application – what type of data acquisition you’re doing, is it continuous or finite, etc.

 

 

Best regards,

 

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 7 of 14
(5,922 Views)
Hi!
I've the same problem even working whitout use any acquisition device, just working on pre-acquired photos.

The error occour usually when I use a library block (IMAQ find circles) but is randomic, few times the application
go on well and other times crash and I must restart LabView.

I work using a loop that charge a photo from a file and then elaborate the image but I don't dispose any time the
image; I create the image just before starting the loop and I dispose it at the end. That should be a problem?

I can't use as said the imgDisposeBufList.vi as I don't use a device.

Someone could help me?

Matteo


0 Kudos
Message 8 of 14
(5,664 Views)

Hello Matteo,

Could you post more information about the context you are receiving the error in?  From your post it sounds like you are doing things properly, however, you may want to ensure that you are only loading outside of the loop.  You may want to post your code so we can take a look.

Regards,

Jasper S

0 Kudos
Message 9 of 14
(5,645 Views)
Hi Jasper,
It's difficult for me undestand where could be the problem, I mean, I'm not so sure that problem is in the VI that send me this error. I've the impression that the problem could be some error managin memory or something. Moreover the vi work properly alone and also in the application often I haven't any error. Anyway I'll post the my VI, I hope that will be useful.

Matteo
0 Kudos
Message 10 of 14
(5,573 Views)