LabVIEW crashes in calling dynamically linked libraries

I am using LabVIEW 7.1 for Linux.
I am interested in writing wrappers around Intel's OpenCV library. The Intel's OpenCV library contains image processing functions. I want to use LabVIEW in order to provide a "glue" for the OpenCV functions.
Using C, I wrote up edge.c which will display a OpenCV HighGUI (basically a GUI window) and wait for an event from the keyboard before closing. It is a very simple program. It compiles and executes correctly.
Using a Makefile, I created the Linux shared library .so file around it. A Linux .so shared library is the Linux's equivalent to the Window's DLL. I named the file edge.so .
When I use LabVIEW's Call Library Function Node, LabVIEW crashed. It just shut LabVIEW down automatically. It did not even display an error message which surprised me.
From the results of this forum message, I decided to write up a C wrapper around the .so file.
I wrote up the following code:
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
int main()
   void *libhandle;
   int (*edge_func)();
   libhandle = dlopen("/home/elliot/opencv_code/edge_code/edge.so", RTLD_LAZY);
   edge_func = dlsym(libhandle, "main");
   (*edge_func)();
   dlclose(libhandle);
   return 0;
When I compiled and executed the code, it worked fine.
Since I want it to run in LabVIEW, I used LabVIEW's Code Interface Node.
I created a CIN and I have it auto create a C file.
I wrote the following code using the CIN:
#include "extcode.h"
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
MgErr CINRun(float64 *Numeric);
MgErr CINRun(float64 *Numeric)
   /* Insert code here */
   void *libhandle;
   int (*edge_func)();
   libhandle = dlopen("/home/elliot/opencv_code/edge_code/edge.so", RTLD_LAZY);
   edge_func = dlsym(libhandle, "main");
   (*edge_func)();
   dlclose(libhandle);
   return noErr;
When I ran lvmkmf which is the LabVIEW function to create the necessary files, it created the necessary files and the makefile. I ran the makefile and it created the lsb file that is needed.
I used the CIN to call the lsb file. I ran the vi and again, LabVIEW crashed by closing the LabVIEW window without displaying any messages.
If anyone can help me, that will be great! I have no idea how LabVIEW is crashing without displaying any messages. I would assume when I used lvmkmf and the makefile to create the necessary files that it would catch any errors that it did not like. Did LabVIEW crashed because it did not like the call to display a GUI window?

From doing ldd edge.so, the dependencies (at least on the Linux box at work) are:
        libcxcore.so.0 => /usr/local/lib/libcxcore.so.0 (0x40020000)
        libcv.so.0 => /usr/local/lib/libcv.so.0 (0x40117000)
        libhighgui.so.0 => /usr/local/lib/libhighgui.so.0 (0x401ce000)
        libcvaux.so.0 => /usr/local/lib/libcvaux.so.0 (0x401eb000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40250000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40304000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40326000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        libdl.so.2 => /lib/libdl.so.2 (0x4032e000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40331000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x4033e000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x40593000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x40601000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x4061a000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x4063b000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40648000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x4067b000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x4068f000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x406c4000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x406c8000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x40732000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40755000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40773000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x40782000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x407c3000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x407c7000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x407cf000)
        libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x407dd000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x407f0000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x407f8000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4081d000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x408fc000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4094d000)

