Failure: "gnrclist.cpp" after a DLL call

Forum:
Since adding dll calls in a VI, LabVIEW is frequently crashing, both during VI execution and after exiting the application.
Generally, what issues need to be considered when making successful dll calls (using the "call library function").
Jordan

Hi Jordan,
It sounds like this issue is due to the fact that you are not allocating memory for the dll in advance. This is the most common mistake when implementing a dll in LabVIEW.
For instance, if your dll is going to output an array of 100 double-precision numbers, then you need to allocate this place in memory by passing the dll a dummy array of 100 double-precision numbers that it can operate on. Also be careful not to expand the size of the array. LabVIEW doesn't support dynamic memory allocation within a dll in most circumstances. If you don't allocate a place in memory in advance, LabVIEW may crash when you exit the program and LabVIEW tries to deallocate memory.
A really good example of allocating various types of data for use in a dll is available from the Example Finder (Help >> Find Examples from LabVIEW).  Click the Search tab and search for the term DLL. The Example is called Call DLLs. It contains c code that corresponds to various dll functions that operate on various data types, and it shows you how to call these dll functions properly from LabVIEW. For a more comprehensize overview of the process, refer to the document Using External Code in LabVIEW, available here, or browse through these Developer Zone examples and applications notes.
Jarrod S.
National Instruments

