Error 1097 - function works in C++ application, but not in LabView

Good afternoon,
I have a C++ OpenCV application that I am trying to port to LabView for a co-worker. The application is fully functional when it's compiled standalone as an .exe. When called from LabView it reports error 1097.
However, this error is not being caused by not allocating momeory space or the way I am calling the DLL, because I can successfully run the DLL from LabView if I omit one function "findContours(..)" from being called inside my rotuine. Meaning that without this function I can send and receive an Image to my DLL and display it in LabView without a problem. This function is not being called directly from LabView either, it's called inside the main function that is being called by LabView.
That being said, the function allocates memory on its own for it's internal calculation purposes, I do not know what they are, but I know it works perfectly well in a standalone C++ application. 
My DLL application consistenly uses 180Mb of memory without any leaks
My Question is:
Is it possible that LabView or windows may be preventing the DLL from allocating enough memory (I have 12Gb total)?
Is it possible to run the DLL as a separate application or in a different configuration that would prevent error 1097 from occuring?
How could LabView possibly be restricting the DLL?
Thanks,

error 1097 means that the function somewhere and somehow overwrote memory areas that LabVIEW monitors as its own during the call. This could be memory buffer function parameters  that are unallocated or to small or stack variables or some other memory areas LabVIEW puts in place around the DLL call when the highest debugging level is selected for the Call Library Node. But lowering the debugging level is not the solution as the function certainly does something that it should not do.
What that could be is impossible to say without analyzing the actual C source code of the function and possibly all the other functions involved in this as well as all the Call Library Nodes. It could even be that its something that is not even directly evident from the C source code but an effect of some (falsely invoked) optimization from the used C compiler.
I assume that you have actually a self written wrapper DLL here and that is where I would focus on in my search. It is quite unlikely that the OpenCV source code itself would still contain such errors after that much of time.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Why would code work for an application but not an applet?

    Hey there,
    i'm trying to build a java ftp upload applet. I'm using the enterprisedt ftp class.
    The code works fine when i run it as an application but not when i put it in the applet. The applet has been signed and is running off a plug in. I get no error messages, just nothing happens.
    Would really appreciate some comments.
    regards
    hagen
    the code
    FTPClient ftp = new FTPClient("****");
    ftp.login("user1", "***");
    ftp.put("C:/INSTALL.log","test.log");

    hi
    im a manuel, from argentina
    i would appreciate too much if you can give me that piece of code
    i need for a site, an applet that could read files the visitor chosse from his pc and then upload that files to a server
    is it possible?? you could help me ?
    i think i need to sing my applet alright? how i do this? how it cost??
    if anyone can give my a bit of code, to star�t programming, ill be very happy!
    thanks!
    mi mail: [email protected]

  • Serial communicat​ion works in hypertermi​nal but not in LabView

    Hello,
    I am trying to control an APP Automated Pressure Controller using LabView 6.1 via a serial connection.  I am able to control the system with Hyperterminal but not with LabView.  I set used the same setup (9600 baud, 1 stop bit, no parity, no flow control, etc) in LabView that worked in hyperterminal.
    According the the documentation from the Pressure Controller: "Every character that is sent to the controller is echoed back to your computer so you can check to see everything is working.  When a valid command is given, the controller will also send a carriage return (acsii 13) followed by a line feed (ascii 10) to signify the command was executed.  Before sending any commands, the program should clear any characters in the input buffer that may be there from previous responses."
    In hyperterminal, when I type in a command such as "OA", the Pressure Controller responds (without pressing enter or any other keys) and I can see the "OA" on the screen.  As soon as the Controller is done responding, the cursor moves down to the next line (which I assume is caused by the carriage return and line feed) and waits for the next command.
    I have tried to use the Serial Communication.vi with no success.  Does Hyperterminal add (or Labview omit) a special character or command that I am missing?  Do I need to do something special to clear the input buffer in LabView?
    Thanks for any help.
    Alex

    Hello,
    Try to run your application in other system (computer),
    frequently some PCs configurations are not recognized by LabVIEW serial
    routines. I do not know exactly the problem but is not the first time I know
    that kind of problem.
    Sometimes the problem comes from the serial property called
    Termination Character that enables receive buffered data once you have a
    Carrier Return or a Line Feed symbol (Hex 0D/0A) character into the buffer. Try
    to set it true and assign a 0A Hex Value.
    For sending information you need to finish all command
    message with an enter symbol concatenating both (Message + Hex 0D0A) using the
    special character in the string palette library. This action permits system to
    put out buffered data. 
    Good Look

  • Ajax functionality works in embedded OC4J, but not on iAS 10.1.2

    Hi,
    For a customer, we made an ADF application using JDeveloper 10.1.2. Using instructions from http://www.oracle.com/technology/pub/articles/vohra-ajax.html we coded a servlet, to find a description from a code the user entered in the application, and show this on the webpage without page refresh (the application uses JSP and Struts). This works fine in the embedded oc4j server JDeveloper provides, and also works fine on the Standalone OC4J server. However, when the application is deployed to the iAS from the customer, everything works fine, except the ajax functionality, the description fields simply are not shown.
    Does anyone have a clue what could be the problem? We also runned the application on the iAS server itself, and this gives the same error (no ajax functionality).
    Thanks in advance,
    Remco

    Hi dvohra,
    Thanks for your reply. I'm afraid I overlooked something, which is the reason of the ajax functionality not working. The Servlet that made the Ajax functionality used a datasource, and the same was in the Embedded OC4J Preferences. The ADF Business Components part was changed to use the datasource declared on the iAS. The Servlet however was not...
    So, all works now.

  • Works as an application but not an applet

    I have a swing program that works perftectly fine if ran from the command prompt as an application, but once it is run as an applet through a browser some parts are not working. i have narrowed it down to the following lines of code that are the culprits through troubleshooting:
    public static void writeServers(LinkedList serverList) {
         String filename = "C:/jdk/TS2/serverlist.dat";
         try {
              FileOutputStream fout = new FileOutputStream(filename);
         catch(IOException e) {}          
    Apparently it doesn't want to create the FileOutputStream, even though this works fine if the program is run as an application. Does anyone know why this isn't working as an applet but works fine as an application?

    Ok, here is what I've got:
    public static void writeConfig(Config configuration, ClassLoader cl) {
    String filename = (cl.getResource("configuration.dat")).toString();
    filename = filename.substring(6);
    try {
    FileOutputStream fout = new FileOutputStream(filename);
    ObjectOutputStream oout = new ObjectOutputStream(fout);
    oout.writeObject(configuration);
    oout.close();
    catch(IOException e) { }
    And both this file and the configuration.dat are in a jar file that is signed, however it will still not write the configuration.dat file. It will read it with no problem. But no writing.

  • NewDataAvailable works on Desktop Application, but not in it's Applet port

    Hello everyone.
    I'm getting lost in trying to adapt an application i wrote using swings to an applet.
    I followed the basics, changed extends JFrame to JApplet, removed main and replaced it with init() and everything, and the applet does display.
    Sadly though, i've been having a hard time trying to have the applet update it's graphic as the data behind it changes.
    Basically, in the desktop version, i have a DefaultTableModel, a JTable (vector of vectors rows, vector columns). Each time i call my own method createVector(string a); a new vector is added to rows (the vector of vector of the jtable) and afterward a
    model.newRowsAdded(new TableModelEvent (table.getModel(), table.getRowCount()-1, table.getRowCount()-1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
    is also called (model being an instance of the DefaultTableModel object).
    This doesn't work with the applet version though, and i'm totally lost trying to understand why and how to fix it.
    Thanks everyone,
    Rob

    The console doesn't always provide info i guess, at the moment for example i fixed the issue of the thread topic, but i'm having a hard time opening a stream from a url defined like
    URL url = new URL("file", "\\\\10.170.35.34\\my_dir\\", "my_file.txt");
    InputStream fs = url.openStream();
    which works on the desktop version, but not in the applet one, whilst not throwing any exception in the console.
    EDIT: the thread title issue is me being ignorant about applets, and the differences between the class constructor, the run(), start() and init() methods. Having placed that call in the right method, it now works again.

  • BusObj XI R2 Deski login error for user - works on one PC but not another

    Hi,
    I have a user logging into Deski on her PC but getting:
    [repo_proxy 13] SessionFacade::openSessionLogon with user info has failed(Enteprise authentication could not log you on. Please make sure your logon information is correct.(hr=#0x80042902)
    If she logs in on my PC her ID/password works just fine.
    We reinstalled Deski and cleared any server information but with no difference.
    And here's the odd thing.... I can login OK on her PC... so the client looks installed OK.
    Any ideas?
    Thanks,
    Dean

    HI Dean,
    The issue could be that the user account might have got corrupted.We can delete the user preferences from the registry.
    When the user logins to dektopintelligence, it recreates the user information in registry.
    Note:Take a backup of the registry of client's PC,before making any changes.
    Click on File->Export
    Save the registry information.
    ->Click on Start->Run->regedit
    ->Select HKEY_CURRENT_USER->Software->Business Objects->Suite 11.5->default->Application Preferences
    ->Delete Business Objects Reporter.
    ->Also delete the User Pref (the account with which you have logged into the system).
    Now try to test the issue by logging to deski.
    Hope the information helps!!
    Regards,
    Shubha.

  • Why certain functionality works in Adobe Acrobat, but not in LiveCycle Preview PDF?

    I have some simple logic in a LiveCycle form that will hide a subform when I click a checkbox.  When I save as dynamic PDF and open in Adobe Acrobat 9, it works fine, but when I test the .xdp in LiveCycle Preview PDF it does not.  I'm new to JavaScript and have wasted some time troubleshooting what I thought was a problem, only to find out it was working.  Am I doing something that is not capatible with Preview PDF? 
    Attached below are images of hierarchy, design, and code.  I realize the hierarchy is more complex than it needs to be.  It is an excerpt I built to test this functionality, based on the full document.
    Thanks.
    form1.diag.Cervical.show::click - (JavaScript, client)
    if (this.rawValue == 1) {narrative.Cervical.mre.presence = "visible"} else {narrative.Cervical.mre.presence = "hidden"}
    form1.narrative.Cervical.mre::initialize - (JavaScript, client)
    this.presence = "hidden";

    Did you made the form as Dynamic and Interactive in the preview..
         1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form
         2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form
         3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".
    Thanks
    Srini

  • GetDeviceList() works in an Application, but not in an Applet.

    When running in a local application, getDeviceList() successfully returns 1 capture device, that's all good.
    However, when running in a self-signed applet on the same computer, getDeviceList() returns NULL; it cannot find any devices.
    Does the applet need to access the JMFRegistry in order to see the list of capture devices? But this doesn't make sense either, because how would you ever deploy remote JMF applets without forcing the client to install JMF and run JMFRegistry? It just seems to defeat the whole purpose of deploying applets. The client should not have to install JMF and change the JMFRegistry settings in order to run an applet; she might as well just download the application!
    Why doesn't getDeviceList() work in a self-signed applet?
    Any help would be greatly appreciated. Thanks!

    Ok, here is what I've got:
    public static void writeConfig(Config configuration, ClassLoader cl) {
    String filename = (cl.getResource("configuration.dat")).toString();
    filename = filename.substring(6);
    try {
    FileOutputStream fout = new FileOutputStream(filename);
    ObjectOutputStream oout = new ObjectOutputStream(fout);
    oout.writeObject(configuration);
    oout.close();
    catch(IOException e) { }
    And both this file and the configuration.dat are in a jar file that is signed, however it will still not write the configuration.dat file. It will read it with no problem. But no writing.

  • Device works fine with MAx but not with Labview visa serial

    I have a Monarch rpm sensor hooked up to Monarch tachometer , it gives error while coding in labview and works fine in Max if the sensor doesn't read 0. I have written simple RS-232 programs never had an error but this one is giving errors ..not ablt to fix it..please help
    Solved!
    Go to Solution.

    No device can actually measure a speed of zero.  It can only specify that the speed is less than some minimum, which depends on how long you are willing to wait for an answer.
    I do not know anything about your instrument, but I would guess that you are getting an error which is the equivalent of "The instrument has waited the maximum permissible amount of time and did not detect any measurable motion."  This is the instrument's way of saying that the speed may be zero, or very slow, or something is broken so that it cannot make a measurement but it cannot detect the problem.
    Look at the manual for you instrument to see how it responds to the zero speed condition.  This error may be normal.  If so, you need to capture the particular error code and handle it however you think is appropriate.
    Lynn 

  • The scroll function on my mousepad is disabled when viewing a pdf file in firefox version 5.0. The scroll works on the pdf, but not on the other tabs. When the pdf is closed, the scroll function returns to normal. Any ideas?!

    The scroll function on my mousepad is disabled when viewing a pdf file in firefox version 5.0. The scroll works on the pdf, but not on the other tabs. When the pdf is closed, the scroll function returns to normal. Any ideas?!

    Hey thanx for the help, it worked like a charm.
    I think firefox changed the application lay out, as I used to be able to choose my PDF opener from the list at " Adobe Acrobat Forms Document' where I could choose Nitro-PDF reader, but it has now moved all the way to the bottom like you suggested to the obvious place of "Portable Document Format" section.
    If someone didn't tell me , I wouldn't have scrolled all the way down to be able to find it... it really should be with all its cousins up the top...
    Cheers again..

  • When connecting my ipod nano (5 gen) I get an error messege saying that it was recognized but not properly. Ive tried everything the support site says and it still not working. What do I do now?

    When connecting my ipod nano (5th gen) I get an error messege saying that it was recognized but not propperly. I treid everything that the support site said to do but it still not working. What do I do no?

    This came from another thread, but worked for me.  Problem is with newest iTunes 4.62.  Unistall iTunes, as well as its helper programs (Apple Application Support, Apple Mobile Divice Support, and Apple Software Update).  Reboot, and reinstall iTunes.  It will reinstall all the other ones and you should be able to connect your nano.  Good luck.

  • Firefox does not open, but instead gives the error message, "Failed to read the configuration file." It has worked in the past, but not now.

    Firefox does not open, but instead gives the error message, "Failed to read the configuration file." It has worked in the past, but not now.
    I REINSTALL 10 TIMES SO DON'T TELL ME THAT!!!
    I'm piss because i need firefox working again so i can finish reseaching my speech in 5 days.

    Which files do you have in the defaults\pref folder in the Firefox program folder?
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    See also "Other solutions":
    *http://kb.mozillazine.org/Preferences_not_saved
    Do a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 22.0: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you lose personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • How do I troubleshoot installation/distribution of a LabVIEW .exe which processes data using Matlab when it works on some computers but not others?

    I've been given the unenviable task of troubleshooting and installing/distributing software written by a former co-worker. I've modified the LabVIEW code and built an .exe file. I've successfully installed the Labview .exe file on several computers, but it won't work on some others. What's more baffling is that I installed it successfully on one computer, uninstalled it, and tried reinstalling it with no success. In fact, it's a new error (Dr. Watson for Windows NT application error). It doesn't help that I have different versions of LabVIEW and Matlab on the target computers. Some have LabVIEW 5.1, some
    have 5.0, and some don't have it at all. Some have Matlab 5.2, some have 5.3 (R11) and some have 6.0 (R12). It's also not clear to me where the Matlab m files should be located. I'm not sure if it's a LabVIEW Runtime Engine problem, or if it's a Matlab problem. I've also wondered how LabVIEW and Matlab talk to each other. When LabVIEW calls Matlab, it seems that Matlab is running in the background. In other words, clicking on the Matlab Command Window and typing "whos" or any other command/variable doesn't work.

    Jay del Rosario wrote:
    >
    > How do I troubleshoot installation/distribution of a LabVIEW .exe
    > which processes data using Matlab when it works on some computers but
    > not others?
    Poke around zone.ni.com and
    http://digital.natinst.com/public.nsf/$$Search/ .
    Good luck, Mark

  • Flex mobile 4.6 app works inside flash builder but not in android emulator

    Originally posted on stackoverflow: http://stackoverflow.com/questions/8663892/flex-mobile-4-6-app-works-inside-flash-builder- but-not-in-android-emulator
    I have a basic flex mobile 4.6 app and it works fully fine in the flash builder built-in emulator using an android device profile like aria...
    It also launches fine in the android emulator but one particular view shows blank (and this view works fine in flash builder).
    Before I get in to many details of the view are there any categorical gotchas that can be causing this?
    I can't seem to get the trace statements from the app to show in 'adb logcat'. It seems I need to compile a debug version of the apk but I don't know how to do this. I use the 'Export Release Build' from the Project menu in flash builder and it doesn't seem to have an option for debug=true.
    The problematic/blank view basically uses the stagewebview and iotashan's oauth library to call linkedin rest apis... A different (and working) view can make restful web service calls in the emulator fine, so it doesn't seem to be an internet permission.
    The source code contained in the problematic/blank view is almost identical to the tutorial found at:http://www.riagora.com/2011/01/air-and-linkedin/
    The differences are: a) The root tag is a View b) I use StageWebView instead of HtmlContainer c) I use my own linkedin key and tokens.
    I would appreciate it if someone can provide me with some pointers on how to troubleshoot this situation. Perhaps someone can tell me how to debug the app while running in the emulator (I think I need the correct adt command arguments for this which matches the 'Export Release Build' menu but adds the debug param?)
    Thanks for your help in advance.
    Comment Added:
    I suspect that this has to do with connections to https:// api.linkedin.com and https:// www.linkedin.com. The only reason I can think of that the same code is not having issues inside of Flex Builder but indeed having issues in the Android emulator is something to do with certificates. Any ideas?

    Thanks er453r,
    I have created a project that clearly reproduces the bug.  Here are the steps:
    1) Create a UrlLoader and point it to https://www.google.com (HTTPS is important because http works but HTTPS does not)
    2) Load it
    3) Run in Flash Builder 4.6/Air 3.1 and then run in Android emulator.  The former works with an http status 200.  The latter gives you an ioerror 2032.  I am assuming what works in Flash Builder is supposed to work in the Android Emulator and what what works in the emulator is supposed to work in a physical device (plus or minus boundary conditions).
    I see a certificate exception in adb logcat but not sure if it's related...
    Here is the self contained View code which works with a TabbedViewNavigatorApplication:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        xmlns:ns1="*"
                        xmlns:local="*"
                        creationComplete="windowedapplication1_creationCompleteHandler(event) "
                        actionBarVisible="true" tabBarVisible="true">
              <fx:Script>
                        <![CDATA[
                                  import mx.events.FlexEvent;
                                  protected var requestTokenUrl:String = "https://www.google.com";
                                  protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                                            var loader:URLLoader = new URLLoader();
                                            loader.addEventListener(ErrorEvent.ERROR, onError);
                                            loader.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
                                            loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
                                            loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatusHandler);
                                            loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                                            var urlRequest:URLRequest = new URLRequest(requestTokenUrl);
                                            loader.load(urlRequest);
                                  protected function requestTokenHandler(event:Event):void
                                  protected function httpResponse(event:HTTPStatusEvent):void
                                            label.text += event.status;
                                            // TODO Auto-generated method stub
                                  private function completeHandler(event:Event):void {
                                            label.text += event.toString();
                                            trace("completeHandler data: " + event.currentTarget.data);
                                  private function openHandler(event:Event):void {
                                            label.text +=  event.toString();
                                            trace("openHandler: " + event);
                                  private function onError(event:ErrorEvent):void {
                                            label.text +=  event.toString();
                                            trace("onError: " + event.type);
                                  private function onAsyncError(event:AsyncErrorEvent):void {
                                            label.text += event.toString();
                                            trace("onAsyncError: " + event);
                                  private function onNetStatus(event:NetStatusEvent):void {
                                            label.text += event.toString();
                                            trace("onNetStatus: " + event);
                                  private function progressHandler(event:ProgressEvent):void {
                                            label.text += event.toString();
                                            trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
                                  private function securityErrorHandler(event:SecurityErrorEvent):void {
                                            label.text +=  event.toString();
                                            trace("securityErrorHandler: " + event);
                                  private function httpStatusHandler(event:HTTPStatusEvent):void {
                                            label.text += event.toString();
                                            //label.text += event.responseHeaders.toString();
                                            trace("httpStatusHandler: " + event);
                                  private function httpResponseStatusHandler(event:HTTPStatusEvent):void {
                                            label.text +=  event.toString();
                                            trace("httpStatusHandler: " + event);
                                  private function ioErrorHandler(event:IOErrorEvent):void {
                                            label.text +=  event.toString();
                                            label.text += event.text;
                                            trace("ioErrorHandler: " + event);
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <s:Label id="label" y="185" width="100%" color="#0A0909" horizontalCenter="0" text=""/>
    </s:View>

Maybe you are looking for

  • How print in character mode printers?

    Hi, I need to print reports in character mode in dot matrix printers (Epson Fx 1170, Emilia 300, etc.). The reports are predefined to be printed in 10 cpi, 12 cpi and 17 cpi. How do it in a BI Publisher solution? Thank you, Ricardo Cesar

  • Blank Cells in Excel until highlighted

    Hi, I have an Excel document with a lot of formulas and so on, intermittently, the cells when i scroll down for instance some cells are blank, not all, just a random few. They have either formulas in or an actual value, when i select them i can see t

  • I installed Snow Leopard on my Macbook. Now it won't finish bootup.

    I installed Snow Leopard on my Macbook. It said the install completed perfectly, but now it won't finish booting up. It just sits on the start-up window with the spinning wheel and the apple logo. I can't even eject the install disk or anything. I wa

  • My iMessege keyboard is in half. I need help now!

    I was laying on my iPad and I looked back at it and the iMessege keyboard was in half! I do not know how to change it back but I know theres a way! HELP ME!

  • Importing xml is not working

    Hello i am trying to import an xml file into a document but its not allowing the import. Let me clarify a bit, i have allready imported the same xml in about 50-60 different documents without any problems, but now i have a document that does not allo