Similar Messages

  • Custom dynamic link libraries error on Felx 14

    I keep getting this error msg in Event Viewer on my Flex 14...anyone know what they are and how to resolve them? Thanks!
    Custom dynamic link libraries are being loaded for every application. The system administrator should review the list of libraries to ensure they are related to trusted applications. Please visit http://support.microsoft.com/kb/197571 for more information.

    You have an outdated version of SIMBL that is not Univeral Binary. If you get the latest version or just remove SIMBL, the error should go away.
    Developers should be careful with 3rd party system additions.They can introduce errors or hide them.

  • Adobe Encore CS6 crashes when using dynamic link

    I'm trying to use encore for the first time to create a wedding DVD. I'm trying to use the dynamic link feature from premiere pro but whenever I use it (I've tried intiating it from both premiere and encore) it crashes. When starting it from premiere it crashes right away but using it from encore it crashes when I want to create a new timeline from the sequence. Is there a way to stop this from happening? Also I don't really want to have to render the premiere pro file since it's quite large but if I have to I will. Thank you

    I filmed it from a HD camera.
    I tried to dynamic link a much shorter clip but yet the same thing happened from both programs. I even tried to make a timeline from in Encore with nothing in it and it crashed.
    EDIT: I redownloaded premiere pro with encore and it seems to work now. Thank you for all your help though. Much appreciated.
    Message was edited by: Nery21

  • After Effects Crashes when using dynamically linked files

    When I try to edit a dynamically linked after effects, After Effects crashes, which then crashes Premiere Pro. I have CS5.5 master. Is this a problem with the after effects file (only 8kb in size) or something wrong with After Effects. The files come up as being linked in Premiere Pro but when I open the After Effects file to do further editing, it just crashes.

    You told us zero about your system and your project settings on bothe ends, so this is not going anywhere. Such crashes can have any number of reasons from running out of memory to graphics card issues but we truly cannot know.
    Mylenium

  • Crashing while using dynamic linking with aftereffects

    I've been using premier for a while now but i believe i've fond a huge flaw in the dynamic link system. I own a multi-million dollar corporation that specializes in researching the answer for X divided by Zero and this bug is setting us back thousands everyday.
    The problem is when you import a Premier project into aftereffects and then import the same comp back into premier, the result is 8GB of ram wasted in a few seconds with both applications crashing. As you may have guess from our R&D type this sort of multiplication is unaceptable. Please fix.
    Regards, Tom Tomson @ Banana Systems Ltd.

    u mad bro?

  • LabVIEW crashes when calling a dll

    I am trying to call a dll through my LabVIEW program. The dll implements a routine to access an ftp server. When the server is found, everything works as expected. However, if there is a delay in finding the server, LabVIEW throws an error � �An exception occured within the external code called by the Call Library Node�. The detailed error message is attached here.
    The dll function times out after 25 seconds if the server is not found (it returns a signed integer). This error message pops up after roughly 20 seconds.
    The dll was created in VC++ 6.0. It uses standard MFC calls.
    Any information about why this could be happening will be appreciated.
    Thanks.
    Attachments:
    LabVIEW_error.jpg ‏14 KB

    Hi,
    If you call a dll, everything should be just right, or it will crash (if you
    use LV7, you're lucky, most of the times LV stays alive, and only gives a
    message).
    The first thing that should be checked is the calling convention. This
    should probably be "stdcall (API)". This changes the way the parameters and
    return address are pushed to the stack.
    The second point are the parameters. Pointers should be set to pointers,
    LONG to i32 etc. The return parameter can always be set to i32, or to
    nothing.
    My best guess is (since the dll crashes after a while), there should be a
    pointer to a buffer (most likely a cluster, but could be a reference). The
    connection succeeds, and the dll copies the information to the pointer. If
    the pointer is not valid (the memory does
    not belong to LabVIEW), an
    exception is raised.
    Perhaps you can give a function prototype? The prototype is the way to
    start.
    Regards,
    Wiebe.
    "gopinath" wrote in message
    news:[email protected]..
    I am trying to call a dll through my LabVIEW program. The dll
    implements a routine to access an ftp server. When the server is
    found, everything works as expected. However, if there is a delay in
    finding the server, LabVIEW throws an error - "An exception occured
    within the external code called by the Call Library Node". The
    detailed error message is attached here.
    The dll function times out after 25 seconds if the server is not found
    (it returns a signed integer). This error message pops up after
    roughly 20 seconds.
    The dll was created in VC++ 6.0. It uses standard MFC calls.
    Any information about why this could be happening will be appreciated.
    Thanks.

  • Where to install dynamic link libraries on Windows?

    Hi folks,
    I need to install a DLL on Windows, it will be used by several apps and dlls placed allover the system, but I'm 100% sure it will always be my apps and I don't need any kind of versioning, meaning that if the DLL is replaced by a newer version (or older
    for that matter), it will work just fine. I also need 32-bit and 64-bit versions.
    It looks like this is the proper path:
        C:\Windows\System32
    It doesn't seem to work flawlesly however. I need to support Windows XP,7,8... And on Windows 8.1 it sometimes just didn't work - the file was clearly there, but systém said the DLL is missing. It also seems like the folder for 32-bit (SysWOW64) and 64-bit
    (system32) are actually pointing to the same location, so I assume Microsoft has been "fixing" the naming mess.
    Anyway one location it always worked is here:
        C:\Windows
    but it doesn't seem to be designed for that. So how is it?
    For the record, I really do NOT want to load the DLL manuály, nor install stuff to registry. It's just a DLL after all...
    Cheers!

    For 32-bit DLL's on a 32-bit OS, and for 64-bit DLL's on a 64-bit OS, place the DLL in the %WINDIR%\System32 folder.
    For 32-bit DLL's on a 64-bit OS, place the DLL in %WINDIR%\SysWOW64 folder.
    Well, I just tried again, this time on Win 7 and same results - 32-bit DLLs are fine, 64-bit are not found, whether I copy them to System32 or SysWOW64, but again C:\Windows is just fine. Also according to this:
    https://msdn.microsoft.com/en-us/library/7d83bc18.aspx?f=255&MSPPError=-2147217396
    the Windows directory actually is in the list, so I guess C:\Windows is the ultimate answer. It's probably not that "tidy", but I don't see a problem with this and it actually works on all computers I checked, and that's kind of the important factor.
    For the record, by C:\Windows I mean "%WINDIR%".

  • Yesterday's Updates to Dynamic Link Media Server

    I woke to find four updates to CS6 (Au, Ae, Ps, and Pr) yesterday, which the Updater called "Dynamic Link Media Server CS6 1.0.1 Update."
    I updated, and I updated my CUDA about the same time.
    Pr started working slower.  So, I reverted back, using my clone.
    Not sure if this was a coincicence, or which update to blame. 
    I'm back to the performance from both that I was used to.
    The CUDA update was for bugs I wasn't experiencing and for compatibility to 10.8, which I'm not running.
    Was I too hasty?  Do these Dynamic Link updates do anything?  Improve anything?
    MacPro3,1 - CS6 - Quadro 4000 - 10.7.4

    I don't doubt your engineer for a second.  I'm convinced now that the nVidia or most likely the CUDA driver is behind all my Serious Errors.  I was getting them right after opening a project and trying to do anything at all today.  I turned CUDA off, and was able to finish the project.  When that was out the door, I reinstalled the CUDA and nVidia drivers, rebooted, opened my project, enabled CUDA, and Pr has been working without the errors.
    Thank you, Todd!

  • Using a SWC like a DLL (or) dynamically linking SWC libraries

    Hi,
    I have a need to dynamically link SWCs. That is, I want to load an SWC into my project/SWF dynamically, at run-time.
    I have searched the net, but I havent got a concrete solution to my query.
    Is it possible to load SWC libraries at runtime? If so, how?
    The reason I ask is, I don't want to keep re-compiling my target application with my SWC everytime the SWC changes. With dynamic linking, I can just call the freshly edited SWC at run-time.
    Thanks,
    Pradeep.

    You can use flash.display.Loader to load the library.swf in a SWC.  If any
    APIs have changed to become incompatible, you will get verify errors at
    run-time.
    A better pattern is to use SWCs as RSLs or bake them into individual
    Modules.

  • Calling a procedure from a dynamic link

    I have the following situation-
    I have a report created using SQL Query.
    I need to call a Stored Procedure(move_to_portal) through a link from one of the fields in the report (Exec_id field of the report).
    How can I do this?
    The links do not allow me to choose a stored procedure as the Target component....so maybe I have to create a dynamic link.
    How to do this? Any help would be appreciated.

    I have just another question-
    I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
    The following is my code....
    SELECT re.report_exec_id, re.exec_userid,
    NVL(re.batch_exec_date, re.begin_date) report_date,
    re.rows_returned,
    re.status, re.error,
    f_file_url(re.filename) file_url,
    re.comments,
    ''Archive''archive
    FROM metadev.report_execution re, metadev.report r
    WHERE re.report_id = r.report_id
    AND r.spec_number = :v_spec
    AND re.status <> 'DELETED'
    AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
    ORDER BY begin_date DESC
    The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
    IT GIVES AN ERROR....
    Do you guys know where I am going wrong...

  • Why does my Premiere CC 2014 crash every time I use "Adobe Dynamic Link" and have After Effects CC 2014 open in the background?

    Here are my MacBook Specs:
    MacBook Pro (15-inch, Mid 2012)
    2.6 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    NVIDIA GeForce GT 650M 1024 MB
    480 GB Solid State SATA Drive
    750 GB SATA Disk
    I use "Adobe Dynamic Link" mainly for typography and some animation, but not to the point where it would stress out Premiere CC 2014.

    Chris,
    It doesn't crash for everyone.  A person could be forgiven for saying, in return, "Please sort out your **** system problems". 
    Trust me when I say many, many problems are caused by the computer system setup not being up to the needs of this cutting-edge graphics software.  Photoshop is heavily dependent on the GPU, and GPU drivers are notorious for having bugs (they're primarily written to run games).
    However, that being said, recent driver releases from both ATI and nVidia do actually work pretty well with Photoshop CC 2014.
    What video card do you have?
    What display driver version are you running?
    If you're unsure how to tell these things, go into Photoshop, choose Help - System Info, copy the data, and post it here.
    -Noel

  • Slow program response, crashes when creating titles and dynamic link issues

    Dear reader,
    I am now trialling Adobe CC OSX with Premiere Pro and After Effects before deciding to subscribe but I am experiencing a lot of issues while working.
    I am now working on an animation, but editing raw mxf files also gives crashes and slow responses/ program refreshes.
    1) Slow mouse response
    2) Slow program refresh while key framing visuals
    3) Rendering in PP is extremely slow when AE is open in the background, when closing AE and re-initiate the render in PP it renders super fast
    4) Crashes. When I overlay titles in my time line PP regularly crashes
    5) Dynamic Link issues when working combined in AE and PP where file connections in the time line get lost when the AE project has too many sequences
    I am curious to find out if other people are also experiencing these issues.
    I am indecisive in getting the paid yearly plan or move to FCPX instead? Or should I get a new MacPro and is this model too old?
    It worked fine 2 months ago, however I was still working on FCP7. After updating it is really bad working with it...
    My system consist of:
    MacPro mid-2010
    OSX 10.9.5 (13F34) (new installation)
    2x2,66Ghz 6-core Intel Xeon
    24GB DDR3 ECC
    Nvidia Quadro K5000, 4GB
    2x PCIe SSD 1TB
    2x HDD 3TB
    2x HDD 2TB
    Feedback is much appreciated! Best regards, Alexander

    this does work for basic colour correction but not when trying to grade an entire suqence to achieve a specific style, applying a vingette or certain effects have to be done in after effects.
    I want to try and get my whole sequence into after effects but preserve the edits and effects added in permier pro, is there any way to do this?
    rich

  • Creating dll and calling it in labview crashing the program

    Hi All,
    I am using labview from quite a long time.But this time i am stuck with dll.Not able to solve this issue.
    I have to communicate with FTDI chip.
    I have a VC++ Project to communicate with SPI of FTDI.That Code is working perfectly fine.
    Now I Have to automate that through LabVIEW. VISA Drivers i cant use in this. So Last option left is either to create dll or to make EXE out of it.
    I have tried by creating DLL and then calling it in LabVIEW by using Call Library Function Node.But its not helping me out every time LabVIEW is getting Crashed.
    Is there error in creation of dll or something i am not doing properly while calling?
    Thanks In Advance 
    Shweta
    Attachments:
    old_dolphin_sub_spi_func_ftdi.c ‏21 KB
    ftdi_write_read.vi ‏15 KB

    Which function call crashes LabVIEW?
    Have you tried switching the calling convention from stdcall to C for all of the DLL calls?
    Why are you converting a string to a number, instead of using a numeric constant directly? If you want a number in hex, you can right-click a numeric constant, make the radix visible, and switch it to hex display.

  • Calling procedure with 2 parameters from a dynamic link

    I have just another question-
    I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
    The following is my code....
    SELECT re.report_exec_id, re.exec_userid,
    NVL(re.batch_exec_date, re.begin_date) report_date,
    re.rows_returned,
    re.status, re.error,
    f_file_url(re.filename) file_url,
    re.comments,
    ''Archive''archive
    FROM metadev.report_execution re, metadev.report r
    WHERE re.report_id = r.report_id
    AND r.spec_number = :v_spec
    AND re.status <> 'DELETED'
    AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
    ORDER BY begin_date DESC
    The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
    IT GIVES AN ERROR....
    Do you guys know where I am going wrong...

    You missed the ampersand symbol in between the parameters.
    This should be
    ''Archive''archive
    instead of
    ''Archive''archive

  • Can client dynamically link to shared libraries for different versions ?

    Can Oracle client dynamically link to Oracle shared libraries if the versions are different ?
    Hi:
    I apologize for this newbie question:
    We are using PRO C to generate the client C code.
    We can compile both dynamic and static versions of our Oracle client.
    Our question is:
    is it possible to compile a dynamically linked Oracle client in say version 10.1.0.2 and actually run the application against say version 8.1.7.0 environment ?
    That is, can an Oracle client dynamically link to the Oracle shared libraries if the versions are different ?
    If it is possible, then how to modify the makefile
    to enable Oracle client to reference different versions
    of shared libraries ?
    Thanks
    JL

    What you describe is not supported.

Maybe you are looking for

  • Error while deploying process in BPEL PM 10.1.3.1 "ORABPEL-04077"

    Hi, I've installed BPEL PM 10.1.3.1 and am trying to deploy a process that has been developed (and successfully deployed) with BPEL PM 10.1.2. The project can be compiled but when I deploy it to my BPEL server I get the following error (sorry for ger

  • Credit limit vs financial document

    SAP GURUS : I have taken the credit limit 20,000rs and financial doc value 10,000rs and created a sales order  for 11000rs.But 1000rs is not getting updated in Fin Doc or Credit Limit,plz let me know ASAP from where the system is taking this value?

  • To trigger output type

    Hi Experts, I have to trigger an output type upon PGI when an inbound IDOC changes the delivery. please guide me. Thanks, Nithya

  • Can a procedure in select return more of 1 value

    Is it possibile write a procedure called from a SELECT that return 2 value? For ex: SELECT proc_a (par1,par2, ret1,ret2) from xtable where ret1 and ret2 are value returned from proc_a Thanks

  • Splitting Pdf

    I am trying to write a cold fusion program which splits up a pdf file with multiple pages into separate files for each page. In other words, let's say I have a pdf document (document.pdf) that has 100 pages, I want the program to break it up so I end