Error 1097 when calling dll

I'm using more than 20 functions from a .dll code to Labview and have in some of then the 1097 error.
Error 1097 occurred at Call Library Function Node
Possible reason(s):
LabVIEW:  An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW.
I have read a lot about this error and I still didn't find a solution.
Thinking that could be a problem on the configuration of the VI, I imported it again and this solved the problem in the first VI. I did the same with the second one with an error but this time didn't solve.
The weird is that this VI with the error (intRun):
_API void intRun_ ( int* run_ , int* devList_ ,int* numDev_, char* retval )
it is exactly the same as another (anaRun) and this I don't have the error:
_API void anaRun_ ( int* run_ , int* devList_ ,int* numDev_, char* retval )
Inside the C code they look like the same (but each function will run a  different device) and the configuration in Labview is also the same.
Is that possible that I have any problem with my device? Or could be really a problem with the .dll or with the VI?
I read something about wrappers but really I don't understand why I have the error with one VI and don't have with the other (running together) and how (or if) the wrapper could solve my problem.
Please give me any idea what I could try.
For example, I tried to disconect the input numDev (that is a constant, always 1) and then I don't have the error. Why?
Best Regards,
Thais

Thank you for reply.
I'm using LV09.
Actually I figured out that before this VI that I have the error the device is not working as should be .
When running the program step by step I realized that what I was expecting to happen (locking ports before initialization) didn't happen.
So it is probably a bad configuration of the other VIs that I have (there is no Error but returns me an Bad Argument in the return_output);
I will try to solve it and then I tell here if it was really that.
Thak you all.
Thais

