LabVIEW 8 does not close ref's the same as LabVIEW 7!?!

Hello!
I have been struggling with a difference between LabVIEW 7 and 8 in how the Close Reference functions for Active X objects. In order to fully understand the problem, let me first explain the process of how I got here.
I have an application in beta testing and we noticed a huge memory leak in LabVIEW 8, 8.2. I took a snippet of the code and worked on it a while to reduce the memory leak. I was closing every reference and could not explain it so I wrote the same code in VB and saw no memory leaks. I implemented the same code in LabVIEW 8 and still saw a memory leak. The code opens a graph control from a third party vendor and draws it. Each time the graph is drawn in LabVIEW 8, it costs about 30-40k. We have 8 graphs in our application bringing each iteration to 240-320k. The users are going to be reviewing between 96-384 samples in one sitting but we have no control over when the program quits. 384 samples reviewed in the graphs is 92,160k as a minimum. I was frustrated and about to send it to the thrid party vendor, AB Sciex, but they only had LabVIEW 7.1. So I converted it back to 8.0 and then to 7.1.1. I ran the code in 7.1.1 and there were little to no memory leaks! I even tried it in LabVIEW 7.0 and it worked the same as 7.1.1.
I monitored the memory of LabVIEW through the task monitor in Windows XP. I have tried it on a few XP machines and a 2000 machine and same answer on all. I also built a Task Monitor tool using .NET to graph the memory of the LabVIEW process. I verified that running the .NET example as an exe and the windows based task monitor behave the same and produce the same result.
So, I have an example that works in VB, LabVIEW 7.0 and 7.1.1. but 8.0 and 8.2 cause memory leaks! I have tried numerous things to force the removal of the references but nothing seems to have worked. Here is a list of things I have tried in LabVIEW 8 to force the closing of the reference:
- Error detection after each property node/invoke node to catch any errors for the mem leaks
- Deallocate Memory function is placed in every VI.
- All VIs running in the User interface thread to avoid thread collision, also tried running in the IO thread.
- Debugging turned off on all VIs.
- All references converted to controls (instead of constants) and made not visible on the front panel. I hoped this would not force an update to the FP or memory.
- All Open and Close references are in seperate SubVIs for memory deallocation.
- Time delay of 3 seconds in between each property node/invoke node to make sure deallocation can occur.
- Forced recompile and saved all. Rebooted in between all attempts and changes above.
- Put all code and ocx control in a SubVI and called it through the main program as a SubPanel. I can see memory deallocation, but its not a full deallocation. It deallocates about 40k, but the load eats up 80-90k. VB and LV7 deallocate about 20k, increase 55k for the load, then drops 30k after the load and results in about 3-4k in memory for LabVIEW.
I am hoping through this post that someone can help me out with understanding why LabVIEW 8 would handle closing references differently than that of LabVIEW 7. I feel as though i have attempted nearly everything I can to get LabVIEW 8 to work with this example. I have an open reference (ha thats funny) with NI to look at this but wanted to see if any of you had any thoughts? Thanks!
Try it out for yourself here please....
LabVIEW 7.1 Code (1.1Mb)
LabVIEW 8.2 Code (1.1Mb)
Third Party program(77MB)
Memory graphs between 7 and 8 (50k)
Memory Monitor Tool 8.2exe (700k)
Kevin Shirey
PVI Systems Inc.
Certified LabVIEW Developer

