Leaking memory in AIR/HTML

Dear Adobe,
we need a little help fighting memory leaks in AIR 3/HTML application. Are there any tools or techniques you can recommend for this?
We have AIR app developed in HTML+JS, and the amount of memory consumed grows from 30Mb on startup to 90Mb in 4 hours to 190Mb in 8 hours on Windows 7. The app heavily utilizes XMLHttpRequest in long polling mode for communication. We are aware of the potential issue with keeping references to unnecessary objects and circular references and inspected our code for this, but did not find anything suspicious.
Would you please advise us on strategy - how to find and avoid memory leaks in AIR 3 with HTML? There was an Aptana plugin for AIR debugging, but it's only for AIR 2 and no longer useful.

null and removelisteners for everything when your done with them Timur,
Thats what I do and it works. But its still a pain stuff still mangers to get throught the net and takes me an age to track it down.
I manage some complex kiosks written in flash that are on 24hrs a day. Memory leakage is a massive issue for me.
So nulling anything and everything after use is my only weapon against memory leakage!
Apparently though... I think with the new multithreading techniques coming to air help manging leaks easier.

Similar Messages

  • Simple JSP leaks memory?

    Simple HelloWorld.jsp leaks memory significantly. Tested with SoapUI setup with 40 clients driving load. At around invocation 100,000 the WLS server simply leaks enough memory to hit the upper heap size and dies. I'm running V10.3.2 (latest) in Production mode with the JRocket JVM. I also tried the same test with HelloWorld.HTML file and found no memory leaks, it runs HTML test fine up to 1,000,000 invocations with no memory or thread leaks.
    This test can not be any simpler.
    Also, performance goes down significantly as memory leaks! I go from 500tps down to 100tps just prior to running out of memory.
    The JSP file is extremely simple, here's the code:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello World JSP</title>
    </head>
    <body>
    <p>Hello World!</p>
    </body>
    </html>
    Why would such a simple JSP file cause the WebContainer to leak memory? I'm at a loss here.
    Edited by: user9200447 on Feb 26, 2010 10:47 AM

    It depends on the test being run. One possibility is it may be due to implicit session objects.
    Try using session=false otherwise session objects are created implicitly for this jsp. Dependng on sesson timeout, hits and java heap memory size you can run out of memory
    HTH

  • Imapd service "Leak  Memory"

    I already have Java Communications Suite 6 Working , but, I have a Leak Memory problems with imapd process.
    I have the server with 30 imapd process, 30 mshttpd process, and 30 pop process running to balance the load of the users.
    All work fine(the CPU is 100% idle, the RAM is 80% available=6GB) when I access via browser(Chrome,Firefox), too when I access it with the traditional clients IMAP (Outlook, ThunderBird,etc).
    The problem is that if one user want to copy(not just view) locally all your emails to your laptops/pc, the imapd process eat more than 3GB(instead of 80MB) of RAM and the system is getting slower.
    If the user cancel this process(copy via IMAP all your emails) the process dont freedom doesn't release the memory and the system getting slower.
    Actually my solution is:
    # kill -9 <PID_imapd>
    Some times when I kill the process the problem going to other imapd process, so in this case the solution is:
    /opt/sun/comms/messaging/sbin/stop-msg
    /opt/sun/comms/messaging/sbin/start-msg
    I think that this problem is a bug but I dont know what is the patch.
    May you help me? Any idea?
    My system is:
    A X2100 with one socket AMD Opteron 2600Mhz, 8GB RAM, 2 x disks 750GB in mirror with Solaris Volume Manager, Soalris 10 HW 10/08.
    Thanks.
    Jaime

    Jorth, maybe we are not well explained,
    the normal operation of imapd process(one process) need no more that 200MB, when a user is linked to it.
    Check my example:
    ================================================================================================================
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
    818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
    607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
    16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
    798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
    *16673 mailsrv 220M 97M sleep 59 0 0:00:06 0.0% imapd/6*
    *16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
    *16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
    *16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
    *16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
    *16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
    *16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
    *16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
    *16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
    *902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
    NPROC USERNAME SWAP RSS MEMORY TIME CPU
    78 mailsrv 2439M 2329M 28% 0:11:53 0.5%
    14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
    136 root 965M 727M 8.9% 2:15:20 50%
    1 webservd 264M 326M 4.0% 0:16:43 0.3%
    1 noaccess 90M 100M 1.2% 0:01:13 0.0%
    Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
    ================================================================================================================
    When we run an aplication like OutLook to copy locally to the laptopn all the mail via IMAP, "ONE imapd process" eat more memory that need it and never released.
    Example:
    ================================================================================================================
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    *16673 mailsrv 2856M 2534M sleep 59 0 0:00:06 45% imapd/6* <---------------this process eat memory and slow the system(CPU/RAM)
    874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
    818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
    607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
    16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
    798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
    *16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
    *16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
    *16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
    *16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
    *16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
    *16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
    *16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
    *16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
    *902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
    NPROC USERNAME SWAP RSS MEMORY TIME CPU
    78 mailsrv 2439M 2329M 80% 0:00:5 0.5%
    78 mailsrv 2439M 2329M 10% 0:11:53 0.5%
    14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
    136 root 965M 727M 8.9% 2:15:20 50%
    1 webservd 264M 326M 4.0% 0:16:43 0.3%
    Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
    ===================================================================================================
    The rest of the imapd process(29) in this moment just load 40-50MB(when those are free).
    If we kill the process 16673 the user connect to the next imapd process and the problem persist whit the same patology: eat memory and CPU, and slow the system.
    So, we think that is not normal and maybe we need patch the system to solve the problem.
    We will to test the 64Bit version in this moment and we will post the results.
    Thank
    Jaime

  • Bug in navigateToURL? (AIR HTML/JavaScript) window name parameter not working

    Hi,
    I have to popup the default browser from a HTML/JavaScript application.
    All links on the Air page should be opened in the same tab in the same browser window that was opened by the first click on a link.
    The code I use is
    var urlString = "http://www.adobe.com";
    var request = new air.URLRequest(urlString);
    air.navigateToURL(request, "myNewWindow");
    The myNewWindow parameter does not seem to be taken into account:  a new tab is opened on every click.
    I created a new Air application in Aptana and added the following straightforward code to it:
    <html>
        <head>
            <title>navigateToURLTest</title>
            <script type="text/javascript" src="lib/air/AIRAliases.js"></script>       
        </head>
        <body>   
    <a href="http://www.google.com"
                onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">New Tab</a>
            <br />
            <a href="http://www.adobe.com"
                onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">Same Tab</a>
        </body>
    </html>
    Same problem.
    Does anyone have any idea?
    Thanks

    Is there really nobody who can answer or at least try to reproduce this? 
    It's just creating a new Air HTML/Javascript application with one link with a named window target!

  • AIR HTML component problem

    I am using the AIR HTML component to load various website
    directories with. However, any directory that gets loaded into the
    HTML control that uses CAPTCHA, only loads maybe 2 pixels high
    worth of the image. Is this a bug with the HTML control itself, or
    have I failed to instantiate something? To see what I mean, try
    loading this URL into AIR's HTML component.
    http://www.mygreencorner.com/submit.php

    I might add that this is flex 3 Retail version, not the beta.
    Seems to work in the flex 3 milestone 4 beta.

  • Global error handlers in AIR/HTML

    Dear Adobe,
    there is good article on flobal error handling in Flex and AIR 2.0: http://www.adobe.com/devnet/flex/articles/global-exception-handling.html
    Is there a global javascript exception handling mechanism in AIR/HTML? window.onerror does not work (that seems to be Webkit bug fixed in latest Chrome, but not yet in the AIR environment).

    Dear Adobe,
    any thoughts?)

  • Leak memory in xerces DomParser

    Hey,
    I have " leak memory " in my Java application (Stand alone).
    I suspect that this leak caused by xerces DomParser.
    i reached to this conculsion after using in Jprobe as a memory debuger.
    Does any one has a similar problem?
    Thank you.
    code:
    DOMParser parser = new DOMParser();
    parser.parse(new InputSource(new FileInputStream(schemaFile)));

    Hey, which Version of Xerces do you use?

  • Why does Firefox 4 (4.0.1 specifically) leak memory?

    '''Answer:''' I figured it out.
    History lesson first. Ever since the 4.0.1 update, Firefox 4 has been crashing A LOT. It's gotten so bad that FF4.0.1 will eat memory with no end in sight and eventually Windows (Win 7 64-bit) forcefully close the program due to an out of memory error.
    I have 8 GB of RAM installed. And, it would crash once it exceeds 1.5 GB of RAM used by Firefox 4. I've seen Firefox 4 go up to 1.85 GB of RAM in Task Manager. This is with 20 tabs open.
    With the add-on Leak-Monitor, I've narrowed down the issue. Having only Leak-Monitor as the extension installed, all pop-ups point to how '''poorly Firefox 4 handles Javascript'''!
    MSNBC Leak Monitor issue:
    [http://www.octoberasian.com/tech/text/FF4-Leak-Monitor_MSNBC.txt Leak Monitor log from MSNBC.com]
    I've gotten more pop-ups from even support.mozilla.com because of the Javascript on this website.
    Firefox 4.0.1 is leaking memory from every Javascript on every website I load. It's leaking memory as we speak with only this page loaded (one tab).
    FIX IT! Firefox 4 is poorly handling Javascript, especially when multiple tabs are opened.

    octoberasian: I, too, am experiencing this phenomenon. I shut my system down, pulled the EIC cable, held down the power button - then replugged and rebooted. I closed down every unneeded application that I have set to auto-start. Finally, I opened a single Firefox 4.0.1 window and let it sit. It began with consuming 43 Mb of memory. By afternoon - about 5 hours later - it was up to 203 Mb. There is definitely something very wrong with this version. It does the same on all the machines we have, sans our server. We don't use the server for anything but being a server & it has some version of Firefox 3 on it anyway. No Java Scripts were running, nor were any Adobe ARM or any plugins. I noticed when plugins run - the memory leakage goes into overdrive. Hey, I'm just sayin'...

  • Skype 6.4 continues to leak memory at an astonishing rate? Hard crashes ALL my Macs

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

  • DS 5.1sp2 SLAPI plugins leak memory

    I am running DS 5.1sp2, on Solaris 9/SPARC, and have been encountering problems with the ns-slapd process leaking memory when using SLAPI plugins.
    We have written our own bind pre-operation plugin function which, when enabled, causes ns-slapd to leak memory at a pretty rapid rate. I have a simple test where I perform a simple ldapsearch in an endless loop. The ns-slapd process starts off with a VSS of ~617MB (we have a fair amount of cache enabled) ; after a few minutes of my test, the VSS grows by several MB. With the plugin disabled, I can run the same test for hours with no growth in the VSS of ns-slapd.
    I have also performed this test with my plugin disabled, and the "testbind" plugin function (the one provided in <server root></server>/plugins/slapd/slapi/examples/testbind.c) enabled. I see even more rapid memory leakage than with my plugin.
    Are there known issues with SLAPI memory management? Is there anything I can do other than restarting ns-slapd on a regular basis (in production, this memory leak causes VSS growth of several hundred MB in the course of a few days).

    I think if you want to modify the result before it is returned, your plugin needs to be invoked post-op as well. Your plugin can be both at the same time, just make sure your init function knows what to do when called a second time.
    Moreover, without looking at the stack trace, it is hard to make any progress. Do you still have the core file? Can you paste the pstack and pflags output ?
    # Run "file" on the core to see if its a 32 or 64 bit core
    # cd /path/to/ns-slapd
    # pstack <corefile>
    # pflags corefile
    Alternatively, see if you can reproduce the problem with a small plugin. Smaller the better. I'll give it a go.

  • GetOracleDecimal seems to leak memory?

    Hello, I am using the C# statement below to retrieve a decimal value from an OracleDataReader, adjust the precision, then assign it to a .NET decimal type:
    decimal volume = (decimal)OracleDecimal.SetPrecision(reader.GetOracleDecimal(5), 28);
    Over time, the service that hosts this method leaks memory. After some investigation, I found that "Oracle.DataAccess.Types.OpoDecCtx" types were collecting in the finalize queue. Any ideas on how to resolve this? I can't explicitly Dispose() an OracleDecimal...
    I'm using ODP.NET version 2.102.2.20.
    Thanks

    Thanks for the reply. I am using .NET 2.0 SP2. I upgraded the ODP.NET client to 2.111.7.20 but am still seeing leakage of the OracleDecimal structs.
    Here's a snippet of output from WinDbg:
    Ready for finalization 32874 objects (0b4de540->0b4fe6e8)
    Statistics:
    MT Count TotalSize Class Name
    00fb8cec 32816 656320 Oracle.DataAccess.Types.OpoDecCtx
    With each pass of the service the Count and TotalSize grow in increments equal to the number of rows I'm querying...
    Just for laughs I changed the GetOracleDecimal statement to GetDecimal and the memory issue went away (because I'm no longer creating OracleDecimals). But I need to use the higher precision type to prevent overflows..
    Thanks again..

  • Does ReportDocument leak memory?

    <p class="ssiBODYCOPY">Using CrystalDecisions.CrystalReports.Engine.ReportDocument XI R2.<br /><br />w3wp.exe memory use raises while a report is generated (which is expected), yet it does not seem to be ever released after. If you keep generating same report again and again, IIS eventually runs out of memory.<br />A report does not call any external DLLs or COM objects.<br />Calling repDoc.Dispose() does not seem to help.<br /><br />Please help.<br /></p>

    Methods:
    Dispose()
    GC.WaitForPendingFinalizers()
    GC.Collect()
    Details:
    I created a C# application that connects to BOXI.
    It does not specifically use the ReportDocument object, but was also encountering serious memory issues.
    I was also using the Dipose method to mark objects for garbage collection.
    .Net garbage collection happens automatically (at some time or another), but you can force it using GC.Collect(). I tried this, but was still leaking memory.
    Until I found GC.WaitForPendingFinalizers(), which causes the garbage collector to wait until all disposed objects have completely finished their destructors. I think this made the difference with BOXI objects, because they are nested.
    After I was using all three methods, I had no more memory issues. I realize this information may be out of date, but I posted it for future seekers.

  • Using Facebook SDK in Air HTML environment

    Hi,
    I am building an AIR application using HTML/JS and I'm trying to work with Facebook Javascript SDK for some simple functionality.
    It seem however when running and an AIR environment I am not able to access the FB object.
    I have the SDK locally so I know its there but simple FB.init() and FB.login() are non-existent and without errors...
    I also tried using the FB AS3 library by incldeding it in <script> tags but this gives me an error
    TypeError new window.runtime.com.facebook.graph.Facebook() is not a constructor
    Don't know if its because my xml namespace is version 2.0 and not 1.5 (1.5 errors as well but it says some IFilePromise class is not found.
    Can the Javascript SDK be used in building Adobe AIR HTML apps?

    Annoyingly the SDK hasn't been updated in over three years. I've had a casual look via Visual Studio's object inspector to see if I can spot any new methods or properties that could be useful but if they are there then they are hidden well. Media Kind, for example, was introduced in iTunes 9, I think, but can't be read from code.
    I don't know what tasks you're hoping to automate, but you might find some of my scripts useful either in their own right or as food for thought.
    tt2

  • Consuming SOAP services from AIR/HTML (JavaScript).

    Hi All.
    I am trying to consume SOAP web services from an AIR/HTML application for a research on AIR I am doing for my company, and I am having very little success.
    I am creating JavaScript clients using apache's cxf wsdl2js utility.
    When I try to use the client to call any web service I've tried, I always get an 'error 500' response.
    The web services work fine if i call them from other clients.
    Before trying cxf generated clients I googled a lot to see if there was a more native way of doing these calls from AIR, but found nothing. I don't see anything in documentation or the web about it.
    Am I the only one trying this?
    Could this be a cross-domain issue? I'm certainly hoping AIR apps don't have this issue.
    Any pointers as to how to succesfully consume SOAP services from AIR is greatly appreciated.
    Thanks!

    In Visual Basic, you can set Network Credentials like this (assuming that you first declare Public CallWebService001 As New <WebReference>):
            ' Create a new instance of CredentialCache.
            Dim mycredentialCache As Net.CredentialCache = New Net.CredentialCache()
            ' Create a new instance of NetworkCredential using the client
            ' credentials.
            Dim credentials As Net.NetworkCredential = New Net.NetworkCredential(<username>, <password>)
            ' Add the NetworkCredential to the CredentialCache.
            mycredentialCache.Add(New Uri(CallWebService001.Url), "Basic", credentials)
            ' Add the CredentialCache to the proxy class credentials.
            CallWebService001.Credentials = mycredentialCache

  • Adobe Air - HTML, Javascript and Threading

    Hello,
    I am developing an application using Adobe Air - HTML and
    Javascript. What I am trying to do is to implement threading in
    Javascript. I am using implementing threading in Javascript as per
    this Neil blog.
    Click
    Here. It clearly says that this threading works only in Firefox
    2.0 and I am trying to use this in with my Adobe Air, but when I
    try to refer a function , it gives me error saying "unable to find
    it".
    I was wondering if this is the best way to go for threading
    in Adobe Air HTML application or there is some other way also.
    Thanks,
    Jaikishan

    Hi jjalan,
    The yield and generator functionality is only available in
    Firefox's javascript execution engine. When you are executing
    javascript in AIR, it is done by the webkit and squirrelfish. Take
    a look at
    http://webkit.org/blog/189/announcing-squirrelfish/
    If you can find a javascript library that works on safari /
    webkit, chances are high that it may work in AIR.
    Also, you can always do pseudo-threading via the age old
    setTimeout()

Maybe you are looking for

  • Report does not give output

    Hi, I created a report which just run a sql query and give the output correct. The code was select target_name,target_type, column_label, warning_threshold,critical_threshold,occurrence_count from sysman.MGMT$TARGET_METRIC_SETTINGS I added a drop dow

  • Planned elivery time in scheduling agreement

    Hi experts problem is that the schedule lines (for external procurement) generated from MRP are not taking the "" Planned delivery time into consideration"".  System is only taking the G.R processing time. I have mentioned the Planned delivery time i

  • How do you use Bonjour to download SoundAmp app recordings?

    I have the SoundAmp app installed on my iPhone 4s and use it to make recordings.  But some are too big to email, so you're supposed to be able to download them via Safari and Bonjour.  But enabling Bonjour on Safari is not helping to find the recordi

  • [js] [cs3] hint needed: row height

    good afternoon (or what is it, whatever?!) there ! help to solve that plz, i have an insertion point in a cell / a cell selected in a big green table. i need to set the height of the row, that hosts that cell to a certain value. When it's done, i nee

  • Since update to later version of Lion, some applications don't work?

    Since I updated to a later version of Lion, the following things have stopped working: -Safari -VLC Media Player -Java based things (chatrooms don't work for example) I did a combo update that someone suggested and this did nothing. Here are my specs