Similar Messages

  • Error 1097 after calling dll function which allocates memory inside

    Hello!
    When a call one my functions in my dll from LabView, i get an error 1097. My function takes a few arguments and then allocates some memory for measurement.
    It's not returning any pointers to that memory area, it is just allocates that memory for itself. I don't know what could be the problem, probably i am missing something.
    Could you help please?
    Best regards,
    Tamas
    Solved!
    Go to Solution.

    Are you sure that the allocate function is the problem?
    Error 1097 simply means something inside the external code wrote into memory locations that it was not meant to write. That is usually because of output buffer parameters that are not allocated (large enough) in LabVIEW when passed to the external code fucntion, so the function assuming it received a buffer of a certain size happily writes into that buffer but overwriting other information it should not have.
    But that is by far not the only possibility to cause this error. A simple bug in the external code can cause the same problem when a pointer goes astray or such. The fact that you used that library elsewhere already without seeing any problem is unfortunately no guarantee that the function is not buggy. The LabVIEW exeception handling around the Call Library Node has gotten rather picky and can detect violations that do not have to cause visible problems at all. But the violations it detects are real violations so just silencing them is not a good idea, as they could cause all kinds of problems including overwriting vital data structures in your program that either cause a crash later on or simply wrong results in other parts of your program. Especially the last one is a total bummer to debug.
    Without seeing much more of your code it is basically impossible to point out where the problem could lie. The particular Allocate function doesn't look like there is much that could be done wrong, but I would assume that you call several other functions too somewhere, which could cause the problem. If you can absolutely positively say that you never ever call any library function with a to short (or unallocated) buffer parameter, then you will have to take it up with the manufacturer of your lib, as it would seem very likely that there is some problem in there.
    Also you pass a handle to the library function but your Allocate function does not have this as a parameter! Where does this handle come from? Are you sure you have allocated and prepared it properly before calling this function? A handle is quite often a pointer, although usually a so called opaque pointer meaning the user of the library does not and should not know anything about the structure this pointer points to. It is only known internal to the library.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Error 998 when calling dll

    Hello,
    I'm using LabView9 32-bit on 64-bit machine (Windows7) and I'm trying to call some functions from an external dll (32-bit).
    When configuring the call-library-function-node to use this dll I get an error message saying:
     "error loading (filename of dll)". Invalid access to memory location.
    The message is in German as is my operating system.
    Now I wrote a little test app in VC++ which directly called the dll. Everything worked fine.
    Next I wrote a wrapper-dll to call the original dll's functions and used that with my test app in VC++. Also no problems.
    Finally I configured LabView to call the wrapper-dll and got no error message at least right after configuration.
    But when I run the VI and debug the wrapper-dll I get an error 998 when the wrapper-dll tries to load the original dll.
    According to Microsoft's description of system error codes this is ERROR_NOACCESS and means exactly "Invalid access to memory location".
    So for some strange reason LabView isn't able to load that dll, which is obviously no problem for a C++ app.
    Any help on this would be very much appreciated since my project is strongly dependent on getting this to work.
    Best regards,
    \Ulli.

    Hi Ronnie,
    unfortunately there is no direct solution for this issue so far. Both sides, the dll-vendor (texas instruments) and ni are aware of it, with ni (in my opinion) at least trying to solve it.
    The cause seems to be some encryption stuff on the vendor side (they use an usb dongle). Is something similar involved with your problem?
    My current workaround is to have an external wrapper app written in c++ accessing the said dll. To this wrapper I communicate via socket to realise the function calls.
    This is quite annoying since it's a bit of work to do and you definitely loose performance. But so far no one was able (and in case of Texas Instruments even not willing) to help on that problem.
    And again: for me this issue applies only for the said configuration:
    Windows7, 64-bit,
    LV2009, 32-bit (I cannot use 64 bit because of some 32-bit-only toolboxes)
    the dll is available both in 32 and 64 bit...
    I'm still exited, if there will be an official solution,
    good luck,
    \Ulli.

  • Error 1097 when calling void **

    I am trying to setup an x-ray camera that I bought from Sens-Tech. The camera comes with an API called xapi. I have been able to use the camera in c and c++ successfully. I now want to implement the same code in labview.
    Most of the vi that I have built are working fine. The only one that is giving me a problem is the image capture vi.
    int xapi_getblock(struct context* ctx, void ** pData, int nTimeout)
    All the vi use "struct context *" The only variable that can be at fault is the "void **" declaired pData. The functions are hidden in the dll and only the prototypes are available in the h-file. Also, pData's structure is hidden but it returns a hex number char array.
    Has anyone successfully worked with "void **" in LabView?
    Solved!
    Go to Solution.

    I have attached the full API and vi. I am not working from my laptop so I hope it is fine. 
    But just in case. I used the import> .dll in labview. Imported all the functions from the dll and header files into labview. the context_struct was set to unsigned pointer sized number and all functions worked pretty well except the getblock function. This function once worked with void** set to unsigned32 and passed by reference. 
    This is all I could do. I am currently out of the office. Apon my return, I plan to run the dll in Matlab. If I get this working, I will make a new dll from matlab that passes the data in an easier format.
    Attachments:
    XRayCamera.vi ‏11 KB
    XAPI.h ‏5 KB

  • Error 512 when calling PEOpenPrintJob

    Post Author: gnilsen
    CA Forum: Crystal Reports
    Hello,
    I'm using a product called Dexterity which is for the Microsoft Dynamics platform.  We use crpe32.dll to run our crystal reports from our application.  First of all, when Crystal 10 was installed we used crpe32.dll with a date of 06/13/2004 and my reports print just fine.  When I upgrade to Crystal XI, initial install, I get a crpe32.dll with a date of 12/07/2004 and my reports don't print.  I get the error 512 when calling PEOpenPrintJob.  So I figured I would move up to SP4 for Crystal XI and which provided crpe32.dll 05/27/2007 1:12 AM. I tried to run the reports with that .dll and I run into the same error.  From my research I see that error 512 is PE_ERR_ENGINENOTOPEN or Print Engine Not Opened. 
    Here is where my report is located and this is what I pass into PEOpenPrintJob: "C:\MBS\GP10\WennSoft\Crystal Reports\Service WIP Summary.rpt"
    I have tried a few different approaches trying to get this to work and here is some of my troubleshooting ending up with no luck.  I took my Crystal 10 report and saved it as a Crystal XI report and that didn't work.  I tried to use the old crpe32.dll from Crystal 10 and the program is smart enough to grab the latest crpe32.dll from the C:\Program Files\Common Files\Business Objects\3.0\bin folder.  The report does have sub reports in it, but my code starts with trying to get the main report Print Job first and it doesn't even get to the code for the sub reports.  (I don't know if that helps but I trying to give as much info as possible.)
    1) Is there anything I need to do different in Crystal XI? 
    2) Do I need to call something before PEOpenPrintJob? 
    Thanks in advance.

    Hi Nayani
    Please go to the technical WF log, select the mail step in error and check the container element ADDRESSSTRING - it should have valid values. If there is no value or at least one line, that is the cause of your error.....this means you will have to correct the method/process/code/ where you are fetching the email addresses.
    regards,
    Modak

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

  • Data Quality vendor-specific error: An error occurred when calling function 'sdq_init_connector ()' in connector ": "(-8) Exception!." Detailed error message: Exception thrown by Java: java.lang.UnsatisfiedLinkError: nio (Not found in com.ibm.oti.vm.boots

    When attempting to create a new Account in siebel integrated with OEDQ the following error occurs.
    ERROR
    Data Quality vendor-specific error: An error occurred when calling function 'sdq_init_connector ()' in connector ": "(-8) Exception!." Detailed error message: Exception thrown by Java: java.lang.UnsatisfiedLinkError: nio (Not found in com.ibm.oti.vm.bootstrap.library.path)(SBL-APS-00118)
    STEPS
    The issue can be reproduced at will with the following steps:
    1) from EDQ director we have imported the EDQ_CDS,EDQ-REFERENCE DATA & EDQ_HISTORICAl DATA packages sucessfully.
    2) Created dnd.param file in SIebel server SDQCOnnector folder.
    3) Copied the libdnd.so file to siebsrvr lib directory(32 bit)
    3) In dnd.param file we have mentioned the javalib file and instllation directory path(<Siebsrvr roo>/dnd/install)
    4) Unzipped the EDQ-Siebel Connector files in dnd/install folder
    5) Copied the dnd.properties file in dnd/install directory and modified it accordingly to point to installed EDQ instance.
    6) Configured the Siebel components for EDQ integration.
    7) Realtime EDQ jobs are running.
    8) Create a new Account
    Env details are
    On : 8.2.2.14 [IP2014] version, Client Functionality
    EDQ 11.1.1.7.4
    IBM JDK 1.7 32 bit
    Using Open UI
    Any Champ have faced this issue and overcame it please let me know the resolution steps. your help is
    Regards
    Monoj Dey
    9007554589

    Hi Monoj,
    A few questions:
    - What OS is Siebel running on?
    - What version of the Siebel connector are you using?
    - Which libdnd.so file are you using?
    - What's the contents of your dnd.parms file?
    thanks,
    Nick

  • Error '9' when calling service 'SO_OBJECT_SEND'

    We are implementing travel module. The scenario is when the employee raises a travel request, after approving the mail should be sent back to the employee. This feature is provided by the standard.
    However in the SEND_MAIL step the WORKFLOW Container variable 'Employee.Trip.User.Id' is not set owing to which the mail step gives out error.
    Can anyone please guide us on the probable cause of the error ?? Where does the object TRIP gets the value 'TRIP.USER.ID' ??
    Is it any setting issue ??
    Please guide..

    Hi
    Run report HRALXSYNC  and you will solve this.
    We have faced this issue many times and the solution we have applied is
    1. This issue occurs on a step that is dialog where some agent needs to either approver or reject.
    2. You should check the rule (Agent determination rule in that step).
    Run that rule with the workflow data (use scenario with which you are getting error).
    Run the rule individually and check if you are getting right result.
    this error most of the time id due to the fact that the rule is not be able to determine next processor of the workitem.
    Error 9 when calling service SO_OBJECT_SEND SWF_RUN535
    to assure you can hardcode the user for test in the rule and run the workflow as that is the most effective analysis that will help you determine the cause.
    I have never seen this error on a background step unless there is a mail step involved.
    You need to run the report HRALXSYNC to synchronize HR objects which will surely solve this issue.
    regards
    barin

  • Runtime error OBJECTS_OBJREF_NOT_ASSIGNED when calling any standard GRC API's

    Hello colleagues,
    I always get the runtime error OBJECTS_OBJREF_NOT_ASSIGNED when calling any standard GRC API's
    For instance, lets take Function Modules:
    I tried almost any of them but in particular:
    GRPC_API_CONTROL_QUERY Load the list of controls
    GRPC_API_ISSUE_QUERY Retrieve issues of the case
    GRPC_API_ORGUNIT_QUERY Load list of Organizations
    GRPC_API_RMPLAN_QUERY Retrieve remediation plans of case
    GRPC_API_RISK_CONTROLS Retrieve the controls of the risk
    and etc.
    All of them return the runtime error OBJECTS_OBJREF_NOT_ASSIGNED, however I've provided Object ID's in the right format,
    The same is for corresponding classes,
    Does anyone have such problem before?
    Appreciate your responses,
    Thank you,
    Best Regards,
    Anton

    Hi Anton,
    We need to pass value for I_SESSION_ID. Because, when i execute FM: GRPC_API_RMPLAN_QUERY by giving correct I_OBJECT_ID as shown below, i'm also getting the same error.
    On executing..
    Getting following dump.
    And attached is the dump analysis .
    Thanks
    KH

  • Getting Error Message "Error '9' when calling service 'SO_OBJECT_SEND'

    Hi All,
    We are working on SRM5.0(with servier 5.5 paching 14) and ECC (R/3) with SAP appl 600(16 th patch).but the workflow is giving the error   "Error '9' when calling service 'SO_OBJECT_SEND'  and PO is still in the awating approval status.
    Regards
    Channappa Sajjanar

    Hi,
    See  this related thread:
    Re: Workflow Error  --  Error' 9' when calling service ' SO_OBJECT_SEND'

  • SRM Workflow error-  Error' 9' when calling service ' SO_OBJECT_SEND'

    Hi Team,
    We are facing problem with SAP SRM Workflow error-  Error' 9' when calling service ' SO_OBJECT_SEND' .
    Due to this WI is not going to Approver/Requester INBOX and unable to process that WI.
    Please advice .
    Greatly Appreciated for Help.
    Regards
    CK

    Hi,
    Not sure what '9' is, the exceptions called by the SO_OBJECT_SEND function are as follows:
    EXCEPTIONS
                   ACTIVE_USER_NOT_EXIST      = 35
                   COMMUNICATION_FAILURE      = 71
                   COMPONENT_NOT_AVAILABLE    = 01
                   FOLDER_NOT_EXIST           = 06
                   FOLDER_NO_AUTHORIZATION    = 05
                   FORWARDER_NOT_EXIST        = 08
                   NOTE_NOT_EXIST             = 45
                   OBJECT_NOT_EXIST           = 13
                   OBJECT_NOT_SENT            = 15
                   OBJECT_NO_AUTHORIZATION    = 13
                   OBJECT_TYPE_NOT_EXIST      = 17
                   OPERATION_NO_AUTHORIZATION = 21
                   OWNER_NOT_EXIST            = 22
                   PARAMETER_ERROR            = 23
                   SUBSTITUTE_NOT_ACTIVE      = 31
                   SUBSTITUTE_NOT_DEFINED     = 32
                   SYSTEM_FAILURE             = 72
                   TOO_MUCH_RECEIVERS         = 73
                   USER_NOT_EXIST             = 46
                   OTHERS                     = 1000.
    Regards,
    Jason

  • Workflow Error  --  Error' 9' when calling service ' SO_OBJECT_SEND'

    Hi ,
    Could  you  pls tell me what will be the reason for this Error' 9' when calling service ' SO_OBJECT_SEND'
    Thanks & Regards,
    Gopal

    Hello
    reason could be lot of things:
    check the note 938147 for example...
    Another helpful note is the 190669
    regards,
    daniel

  • Error '20' When calling Service 'SO_OBJECT_SEND'.

    Hi Experts,
    In my work flow I am using step to send mail.
    While executing the workflow this step is throwing the above error 'Error '20' When calling Service 'SO_OBJECT_SEND'.
    Please help me in this case.
    Regards,
    Nayani

    Hi Nayani
    Please go to the technical WF log, select the mail step in error and check the container element ADDRESSSTRING - it should have valid values. If there is no value or at least one line, that is the cause of your error.....this means you will have to correct the method/process/code/ where you are fetching the email addresses.
    regards,
    Modak

  • Why do I get Error -1073807343 when calling the open visa function ?

    Hello,
    I am running a Labview 6i under Linux (kernel 2.4) and I have Error -1073807343 when calling the open visa function. I have verified the name of the session (GPIB0::9::INSTR), and I can communicate with my instruments with ibic.
    More informations : I use NIVISA 2.5 and nigpib-0.8.2. I have downloaded the lastest drivers of my instruments but it doesn't work better.
    Thanks very much for your help.

    We've had several NI-VISA releases since 2.5 - so I suggest you upgrade to NI-VISA 3.0. While there isn't anything specific to your type of problem in the Linux version of our readme.txt, I know we've made a number of other fixes.
    While the most recent release is NI-VISA 3.1, I still recommend you upgrade only to 3.0.
    This is because NI-VISA 3.1 requires the new NI-488.2 release for GPIB-ENET to be installed (even though you aren't using that product). This is due to some internal rearchitectures, and the PCI-GPIB product is not released. If you do want to go with NI-VISA 3.1, the new NI-488.2 release for GPIB-ENET on Linux will still work with the PCI-GPIB beta driver that you have installed.
    Dan Mondrik
    National Instruments

  • Application crashes when calling DLL built with LabVIEW 2011

    Hello everybody,
    Our application calls DLLs built with LabVIEW 2010 SP1. We installed LabVIEW 2011 and built some DLLs. So far so good. If we start our application and run 2010 DLLs it still works fine. If we run a 2011 DLL just once no error happens, but if we try to run the same 2011 DLL our application crashes reporting the error below. I saved the code for 2010 version and built a DLL and it works fine. Does anyone know why?
    Thank you in advance.
    #Date: Fr, 16. Sep 2011 16:25:25
    #OSName: Microsoft Windows XP Service Pack 3
    #OSVers: 5.1
    #OSBuild: 2600
    #AppName: PasTA
    #Version: 11.0f2 32-bit
    #AppKind: AppLib
    #LabVIEW Base Address: 0x30000000
    16.09.2011 16:25:26.181
    Crash 0x0: Crash caught by NIER
    File Unknown(0) : Crash: Crash caught by NIER
    minidump id: 8a779b3f-51d7-4864-8e4d-6ab0195cd158
    ExceptionCode: 0xC0000005
    N
    0x3072C804 - lvrt <unknown> + 0
    0x3072CBB8 - lvrt <unknown> + 0
    0x7C864191 - KERNEL32 <unknown> + 0
    0x7C83AB50 - KERNEL32 <unknown> + 0
    0x00000000 - PasTA <unknown> + 0
    Attachments:
    error.PNG ‏11 KB

    On that note, you should be able to create DLLs in 2010 and run them with 2011, correct??  In my case, I have a 2010 built DLL (talking to sbRIO), most of the functions work when run in 2011, but a couple of them lock up LabVIEW on the desktop (but not the sbRIO), no lock ups happen with 2010 on the desktop.

Maybe you are looking for

  • Error GRC Access Control 10.0

    We have a problem when execute the next steps in GRC Access Control 10.0 SPRO-->Governance, Risk and Compliance>Access Control--> Access Risk Analysis--> Batch RisK Analysis We applied the next note, but problem is the same. 1563583 - SYSTEM_NO_TASK_

  • I am new to mac and have an external hard drive question

    Hello I am new to mac. I used a PC before and stored all of my files (documents, photo's and music) on an external hard drive. The new mac is communicating with my external and is allowing me to open word/excel documents into pages/numbers. However w

  • Newbie performance question

    Our system is set up to send a lot of XML messages to a JMS topic on WL8.1. I have an MDB listening to the topic and a couple of stateless session beans that get invoked by the MDB. The rate is something on the order of 10/sec(moderately sized xml me

  • To display standard text in purchase requistion item text.

    Hi, My requirement is display standard text in purchase requisition item text(text type 02).  Please let me know where should i write the code and what it the code? Thanks Alka Moderator message: please work yourself first on your requirement, if nec

  • Why is the camera on iphone 5 missing

    The camera on my iPhone 5 has gone as if it was uninstalled?