Similar Messages

  • Failure : "load.cpp"​, line 4081

    My main front panel VI will no longer open and I just get the error, Failure : "load.cpp", line 4081.
    I am running an Eval version of 6.0.1 and was deciding whether to buy this product for a new project.
    Given that I see from this forum that this error has been known for 9 months plus and I've lost a weeks
    work I am not so sure.
    It occured after I added some tab controls to the front panel, so beware.

    Hi RCT,
    This error occurs in LV 6.0.1. It seems that it is fixed in LV 6.0.2 and LV 6.1.
    One thing you can do is ask NI to delete the insane objects for you. You have to redo your work you have done since the time the VI was correct until it got corrupt.
    The other thing you can do is use a copy from a backup and redo the rest of the work.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Failure: "might.cpp" line 815 on LabVIEW executable

    Hi,
    I have a program written in LabVIEW 6.1 on a Windows XP platform. The program includes an ActiveX container that shows an Internet Explorer content window (just like the "Using the Microsoft Web Browser ActiveX Control" example found on http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CB9BF111EE034080020E74861&p_node=DZ52051&p_submitted=N&p_rank=&p_answer=&p_source=External
    , but without the activex queue in that example).
    After I built the executable, I was able to run the exectuable on the development machine without problem. However when my client runs it on his PC with LabVIEW runtime engine 6.1 installed, he gets the message:
    Failure: "might.cpp" line 815
    For assistance in reso
    lving this problem, please record the procedeing information and navigate to www.ni.com/failure or contact national insturments.
    I cannot find any information on might.cpp on the NI support site. Any idea of what can be done to fix this problem?
    Thanks!
    Dan

    Hi dan,
    you must contact NI support sending them the problem. "might.cpp" is a source module of LV and they can investigate the error.
    Another thing you have to take into account is that LV stores the class ID and not the application. Has the client PC the same MS IE version installed? If not, the error could also result from different versions of the Active-X control.
    As with the reporting Toolkit for MS Office you have to build a different version of your app for each different version of the control.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How to response polling event during dll call

    Hello,
    There is a long time dll call in my program. The program doesn't response to mouse click in the front panel during the dll call when I want to display other page in Tab control. It only response after the call.
    How to solve the problem?
    Thanks!

    Wether or not it is possible to fix this situation is dependent on the dll itself.
    IF
    the dll is written to be re-entrant (thread-safe)
    THEN
    you can configure the Call Library function to not run in the user interface thread. This can be done by right-clicking on the node and selecting "configure". In the configure screen, ther is a drop down selection box that defaults to "Run in UI thread". Change this to re-entrant.
    You can then determine which thread the dll runs in by setting the properties of the calling VI.
    Warning!
    If the dll is not re-entrant you WILL experience random crashes and possible data coruption! All bets are of if the dll is used in the wrong manner.
    What is happening:
    LV's execution systems are multi-thread with the exception
    of the UI thread. The UI thread is single threaded to ensure updates of control and indicator information is updated correctly, etc. This thread also uses co-operative multi-tasking wherein a proccess is expected to "put itself to sleep" regularly in order to allow other proccesses in that thread to gain access to the CPU. Your dll is dominating this thread and prevent user actions to be serviced!
    Final note;
    If you do not know if the dll is thread-safe and decide you just want to experiment,
    BACKUP YOUR ENTIRE MACHINE!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Sysprep - "Failure occurred while executing drmv2clt.dll" - Fix

    I don't usually have problems running sysprep, but the first time I ran it on a Windows 7 (BETA Ultimate 32bit) PC I received an error that Sysprep could not continue and was halted.  I went to c:\windows\system32\sysprep\panther and opened the setuperr.log file.  (Actually, Windows won't let you open this file (!) so copy it out of this directory, then open it.)  There was not much in the file, just a few lines referencing drmv2clt.dll. 
    2009-04-20 13:37:55, Error      [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'drmv2clt.dll,Sysprep', returned error code -2147024864[gle=0x00000020]
    2009-04-20 13:37:55, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -2147024864[gle=0x00000020]
    2009-04-20 13:37:55, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]
    I searched the MS KB, and sadly, could find nothing.  Then I Googled some of the above and found a couple of references to this.  They mentioned that drmv2clt.dll is associated with Digital Rights Management and this error in Sysprep could be fixed by disabling Media Sharing in Windows Media Player.  That seemed odd.  This Windows 7 PC was setup just to test Sysprep and imaging.  We didn't even start or configure Windows Media Player.  I also had no idea how to disable Media Sharing in Media Player??  This time I went to Windows Help and searched it, but sadly, it too had no information.  I once again Googled this and found out how to disable Media Sharing in Media Player.  It is a service that is configured to automatically start at boot up.
    Click Start > Run, type Services.msc to open the Services applet.
    Scroll down to Windows Media Player Network Sharing Service, double click it, change the Startup type to Disabled.  Click OK.
    Reboot the PC
    Once I did this, I re-ran Sysprep (sysprep /generalize /oobe /shutdown /unattend:sysprepdomainWin7.xml) and it ran without error.
    Seems like a sysprep bug.  I don't think this is a Win7 thing since the fix for this I read was from a BDD 2007 document.  Oh, and if you want to know how to fix problems in Windows, use Google.
     

    Yes, for a company that has a long and challenged history of omnipotence I have come to expect these information black holes as a technician. I have been working with MS and also with Windows since DOS 2.2 and I recall the DOS 4.0 debacle. It was the beginning
    of the use of "Hi-memory" area. They had created the ability to use hi-memory (introduced by Compaq) but they didn't bother to reserve or map what was in memory. So when DOS went to retrieve information loaded in memory it either was overwritten, or could
    not be located. Thus, all machines locked! I worked with a couple engineers from UC Irvine who identified and resolved the problem Windows. I recall working at WB and I introduced Windows ADS, well ultimately we had to migrate from one machine to another.
    There was an information store containing the data of active directories configuration and security called the "DIT" in restoring ADS I ran into a wall. There was no documentation on how to move the DIT, the core of ADS's information. Well I finally got to
    a high level technician that could work with me to relocate and document the procedure. If you are familiar with UNIX then you understand that the user community documents and tests new code. Just inherent part of computing. So I am not surprised that they
    have left us to resolve this issue ourselves.
    Of course they are now pushing AZURE and online storage which could be why they aren't assisting us with this issue.
    the only time is now!

  • Trying to get dll calls to work like c++

    Hi,
    I understand there have been many posts about dll files.  I have reviewed them and found nothing that helps me.  I have a segment of c++ code that communicates with a digital correlator, reading data from it.  The c++ code works fine, but when I wrote the code in Labview, I get results that are reasonable sometimes....sometimes I get good data, sometimes odd data, and sometimes no data.  The c++ code ALWAYS yields good data.  The function prototypes in each of the call library functions matches that in the c++ code. 
    The C++ code is attached.
    NOTE THAT there are a few things (like calculating delay times and writing to file I don't do in the labview code).
    The labview code never outputs any values in TraceA or TraceB, which should be values around 300,000.  The DLL location is set correctly, as evidenced by the fact that the code works....just not consistently.
    Any help would be greatly appreciated.
    Josh
    Attachments:
    Correlator.vi ‏38 KB
    sample.cpp ‏6 KB

    Your message is very clear!
    I have no idea how the fact that this particular code was made to work would help you unless you try to use the same DLL which would seem rather strange. As to what the OP posters problem was:
    One has to provide buffers to DLL functions for ALL parameters when one calls them. Yes LabVIEW does take care about buffer allocations everywhere else so you don't have to worry about that, but when calling C code, LabVIEW can't even guess what buffers the function may need. And therefore it correctly doesn't try to guess at all.
    Those arrays that the function should write into, have to be allocated BEFORE one calls the function. It's the single most problem why DLL calls don't work as expected either returning rubbish or crashing. And anyone claiming to have read all the posts about DLL calling on this board or also on lavag.org should have gotten across at least two dozen messages from me where I pointed that out and explained it in detail.
    in detail: The graph arrays do get initialized but in the same frame all control get initialized to default. That is completely wrong! one does either one or the other but not both and definitly not in the same frame because of uncertainety which is executed first.
    nTrace is initialized to 0 and then used as indication in the CallLibrary Node, how large the array needs to be. Well a 0 element array is just that an array of no content, therefore a buffer that can hold no information and therefore it's sheer unluck that the Call Library Node doesn't crash.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to automatically load function parameters when editing c/c++ DLL call?

    I built a DLL in CVI and is used in TestStand, I want this DLL to have the ability to automatically load function parameters after specifying Module pathname and function name in "Edit C/C++ DLL Call" dialog? How can I do it?

    Staring with CVI 7.1 and TestStand 3.1 you do not need a type library for TestStand to load parameters automatically. Just make sure you declare your exported functions with the __declspec(dllexport) modifier as in the following code:
    __declspec(dllexport) void fun(void)

  • Blank screen after Ending a call on Asha 501

    I got a new Asha 501 last week. I am very happy with the product and its worth for the money spent.
    However, two issues i have noticed so far and its bothering me a bit
    1. after ending a call the screen goes blank and sometimes it takes a bit to end the call. This is very awkward during some important calls. would appreciate if there is any solution for this.
    2. Mail app takes a long time to load the message contents. I know 2g is not the fastest connection but still this is too slow even for 2g.
    best,
    Selvan

    1. On call, when you bring your phone near to your ear, the Proximity sensor recognises your ear and turn off the screen so that there is no unwanted inputs as the screen touches your skin. But when you pull it back, it turns the screen on again, but it takes 0.5-1 second to the Max.
    If it takes longer, make sure there is nothing in front of sensor (it is placed on top left), like Plastic lamination, some accessory, dust or while you pull off your phone, your finger should not be there.
    If it still takes longer, better make your device checked at Nokia Care. If found some problem, they will change the sensor.
    2. The mail app is working perfectly fine for me on Wi-Fi. You should try loading some websites in browser, if it takes longer, check network strength, it should be strong on 2G internet (Personal experience- BSNL 2G, residing near Network tower, slow like hell, in INDIA). Try changing provider.
    Source- Personal experience (owning a Nokia 501)

  • Labview version 6.1 failure:"linker.cpp", line 2302

    I have the labview version 6.1 failure:"linker.cpp", line 2302 fault.
    Does any one can help me please ?
    Solved!
    Go to Solution.

    Actually HeapPeak existed as far back as LabVIEW 4 or maybe even 3. However it is not usually helpful for linker errors as that is something in the LabVIEW compiler itself. HeapPeak can be sort of useful for Insane errors to locate the element that the compiler considers insane (and consequently delete and/or rewire it).
    If this is a recent error on a VI that used to work before, it is most likely related to a corruption to the VI and the best course of action is to replace the VI from a backup (source code revision control would be a great advantage here). If it is something where no previous (working) state is known about, then it is going to be a tough cookie. This version is 14 years old and eventhough I still have some installation of that version somewhere it is several years ago that I started that up for more than some accidential reasons. I'm pretty sure NI would need to do some archeological work nowadays to come up with a system they could use to replicate such an error and the OP would need to be a pretty high profile customer that they would go through that sort of effort.
    Maybe it is related to this error. It is the closest available in the publically accessible list of errors. A complete recompile of the entire source code tree is definitely one of the first actions to try. It may fix the problem or run into even more errors that could maybe point into a more specific location. Upgrading to a more recent LabVIEW version is another possibility although hampererd by the fact that the currently shipping version isn't officially supporting XP anymore and that the Vision software is one piece of software that underwent serious changes in the course of time and an update from 6.1 to the most recent version is most likely not a seamless operation.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Since upgrading my phone to 6.0.1, I'm using way too much data. I believe it's the podcast app that's not loading shows while I'm connected to wifi. I have the 3g turned off for podcasts??? also after a phone call or an alert it starts playing a podcast?

    since upgrading my phone to 6.0.1, I'm using way too much data. I believe it's the podcast app that's not loading shows while I'm connected to wifi. I have the 3g turned off for podcasts??? also after a phone call or an alert it starts playing a podcast?

    I've also had the same issues, after upgrading to IOS 6.0, the apps in my iPhone 4 were crashing and the battery life run out very fast.
    The only solution worked for me was to remove all mail accounts (Exchange/Gmail) from my iPhone (in settings) and then add them back.
    The crashing were stopped! also the battery was back to normal.
    I found the solution by first looking at the crash logs (in IOS 6). you can find them at Settings -> General -> About (at the bottom of the About menu you will find the option that opens the logs).
    There i saw many logs about Low Memory crash. 99% of the logs were pointed that the largest process (use the most memory) during the crashes is "dataaccessd".
    I search in the web and found that this process is a deamon process that reponsible the Mail accounts (like Exchange/Gmail) and contancts list.
    I've installed the app "System Status - activity monitor" which shows important system info like CPU usage, Memory usage and running processes.
    Before apply my solution (deleting the mail accounts) i saw that the CPU usage was very high which consume the battery very fast. Also i saw that the memory (RAM) was run out.. which probably what cause the crashing..
    After deleting the mail accounts (at Settings -> Mail, Contacts, Calendars) i check again with the System Status app, and saw that the memory and CPU were back to normal.
    Adding the mail accounts back, still everything work ok
    Hope this solution will help you too,
    Enjoy!

  • How is it possible to make sure that LV uses the same thread for several threadsafe DLL calls?

    Hello,
    i have a thread safe DLL and most functions are called from serveral threads from the LV apllication without problems.
    In case of an error i have to call an error handler function in this DLL (like WinAPI: GetLastError()) from the same thread which has called the function that failed before.
    I can't use the user interface execution because some functions need a long execution time and i don't want to balk the user interface.
    All other executions than the user interface execution have more than one thread and in most cases the DLL function calls were executed from different threads - so the error handling doesn't work...
    Any idea?
    Thanks for your help!

    Hmmm....
    How about wrapping all of your dll calls in a single VI (or an Action Engine ) and make sure the VI's thread is NOT set for "Same as caller".
    "Threadconfig.vi" (sp?) will also let you dictate the number of threads associated with an execution system. Set your target thread for "1".
    Not sure on the above.
    Please correct me if this is wrong!
    Ben
    Message Edited by Ben on 07-19-2007 08:26 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Import parameter is empty after an RFC call from BW to JCo

    I am calling a Java function (implemented using JCO and deployed on J2EE stack of the Portal box) from within a user-exit in BW (on a separate box) using RFC. The code in BW looks like:
    CALL FUNCTION 'Z_BW_VALIDATE_PROXY' DESTINATION 'ACF2PROXY'
        EXPORTING
            IREQUESTOR = 'AE012345'
            IREQUESTED = '012345'
        IMPORTING
            ERESULT = lv_result
        EXCEPTIONS
            SYSTEM_FAILURE = 1 message lv_rfc_mess
            COMMUNICATION_FAILURE = 2 message lv_rfc_mess.
    The following are working/setup correctly:
    1. RFC destination ACF2PROXY, in BW using transaction SM59;
    2. Java function 'Z_BW_VALIDATE_PROXY' , as the server log on the Portal(J2EE) shows the correct IMPORT and EXPORT parameters after processing a call from BW;
    The data types of the parameters in the function call above matches with those of the formal parameters in Java function where they are defined using JCO data types (export parameter is defined at CHAR 1 at both places).
    The problem is that I am not getting any value back in the IMPORT parameter 'lv_result'. I am expecting either '0' or '1' which is populated correctly in the Java function.
    Any insight is appreciated.

    The following is the code of the method in the class that inherits from JCO.Server. In this method the export parameter ERESULT is set with the value of variable 'result'. I thought it may be helpful to reporduce it here.
    protected void handleRequest(JCO.Function function) throws MMException
              if (function == null) {
                  LOGGER.logInfo("handleRequest - JCO.Function object is null.");
                   return;
              LOGGER.logDebug("handleRequest(" + function.getName() + ")");
              //process this function only, although I don't know what else would fall to this
              //server request method...
              if (function.getName().equalsIgnoreCase(ACF2Listener.ABAP_RFC_PROXY_FUNCTION)) {
                   //get input & output definitions from RFC. These are defined in the repository interface definition
                   JCO.ParameterList input = function.getImportParameterList();
                  JCO.ParameterList output = function.getExportParameterList();
                  LOGGER.logDebug("Received the following from ABAP: " + input.toString());
                  String requestor = input.getString("IREQUESTOR");
                  String requested = input.getString("IREQUESTED");
                  //call DAO to read ACF2 for these values
                  String result = null;
                  try {
                       ACF2DAO acf2 = ACF2DAO.getInstance();
                       if (acf2 != null) {
                            result = acf2.getACF2Delegation(requestor,requested);
                  catch (MMException e) {
                      LOGGER.logError("Exception occured during ACF2 DAO lookup: " + e.getMessage());
                      throw e;
                 output.setValue(result, "ERESULT");
                 LOGGER.logDebug("ACF2 Service Call returning: " + output.toString());
              else {
                   throw new JCO.AbapException("NOT_SUPPORTED","This service is not implemented by the ACF2 Proxy external server.");
    Thanks
    Sanjeev

  • After making a call I put my phone in my pocket and when I bring it out to make a call the player is on killing battery life. How can I shut the player off or prevent this from happening?

    after making a call I put my phone in my pocket and when I bring it out to make a call the player is on killing battery life. How can I shut the player off or prevent this from happening?

    Try to position your iphone that the screen is facing away from your skin.
    Make sure that the back part of your phone will be the one that will contact your skin inside your pocket
    Thats what i do:)

  • Private dll calling in Labview

    Hi everyone, (refinement of my question)
    I have two dlls. One contains public functions which I call from Labview. The functions in this dll call functions in the other (private) dll. However, how do I tell Labview where to find this private dll?
    I have tried installing the dll in the system path directory. I have also put the dll in various different places relevant to Labview (e.g. in the directory of the Labview executable file). However, none seem to work (.
    Is there an option in Labview where I can set paths to dlls?
    Any help will be gratefully received.
    Ciao,
    Matthew Banham (colleague of Francois)

    > I have two dlls. One contains public functions which I call from
    > Labview. The functions in this dll call functions in the other
    > (private) dll. However, how do I tell Labview where to find this
    > private dll?
    >
    > Is there an option in Labview where I can set paths to dlls?
    >
    The problem is that the system loader is what handles the dependent
    DLLs. Since LV knows about the primary DLL, we try multiple locations,
    the path in the dialog, next to the VI, in the LV search paths, and
    finally we ask the system to look in their places. LV doesn't know
    about the dependent DLL, and it is up to the system to find it. I'd
    recommend trying the system or windows folder again. That should be the
    right solution.
    An off the wall thought that might h
    elp would be to add a dependency
    directly into LV by making a DLL node that calls in the the "private"
    DLL. You don't actually have to call it, you can place it in a case
    structure with a constant set the other way. Anyway, this will cause LV
    to look for the DLL, and I think it might help if nothing else works.
    Greg McKaskle

  • Facetime between iPad2 and MacBook Air worked fine here in the USA.  The iPad2 is now in Rome, Italy and we can't connect internationally.  We both can hear the caller ringing in, but after accepting the call we cannot connect.  No voice, no video.

    Facetime between iPad2 and MacBook Air worked fine here in the USA.  The iPad2 is now in Rome, Italy and we can't connect internationally.  We both can hear the caller ringing in and can see who is trying to call, but after accepting the call we cannot connect.  No voice, no video. iPad is successfully sending and receiving eMails, but no Factime connection   What's up?

    I am curious if possibly the hotel has some sort of VOIP block on.  Have you tried Skype?  Did you talk to the hotel staff?  My husband is traveling to Milan in a couple of days and I wonder if he will run into the same issue.  He has had no problems from Istanbul but he is staying in a corporate apartment there.  If you find an answer please post back.  Thanks

Maybe you are looking for

  • How to change my user name?

    I want to change the user name in "Users and Groups" I changed it so that in the upper right hand corner of the desktop it reflects the new name, but when I open the Users folder, it still has the old name.  I want to change the name of the main user

  • Text Variable With Customer Exit ABAP Code

    Hi Experts, Could you please help me with the Logic/Code that i need to use in Calculacting The TEXT Variable Using CUSTOMER EXIT I had a rolling report in which there are 14 Calculacted Keyfigures (Not Restricted KF),Which are M-1,M-2,M-3,M-4,M-5...

  • Comment section in list view of FCE

    Hello, I'm new to FCE, love the program. Why didn't I have this sooner? : ) Am organizing my clips in the browser. A cool feature that I noticed is that in the list view in the comments, once I type a note, if I right click in the same column for the

  • Identify and delete duplicates

    What´s the easiest way to identify and delete duplicate pictures in the iphoto library? (And no - doing it manually is not an option! )

  • Export ok from Keynote 08 but file wint open i PowerPoint 08?

    Hi, I am having problems after exporting a presentation from Keynote 08 (4.0.3)to a PowerPointfile (Office 08 fully patched). The file exports ok but wont open in PowerPoint? Its about 50 slides and a mix of pictures and text. Is it possible to run a