Thanks for the reply,
On the first issue, I believe this made sense as it made no difference, but was a recomendation from NI so I tried it.
On the second issue, I just put in a close ref on the input to the Variant to Data function. This ensures that the reference being passed iin will be empty. The Variant to Data function only creates a new instance of the type of reference being passed in. At this point in the code, the reference has already been closed  from a previous VI and I am only using it as a type, as I know it doesn't replace the reference. This was a good check though and looked at all my other variant to data functions just in case but still the same results in LV82.
Third thing is that I tried the profiling tools but it didn't offer a way to track active x data or the memory leak at all. They offered me how much average memory and max they used.
thanks on the fourth. I put in some extra error dialogs now there in case something does happen.
As far as the error detection VIs, they work very well for what I need them for. I like to put in unique error tags in each VI. So long as the error check VIs are in place after each routine, I know exactly where the error occurs because of the error code. So when an error occurs, a dialog box comes up with the LabVIEW error code, VI path and unique error code. It also provides an option to debug which is very cool. It will open the vi with the error and pause it. Then open the block diagram and turn on the light bulb and wait for you to unpause it. This lets you see exactly where the error happened so you can come back to it. It also can record it to a log file or ignore all errors of this type. There is still some things I need to do to it, but its been a work in progress over the years.
What boggles my mind is that the code has no memory leak in LabVIEW 7, 7.1 but has a loss of 40-50k each iteration i LabVIEW 8,8.2. If you have any other suggestions, I am certainly open to trying them.
I am currently investigating a subpanel option to encapsulate all the active x code in another VI and calling it dynamically. Its too early to tell how much this will change things, but I believe the memory leak is because the ocx control of the graph on the main panel is not being released because the main VI never goes idle. If this is true, then the ocx control will be forced to close and deallocate memory because of the dynamic call. When I have the results, I will post em.
Thanks!!
Kevin Shirey
PVI Systems Inc.
Certified LabVIEW Developer

