Nidaqmx controls cause resource leak

Hello

I have some string on my UIR controls, which I convert to peripheral selection controls and the channel of daqmx using functions such as NIDAQmx_NewPhysChanAICtrl, NIDAQmx_NewDeviceCtrl, etc.. So far so good..

Out of my execution (which I started from the ide of cvi) resource tracker warns me about 8 different thread locking objects remain in memory, and all point to the daqmx control functions (which are called exactly 8 times). Attached photo

NOR is aware of such a flight? Is it fixed in later versions of the CVI?

I'm on win7-64 bit sp1 CVI 2012, 15.0.0f2 (as seen on MAX) Daqmx

It seems that you forget to throw controls (like all samples of OR).

Just add these two lines before DiscardPanel (panelHandle);

NIDAQmx_DiscardIOCtrl (panelHandle, PANEL_STRING_DEVICE);
NIDAQmx_DiscardIOCtrl (panelHandle, PANEL_STRING_CHAN);

Tags: NI Software

Similar Questions

  • Windows Media Player ActiveX control causes memory leak

    I'm writing an application that will load and play *.avi files in an ActiveX control. The user must be able to load multiple files consecutively in the single player mode. However, it seems to be the memory leak every time that a file is loaded, even if it's the same file. For example, even when you load a small file in *.avi 81KO repeatedly, there is a memory leak ~ 6Mo coherent (as observed in the Manager of tasks). The leak memory is greater when I load larger files.

    I tried to deny it by adding using a Method Close by using the node invoke. It gets about 3 MB of RAM, but when I load the file again, it leaks ~ 9MB, leaving a net leak of ~ 6Mo once again.

    I also used reference close vi (s) to clear the memory ActiveX object, but that did not help either. In other versions of VI, I tried to eliminate the creation of a new IWMPlayer4 object using a shift register, but once again the leak memory persevered...

    It's a simple version of the VI, as well as the small video file attached. In my application, I want to be able to load large video files (~ 600 MB) several times without memory leaks. Thank you in advance for your help!

    -gpho

    Hi jareds.

    Thanks again for test it for me. I use Windows 7 and WMP version 12.

    As you requested, I tested it on a computer with Windows XP and WMP version 9 (and LabVIEW 8.2.1) and the problem of memory has disappeared. I then installed WMP version 11 on the same computer: still no memory problem.

    On the Windows 7 computer, I went back to version 11 using the instructions found on this link, and the problem of memory has disappeared. It seems that memory leak is due to a problem with WMP version 12 (although degraded version 11 on windows 7 has some bugs - and you can't go back to v12).

    Thanks again for the help!

    -gpho

  • A control "VISA Resource Name.

    In LabVIEW, there is a control "VISA Resource Name" which lists all the VISA resources, is automatically updated when devices are plugged or not plugged in and has a navigation feature.

    With CVI, you can use NIDAQmx_NewDeviceCtrl () on a control of the chain, but it lists only the DAQmx resources.

    There is another function that I can use to have all resources VISA listed?

    Hey Vix,

    It seems to be the only solution. Here you will also find an example.

    I hope that helps!

    Bye,.

    Licia

  • Volume control causes trouble high priority thread

    A few weeks ago, when I was finishing my "Flix" app and adjust the priorities of the threads, I noticed that the wire audio high priority interfered with the volume buttons of the PlayBook. Specifically, it could support you on a volume button and nothing would happen, at least not for a second or two. It was as if the priority of the audio thread was so high that it prevented the OS to respond to the pressure on the hardware button to the user.

    This week, the behavior is quite different: the volume controls work fine, but as soon as you press on one of them, the audio wire starts to fight, and the audio gets all the "poppy/static ' y '.

    The really strange thing is that even though the notification of change of volume disappears from the screen, the sound remains ' poppy/static ' y ', as if the volume permanently change event interferes with the audio wire.

    I was wondering if the OS was lowering the priority of the thread on an event of volume change, but I think I have excluded that... when I ask the audio thread for its priority, remains at 63 before and after the events of volume change.

    So it is obviously very confusing... How the hell a single volume change event could interfere with the audio thread of the application until the end of the execution of the application? (Even if the application gets a "break" due to need extra buffer audio and video, as soon as the audio continues, it is always static'y)

    The other thing that may or may not be related, it's that last week my PlayBook prompted me that there is an update of the OS.  The strange thing is that the version of the update seems to be exactly the same as the version of the operating system I had, and it was only 3 MB. I can't help but wonder if this is somehow related to the change of behavior that I see.

    Any help would be most appreciated.

    Thank you!

    Daniel

    I finally understood how to prevent the volume control to cause audio problems.

    Here's the long answer:

    -My app plays WAV files back to back. There was a slight "couture" in the audio that I tried to get rid of.

    -A point I tried removed calls to snd_pcm_open and snd_mixer_open whenever a WAV file has been played, thinking that maybe something to do with the small gap in the audio.

    -I didn't know at the time, but I think it's when editing of the volume begun resulting in distortions on the audio.

    -Distortions are prevented by listening to events of volume change, and when it is received, ensure what I call snd_pcm_open and snd_mixer_open to the next WAV file playback.

  • Adding controls causes exception

    Hi all

    I can't add any instance of the fl.controls to my class.

    The compilation works. And even in debug mode, it passes right now, when the control is added to the mc. But then when running - I guess it happens before the controls should be displayed - I get something like a null reference exception. Either it is 2007 (experianced with ProgressBar) mistake or is 1009 (experianced with RadioButton).

    It's exactly the same problem that is described in the comments from the documentation of the ProgressBar.

    package
    {
     import flash.display.Sprite;
     import fl.controls.ProgressBar;
     import flash.text.TextField;
    
      public class MessageBox extends Sprite
      {
       var progressBar:ProgressBar = new ProgressBar();
       var textfield:TextField = new TextField();
    
       function MessageBox()
       {
        addChild(textfield);//no problem, works and will be displayed.
        addChild(progressBar);//Causes error #2007. Happens later after this line.
       }
    
      }//end class
    
    }//end package
    

    So, how can I use fl.controls without having to enter through the library of .fla?

    Thanks in advance for any advice.

    Gilzad

    Yes, I don't think I have ever seen it work when you try to add a component strictly through code... probably due to the presence of content created manually in objects (skins, etc.).  So normally, you just need to drag an instance on the stage and then delete it so that it is in the library.

  • LabView VB6 Dll interface causes memory leak

    Hello

    We use a large written in vb6 in our laboratory measurement built house software. Recently, we have added a new detector that is read using a labview vi that is called using a dll directly from vb6. Here, we call the function for example of read_detector which starts the collection of data and in a next step writes the data to a string. When you have finished the called function returns a pointer to the string and its length. VB6, we read this pointer and process data.

    This is a memory leak. This could be the case because we presets not memory for labview to write in and so just writing lab data in memory without releasing again? In the current configuration, the function of the dll is just called again and again and each lab view creates a variable outputstring.

    If we allocate the memory. How can we achieve for vb6?

    Best,

    Julian

    Well first of all, a handful of string LabVIEW is a very specific type of data LabVIEW. Not only is only LabVIEW himself knows exactly how to allocate and deallocate, but you must also allocate and deallocate in exactly the same instance of LabVIEW. Given that your LabVIEW DLL is executed for this purpose inside the DLL to run LabVIEW, you must also recover the LabVIEW memory manager functions according to DSDisposeHandle() of the lvrt.dll and call it after you are finished with the strings returned by the DLL function. This is however made very complicated since there are circumstances where not lvrt.dll is actually used by your DLL but another LabVIEW runtime system. And if you happen to have two DLLs created with different versions of LabVIEW LabVIEW, each of them will load and use its enforcement LabVIEW system according to DLL load next. Believe me, you don't want to know how next dll works and how to make this opportunity to work in an application. This is the way for Microsoft to create a monster to manage the hell of the DLL and in this way, rather to create exponential version of hell.

    You create just two memory leaks for each call of DLL function at the moment. LabVIEW creates a new handle of string for each of the parameters string at each call, you dereference the pointer, and then copy the contents into a SysString. But you let the chain handles LabVIEW blow created around the stack and the next your function call, you initialize the new variables of the battery which is initialized to null and LabVIEW creates two new handles. Also you need to do is to define an "Integer DSDisposeHandle(LStrHandle As Long)" exported lvrt.dll function and call it once you have copied the data of the handle in your SysString for both of these handles.

    But basically calling a DLL LabVIEW from no LabVIEW code and using LabVIEW handles string or array as parameters is several times more trouble that it's worth. The easiest would be fair, allocate a large enough buffer beforehand and pass those to the Configuration of the service DLL LabVIEW function to not accept a handful of string LabVIEW but a pointer to a string C instead. Do you work around the problem on the memory allocated by someone else to worry about your own program of VB and duty he properly release. The disadvantage of this approach is, that you should make sure that the memory allocated buffer is large enough for the maximum possible length that your DLL function may never return.

    But another approach might be to leave out LabVIEW total here and call the DAQmx APIs directly from VB.

  • character OCR file causes the leak memory during OCR. Please can someone help?

    I'm trying to use the OCR to read characters from a LCD.

    All works :-) but... it leaks a LOT of memory, becoming unusable in a loop.

    I think the problem is the file of character. I tried several ways to create a (for example of the Interior vision assistant, starting in the stand-alone version of utility training - and without thresholding automatic), and none of them fix.

    The example of OCR OR vi works very well with its own abc file. But if I use one of my friends there is a leak memory every time that it runs, typically a few hundred k bytes.

    Please is - anyone can help or tell what is happening? Or fix the abc file?

    Thank you very much.

    Technical support to the United Kingdom have concocted with a fix. If they give permission, I'll post it here.

    The problem can affect any file OCR training using the GUI tools in 2013 release.

  • SetCtrlVal used during the Thread function works causes memory leaks

    I am writing a program that works if... Or not work if... - see the next lines... :-)...

    The program includes a section, mostly GUI - and User Interaction.

    The other part is a DLL. In the DLL we readings on an external consultant controller RS232. Sometimes the controller card needs (called how much) time and this time must pass then the result can be read card controller... and so on...

    Blocking is not GUI-user-program for the expectation of the return value of the DLL functions (which need a few seconds to be finished) I start a thread in the DLL with

    CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, THREAD_FunctionX, & tmpTFP, NULL);

    with "tmpTFP" as an instance of type "TYPE_THREAD_FUNCTION_PARAMETERS":

    typedef struct
    {
    //
    int IntVal1;                // 1. Integer-Wert
    int IntVal2;                // 2. Integer-Wert
    int IntVal3;                // 3. Integer-Wert
    int IntVal4;                // 4. Integer-Wert
    int IntVal5;                // 5. Integer-Wert
    //
    int IntBuffer1 [32];            // 1. Integer-buffer (aktuell genugt einer)
    //
    Double DblVal1;                // 1. Double-value
    Double DblVal2;                // 2. Double-value
    Double DblVal3;                // 3. Double-value
    Double DblVal4;                // 4. Double-value
    Double DblVal5;                // 5. Double-value
    //
    char CharVal1;                // 1. (Single)- Tank-Wert
    char CharVal2;                // 2. (Single)- Tank-Wert
    char CharVal3;                // 3. (Single)- Tank-Wert
    char CharVal4;                // 4. (Single)- Tank-Wert
    char CharVal5;                // 5. (Single)- Tank-Wert
    //
    char CharBuffer1 [1024];        // 1. Char buffer (akutell einer genugt)
    //
    } TYPE_THREAD_FUNCTION_PARAMETERS;

    In the GUI-user program - I get fast by default-return value of the thread start function.

    Then I asked the DLL (some global state variables are used for this) when it is finished.

    According to the map-controller (RS232) contacted the waiting time depends on the 'mood' of the controller card.

    In the DLL-mark of the GUI-user-program routine now everything works fine - without using "SetCtrlVal!"

    In my GUI, there is a text box of the info/comment for messages. If I do a few outputs user using 'SetCtrlVal' I always errors, caused by the false "TYPE_THREAD_FUNCTION_PARAMETERS"-values in the service of thread. "» If I set a breakpoint at the beginning thread-function I see mostly erroneous values in my transfer structure variables. If I put a breakpoint in the thread-function-calling 'CmtScheduleThreadPoolFunction (...)"and at the beginning of the thread values are (mostly) correct!

    I tried several and different things - but:

    If I ONLY (!)  Commenting on the (!) of a line with "SetCtrlVal", the program works, all States are asked out of the DLL.

    If I replace the "SetCtrlVal" with a written record-file function clean everything works fine and after completing the program I can look at the log file and see all the user information. BUT with 'SetCtrlVal' instead or set or (...) it does not work.

    My description is maybe not entirely clear, but believe me: only ONE line the «SetCtrlVal "line - should be commented out to let the program run properly!»

    Because if the line "SetCtrlVal"is program-user-GUI, after the call to the thread in the DLL, the DLL-memory seems to be corrupted by the call "SetCtrlVal" in the user-GUI program.»

    Best regards

    F.

    There may be a problem in your structure that your variable is set.

    You said that, after the address of the variable in the thread function the appellant one ends. Now, as you can read help each value passed in parameter threadFunctionData of the layed function must point to an area of memory that persist when the fuction is running: If your variable is defined at the level of the functions it is not valid when the thread runs since the appellant finished and released its local memory.

    Your approach with a global variable is a valid alternative, but if it is the solution, you will find data passed to the thread function must be valid for all his life.

  • Z5 MM NullPointerException: causes Resources.getConfiguration () force close in several applications

    SEE Issue tracker here.

    Bug in ROM impacting applications more and more:

    • Keep - trying to set a reminder to place causes force close.
    • Tasks - [same],
    • Hangouts - send causes of the situation force close of play services.
    • Security-> approved locations - trying to create confidence place causes force close.

    I wiped, then fresh installed 32.1.A.1.163. This bug yet.
    Ask yourself:

    1. everyone knows this problem
    2. If you are not affected by this bug, could you give your ROM version (so I can flash!)

    Update:
    Bug fixed in build 253.

    Received notification OTA and set updated to 253. Reminder of the location enabled in the Dungeon, bug is is more exposed.

  • My pc says: the remote control or resources do not accept the connection

    I have Windows 7 can download 360 total security and I did the scan and clean almost everything in the program and then you open the browser, but it does not connect to Internet and it gave me the same message, the remote or resources want except except the connection so I tried all the solutions, but it seemed that my problem is a little different from all the solutions on the Internet and someone says had an idea about my problem please come out and help me.

    Have you tried to remove total security 360?

  • GetCurrent() ADFContext causes memory leak

    Hello

    I use jdev 12.1.3.

    I created a project that uses the Services Rest and when I run it in the integrated weblogic I get this

    <oracle.adf.common> <ADFContext> <getCurrent> <Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent().
    For more information please enable logging for oracle.adf.share.ADFContext at FINEST level.>
    
    
    

    I also have another weblogic, external, to make my application deployments final in which I am also having the same message. The problem is that external stops my services because of this memory leak.

    I looked in my code, and the only reference I had of getCurrent is now deleted.

    I already own classes, make, and rebuild the two projects and I still get the same message.

    In this way, I think that the problem should lie in the services project, but I have no idea where specifically.

    Any help or advice on this subject?

    I looked at if there was a reference to the same problem and I found that unanswered explains my question.

    https://community.Oracle.com/thread/2533050

    Any help is appreciated

    The message tell you that it might be a memory leak, not part.

    In any case, you will need to dig deeper in this issue e.g. seting the log level to the most beautiful (as the message tell you to do). This way you find hence the getCurrent() is called.

    The framework calls this method too on several occasions. If the battery of the adf is not setup properly, you can get these messages. But without a full analysis, you can't fix it.

    If you have a support contract you can ask support.oracle.com for help on this too.

    Timo

  • Issues in the control of resources

    DB version: 10 gr 2, 11 2 GR

    The resource in 'Resouce Mastering' term actually only a block. No lines, table... etc. Right?

    Under what circumstances is the master of a resource (instance a) changed to another?

    I read the following in a book called 'Pro Oracle Database 11g RAC on Linux'

    Block Fusion cache transfers rely on the global resources directory, and they require ever more
    only three jumps, depending on the configuration and the number of nodes. Of course, if there's only two
    cluster nodes, then there will be a two-way transfer of cache. For more than two nodes, a maximum of
    three jumps will be necessary.

    What is the jump that they speak?

    Added a third question
    Edited by: T.Boyd may 4, 2011 12:02

    Hello

    Yes, it refers to a block. Although the entity may be different - sometimes all the blocks of an object (table) can be remastered. This will affect then all rows in the table. But remastering reach the level of the blocks.

    If you put it in simple terms: "in general when an object is frequently consulted form a node only."
    However this is not as easily reproduced. Also, the mechanism internal to detect who is much more complicated.

    The jump is a very weak message.

    Simpler described that way (this only occurs when several instance wants to write/release to date. In the case of the readings it is much simpler):

    You have 3 partners in a RAC. An instance (A) has the block in the cache, one instance (B) please block for writing, and one instance (C) is the master for the block.
    Master means, this instance knows which instance the block at the moment.
    What is generally known in the cluster is, which is the master of each block. (Which is held in the SCM).

    So what happens now that B sends a message to C who owns the block.
    Informed C then has to ship the b block.
    The block is shipped, and B tells C that now he (B) is the holder of the block.

    If you have 3 informational messages and a block of shipping, which is the maximum.
    If the holder/applicant and master are on the same node, you have no messages (so 0 hops).

    Concerning
    Sebastian

  • Models, news, and control of resources

    How can I get rid of the resource Panel. And Group News, it keeps on popping up.

    Also, I see the Panel model, how do I use

    Thank you

    Simon.

    Close the Panel and save a new workspace without this Panel. Use this new workspace.

    Here are some information on customizing the workspace and work with panels.

  • Manager replace causing memory leaks?

    Hey people!

    Recently, I discovered that the use

    Hello

    I don't think that memory is there, trailing

    It's just number.

    I have debug your application and using the static memory to check.

    allocated and it freeed correctly.

    I'm on a simulator.

  • Loading external Images causes memory leak

    I worked on an Actionscript 2.0 project that essentially loads external images.
    Whenever I have load and unload a new image, memory increases to 1 or 2 MB
    If all the images are in the cache, then it grew 4 or 8 KBs
    In the unloading of the images, I took the charger and the container of the image.
    Any thoughts why it behaves like this?
    Please find the below sample code snippet.


    ////////////
    btn_load.onRelease = function()
    {
    loadImage();
    }
    btn_unLoad.onRelease = function()
    {
    unLoadImage();
    }
    var mcListener:Object = new Object();
    var container1:MovieClip;
    var mcLoader:MovieClipLoader;
    var loader_reference =;
    var n = 0;
    function loadImage() {}
    var image_arr = ["http://xyz.com/image1.png ',' http://xyz.com/image2.png ',' http://xyz.com/image3.png ',' http: /xyz.com/image4.png http://xyz.com/image5.png ',''"];
    image_url var = image_arr [n];
    {if(n==image_arr.) (Length-1)}
    n = 0;
    } else {}
    n ++ ;
    }

    container1 = loader_reference.createEmptyMovieClip ("Container1", loader_reference.getNextHighestDepth ());
    mcLoader = new MovieClipLoader();
    mcLoader.removeListener (mcListener);
    mcLoader.addListener (mcListener);
    mcListener.onLoadComplete = {function(target_mc:MovieClip,_httpStatus:Number):Void}
    }
    mcListener.onLoadInit = {function(target_mc:MovieClip):Void}
    target_mc._x = 300;
    target_mc._y = 200;
    target_mc._width = 300;
    target_mc._height = 250;
    }
    mcLoader.loadClip (image_url container1);
    }
    function unLoadImage() {}
    mcLoader.unloadClip (container1);
    mcLoader = null;
    container1 = null;
    removeMovieClip (loader_reference.container1);
    }
    ////////////

    Thanks in advance.

    This code should run only once.  fix this.

Maybe you are looking for