08-23-2013 11:13 AM
Hello! I am new to this forum and LabVIEW.
I am currently working on a LabVIEW code for lab. The whole code comprises of C++, OpenCV, and LabVIEW.
Currently, LabVIEW is continously crashing when it hits the camera features such as brightness, gain, and shutter. In the terminal, it reads, "No cameras found." Later, as I proceed to step into the LabVIEW program to the camera features section, a segmentation fault occurs and LabVIEW crashes.
I am working with Ubuntu OS on Linux. Being new to this OS I am not sure what I can do to figure out what the problem is.
I have tested several cameras and no luck; I get the same crash.
Would checking the drivers help? I am not sure how to check the drivers on Ubuntu (it does not seem to have the measurement&automation software).
Thank you for your help!
08-23-2013 03:40 PM
Without seeing your code, this is more of a guess, but it sounds like you have a problem with calling the external code from LabVIEW. Did you set up the call library function nodes or are you using a library of VIs designed to provide an API for the external code. You have to be very careful that the nodes in LabVIEW are configured correctly so that the called code is accessing the same number of bytes on the stack that the calling code is providing.
I don't currently have LabVIEW installed on a Linux system, but if you have a header (.h) file for the external code you're calling, it may be easier to have LabVIEW create wrapper VIs to access the external routines. Look under Tools->Import->Shared Library and try it.
Also watch out for complex data types that have to be passed to/from the external code. It's best to keep the data types simple.
08-26-2013 06:11 PM
I would imagine you have the source for the C++ that is working with the cameras and OpenCV, I would recommend building a debug version of the librar(y|ies), installing gdb (and optionally a graphical frontend like Eclipse, DDD, etc.), and attaching to the LabVIEW process to get a better idea of where the crash is happening. I would suspect that DAD is right and that a segfault or other crash in external code brought into LabVIEW will cause LabVIEW to crash as well.