Similar Messages

  • Photoshop does not close files and the program does not quit.

    I have been on the phone with tech support for over an hour. Photoshop does not close files and the program does not quit. I am on a Mac and I am using Photoshop CC 2014.

    Have you tried uninstalling Photoshop CC and re-installing? Another thing to try is to remove all Photoshop CC plist files. There is also the Cleaner tool:
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Since having my computer "cleaned up" recently, Photoshop does not look or act the same.

    Since having my computer "cleaned up" recently, Photoshop does not appear or act the same.  I cannot find some of the tools that used to be there.  Would reinstalling the program help?

    Hello!
    Are you using the same version of the software, or could it be possible that you are using a newer version of photoshop?
    Feel free to post a screenshot to elaborate on the issue that you are having.
    If it is an issue of upgrading to the newest version of Photoshop, you might find this Photoshop Quick Reference Guide helpful with searching for tools
    http://photoshopqrc.businesscatalyst.com
    Hope this helps!
    Julia

  • Excel opens and does not close when using the OI classes for some users...

    Hello Experts,
    I am using the OI classes(i_oi_container_control, i_oi_error, i_oi_document_proxy, i_oi_spreadsheet) to transfer Excel data to my itab. The problem we are encountering is that for some users the excel automatically opens and does not close. But in my case it is not opening so it is fine in my case. In my code I am already using the 'CLOSE_DOCUMENT' and 'RELEASE_DOCUMENT'.

    Viraylab,
    Check by any case you set the parameter register_on_close_event of the method init_control? Dont set the parameter as it will look for the corressponding custom code in your program. Also try with the method release_all_documents.
    Regards,
    Kiran Bobbala

  • When i put a cd into my itunes library sometimes it does not get stored under the same cover. sometimes stored under 3 or 4 different icons. what can i do to prevent this. how do i get all the songs back under the same kicon in one place? help would be a

    sometimes when i put a new cd into my itunes libray all the songs do not end up under the same icon. sometimes it will go into the library under 3 or 4 different icons (album artwork) and sometimes if there are for example 12 songs on the cd each song goes under a separate icon.this seams to happen more frequently with cd's that have different artists on one disc and not just one artist performing all the songs.
    is there anyway to prevent this from happening?
    is there a way to go into my library and get them put back under one icon as it should have been? i have tried drag and drop and it will not work.
    thanks to anyone that can offer some help

    The sort fields should generally be empty unless you've putting in custom values to sort solo artists by their surnames. You can apply common changes to thousands of tracks at once, just don't apply the wrong change because there is no undo.
    It is a good idea to backup before undertaking large scale changes. See this backup tip for a suggested approach.
    tt2
    Message was edited by: turingtest2

  • Problems with Labivew 2013 / 14 install - Ni Variable Engine error and Labview does not close, processes do not stop when I run Vis.

    Hi All,
    I am hoping at all my problems are relateded to a problem I am experancing, when I look into my windows 7 (64bit) event viewer near every time I boot up I get an error regarding the NI Variable Engine which reads.
    The description for Event ID 0 from source NI Variable Engine cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    C:\Program Files (x86)\National Instruments\Shared\Tagger\ni_tagger_plugin_mxs.dll: Failure to load plugin: Unexpected Error: Unable to get the Interface from the plug-in.
    and a second which is the same apart fomr the last line
    Unable to load the MXS configuration plugIn: Failed to get MAX Configuration interface for Tagger: 0x80040318
    I have tried uninstalling all labview things and I have tried repairing all labivew programs. Along with this I got this error when I installed Labview 2013 so I thougth why not try 2014 and I still get the same problems. I also shoudl point out I use bot 32 bit and 64 bit versions of labivew. I have installed labview on many machines before but never encountered this problem. That being said this was a new clean windows install.
    Along with thiese errors labview heardly ever shuts down properly when I close the program it just freezes and needs forshed shut down.
    Apart form this I noticed that when I run any of my Vis which I have never had problems with in the past and I stop the program somtiems processes keep using CPU such as "lktsrv.exe"
    I really need to get this sorted out because its morstly the crushing and processes not stopping which is rather annoying.
    I shoudl also say that these problems are both in the 32bit and 64 bit versions of labview not difference. and no difference if its 2013 or 2014
    Cheers

    Hi GajanS,
    Thanks for your reply sorry I havetn noticed anybody had replied as I stopped hoping for any responce before then.
    I have attached a screenshot of the four processes that seems to be giving me a problem.
    I have actually managed to find the program causing labivew to crash was in fact my antivirus software which I have now removed and have no more problems with labview crashing on shutdown.
    After removing it I tried the repair feature again for all my labview programs but sadly the one persistant problem remaining is still the four processes using around 13% processor each. I have found out this happens sometime after booting up regardless of if I run labivew or not. So it does not directly seem related to the running of any labview applications but rather a bug in the labview software.
     the processes are:
    lktsrv.exe
    tagsrv.exe
    nidmsrv.exe
    lkads.exe
    as shown in the task manager.
    I would relaly help if I can get this sorted out.
    Cheers
    Attachments:
    Screenshot 2015-03-24 21.50.00.png ‏12 KB

  • Does not display photos in the same order they appear on my PC

    I have photos on my Windows PC running iTunes.
    I can successfully get AppleTV to display the photos on my HDTV, but they are not always in the same order as they appear in my PC photos folder.
    And I am not displaying the photos 'randomly'.

    Spare yourself the frustration, use 3rd party apps like Photo Manager Pro. You can drag your photos around.
    https://itunes.apple.com/sg/app/photo-manager-pro/id393858562?mt=8

  • When I try to access my Bank's website from the Bookmarks Toolbar the page does not load.Yet using the same address in Internet Explorer it loads fine.Any ideas

    My Bank's address is :- http://www.santander.co.uk/csgs/Satellite?appID=abbey.internet.Abbeycom&canal=CABBEYCOM&cid=1237889419188&empr=Abbeycom&leng=en_GB&pagename=Abbeycom/Page/WC_ACOM_Home.
    All I get is a rotating green circle & the message "waiting for "service.maxymiser.net"".
    Yet when I use the same address in IE it launches ok'
    My O/S is Windows 7 Home Premium Sevice Pack 1 (x64 based}

    I can access the Bank's site from the link in your post above.
    Try clearing cache and cookies. Also consider what settings you have on any privacy or ad-blocking software. Blocking ad's may speed things up or it may conceivably block access.
    If you have problems with only one site and only in Firefox, the problem is often outdated or corrupt files relating to that web page. I suggest you try the following.
    *Note <br /> It '''looks''' complicated but check the site after each numbered step, the first or 2nd step may solve the problem<br /> The linked articles have '''pictures''' ( screen shots) of the actions you need.
    # Try using the sites home page or a direct link and not a bookmark.<br /> Try link http://www.santander.co.uk
    # Reload website using an extra step to use avoid using the cached info.
    #* Hold down the Shift key and left-click the Reload button <br />OR Press '"Ctrl + F5"' |(Mac ) "Cmd + Shift + R"
    #Clear the cache, and cookies only from problem websites.
    ##<u>Remove the cookies </u>for a single problem website <br />Use: FirefoxButton / Tools → Options → |Privacy| → "Remove individual cookies"<br /> See: [[Delete cookies to remove the information websites have stored on your computer#w_delete-cookies-for-a-single-site]]'''_delete-cookies-for-a-single-site'''
    ## <u>Clear the cache</u> <br />Use ''FirefoxButton / Tools → Options → |Advanced | → Network >'' <br /> See: [[How to clear the Firefox cache#w_clear-the-cache]]_clear-the-cache
    # If the above did not work try in Firefox'[http://kb.mozillazine.org/Safe_Mode s] Safe Mode to check if an extension or some other factor causes the issue. <br /> Use: FirefoxButton /Tools → Help → ''Restart with Addons disabled... ''. <br />See: [[Troubleshoot Firefox issues using Safe Mode]] <br />also see [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

  • How to stop Firefox demanding authentication for each page of the same website (IE does not do this for the same site))

    I have a website (Still being developed but at the testing stage) which works fine in IE but when viewed in Firefox It insists on authentication at every page, instead of just one login it repeats the login at every page.

    Hi,
    If it's Basic auth, please check if this happens in a [https://support.mozilla.org/en-US/kb/Managing-profiles new profile]. If it's okay, you can later [https://support.mozilla.org/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile?s=profile&r=1&e=sph&as=s copy the needed personal data] from the old profile. Firefox stores your personal data and settings in another location separate from its [http://kb.mozillazine.org/Installation_directory files/folder]. A new profile would have the default Firefox settings ('''Tools''' ('''Alt''' + '''T''') > [https://support.mozilla.org/en-US/kb/Options%20window '''Options'''], and [http://kb.mozillazine.org/About:config about:config] ), and usually would also be empty of any '''Extensions''' and themes ('''Appearance''') in Tools > Add-ons) and their settings. Also, a new profile would have no previous stored website data/settings etc., ('''Tools''' > [https://support.mozilla.org/en-US/kb/Clear%20Recent%20History '''Clear Recent History''']).
    [https://support.mozilla.org/en-US/kb/Profiles?s=profile&r=2&e=sph&as=s Profiles Howto]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder & Files]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    For NTLM authentication, you can try to automatically trust the domain in the [http://kb.mozillazine.org/Network.automatic-ntlm-auth.trusted-uris network.automatic-ntlm-auth.trusted-uris] list in [http://kb.mozillazine.org/About:config about:config], eg. domain.com
    Not sure, but for Kerberos, I think you would have to use '''network.negotiate-auth.trusted-uris''' instead.

  • Site does not render in browser the same as preview

    I have build a Muse site.  All looks good on preview.  But when I publish, one page on which I am using html to to iframe in some product data goes crazy.
    Any ideas on how to fix.

    Can you supply a link? Chances are it is invalid code in your iFrame. Check that all the tags have opening and closing tags.

  • Downloaded Super iGoogle 3.0.0 for firefox (10.0.1) but does not work. Installed the same add on for google chrome and it works fine. Any suggestons? Win 7 64 bit.

    Super iGoogle for firefox not working

    Also please make sure that your Java plugins are up to date [[Troubleshoot issues with plugins like Flash or Java to fix common Firefox problems]]

  • Report window does not close properly when using openDocument

    XI R2 InfoView
    Windows 2003 server
    IIS
    IE7
    We have been experimenting with the use of openDocument and have managed to achieve what we wanted but have one small problem.  When the document is retrieved it is opened in a new browser window.  When Close is selected from the drop-down Document menu the document is closed but the window shrinks to approx 8.5cm x 6 cm and remains open.
    A similar thing happens when we use the Preview button to view a document in the CMC, except in that case the document does not close and closing the browser window leaves a button on the Windows taskbar.  There doesn't appear to be a related window as it cannot be restored but you have to right click and select Close to get rid of it.
    Any ideas what is causing these problems and how we can get round them?

    Anne,
    There are some parameters in opendocument (for ex. sWindow) that can help control certain things, have you tried employing anything like that?  What I find frustrating is the behavior of opendocument based on whether you're running Infoview or WebI -- each product, using the same exact opendocument syntax yields different results.  Based on the sample code below, what I'm seeing with Infoview is the same browser instance is used for calling the child report, however, in WebI, a new browser instance is started and the child report is rendered in Infoview.  In my case, when running within WebI and getting a new browser instance in Infoview, and then using the "Document", "close" workflow, the second instance is exiting and I'm back to the previous browser.  Staying within Infoview entirely through the process, when closing the child report I get brought back to the folder list page.  Who's to know?
    ="<a href=https://<server>/businessobjects/enterprise115/InfoView/scripts/opendocument.aspx?
    idocid=100798&lsSInput_Pos_Nbr="+[Position Number Tracking]+">"+[Position Number Tracking]
    +"</a>"
    (double spaced on purpose)
    Thanks,
    John

  • Download Window Does Not Close Upon Completion of Download

    I download a file, the Download Window opens, and asks where I want the file (I set that Tool-Option), but when it is done, the window does not close, even though the Option is set telling it to close when the download is complete
    == This happened ==
    Every time Firefox opened
    == prior to last update

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can try to reset the preferences to see if that helps.
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Webi report using openDocument URL,the window does not close..

    Hello,
    While viewing a Web intelligence report using openDocument URL, the window does not close after clicking on Document -> Close option, and the report remains open.
    And if I close the browser, the session of the user in InfoVierw remains opened
    Thanks
    Environment
    Firefox/3.6.15
    Internet Explorer 8
    BusinessObjects Enterprise XI 3.1
    SAP Integratio KIT XI 3.1
    SAP BW 7.02

    Please check SAP note 1512960  and SAP note 1384496.
    http://service.sap.com/notes
    This behaviour is by design.
    Regards,
    Stratos

  • I recently purchased a new mac computer and would like to sync the music off my iPhone to my new mac.However, my phone and my new mac have different apple Ids.The PC which my phone is synced and has the same apple ID but does not let me transfer the music

    Hi I recently purchased a new mac computer and would like to sync the music off my iPhone to my new mac.However, my phone and my new mac have different apple Ids.The PC which my phone is synced and has the same apple ID but does not let me transfer the music. Home sharing is not working. How do I successfully transfer and sync the music off my ipone 4 to my mac book pro if they have different Apple IDs? Thanks!

    What do you mean the PC won't let you transfer the music? Save your entire iTunes folder (this is assuming that you have all your music stored in your iTunes folder) to an external hard drive. Connect that hard drive to your Mac. Copy the iTunes folder to your computer. Hold down the option key while launching iTunes on your Mac. Select the library you just copied when it ask you to select which library you want to open.

Maybe you are looking for

  • How do I transfer all my data from an iPad Air 32 GB wifi to a new iPad Air 2 wifi 64 GB?

    I received right now a brand new iPad Air wifi 64 GB. How do I transfer all my data from an iPad Air wifi 32 GB, with no more space in iCloud? Thanks a lot.

  • Issues while upgrading to 9.1.0.2

    hi gurus, i am new in oim, i am trying to upgrade to 9.1.0.2 from 9.1.0.1 It is set up on Oracle database 10.0.2 and wls 10.3 when i am trying to Load Metadata into the Database when i am runing the script LoadXML_XACM making changes as mentioned in

  • I need to recover much of my iTunes library

    I had a lot of music in my iTunes account and now much of it seems to be missing.  How can I get it back?

  • "INSERT ALL" bug

    Hello, Recently we have migrated from Oracle 9iR2 on Windows to Oracle 10.2.0.1 on 64-bit Linux. However, one of our scripts stopped working. Consider the following: INSERT ALL INTO Queries_Raw (q_type) VALUES (dummy)            SELECT dummy FROM DUA

  • A slightly different running sum in a hierarchy query

    Hi, I've got stuck with this problem since quite some time, so pls help: I am basically trying to rollup/aggregate values from the lower level nodes to the upper level nodes in a hierarchy. But this aggregate is a bit different than a plain rollup of