I think I found a memory leak in Flash 10.1 involving a particular page

Go to [url]http://politicalticker.blogs.cnn.com/?fbid=o9Nb8jC6wvV[/url] and the browser keeps gobbling up memory until an eventual freeze and crash. I get this result using IE8 in conjunction with flash version 10.1.51.45.

I have experienced something similar, and went on quite an investigation over the past 3 days to work out the cause of the problem.  However, it simply appears to be the new more "efficient" way the garbage collector in 10.1 works.
During execution, my app might use 400mb, then release it.  In 10.0 and earlier versions, that 400mb would be reclaimed by the player pretty much straight away.  However, now it seems to decide that if you have declared you want to use 400mb of RAM yourself, then it decides that for a while it will become a sort of new temporary upper limit for garbage collection.  Thus, it's entirely possible to see memory use climb and climb seemingly unchecked.  I guess now they are working on the idea that if you declared that much RAM can be used by your app at one point, they might as well let it fill up and keep those gc() operations to a minimum.  What's if you then have 400mb of garbage that needs to be cleaned out and you suddenly decide that hey - you want to actually use 400mb yourself?  Well, thankfully it seems that garbage collection runs and then your 400mb is provided.
Interestingly, system.gc() appears to not work anymore.

Similar Messages

  • Memory leak in Flash with Win7, IE9, 64bit

    I have been having an issue for quite some time on 2 different computers. Both of them are Windows 7 64bit and use IE9.
    Generally I have 1 - 5 tabs open in IE at any given time. Usually one of them is a tab for Yahoo Mail. Other tabs are related to whatever I may be searching for or doing at that time, so pretty varied. Throughout the day at random times I will begin to get a grey icon for anywhere on some tabs where there is supposed to be a flash video (like the ad in the right side of the Yahoo Mail tab)... When it happens I can open Task Manager in windows and I notice that 1 or two "iexplore.exe *32" processes have memory consumed in excess of 600,000K. When I end those processes I am again able to see any flash videos that need to be viewed.
    If I leave Task Manager open throughout the day I can see the memory consumption increase on various tabs until I cannot see any more flash videos or even open new tabs in IE until I end those processes. Further, the memory does not get released if I just close the tabs in IE, but I must either end the specific process or close all tabs in IE so that IE is completely unloaded.
    I have since uninstalled the Flash player and the issue has gone away. I can re-install the flash player and the issue returns. Can you please help? This has been a huge annoyance and I had hoped that it would be fixed sooner or later. Unfortunately it has not been fixed and has finally prompted me to post something....

    First, I just wanted to follow up on this thread and let you guys know that we'll continue to look into it.  I also want to clarify some player behavior, and provide tips for helping to identify a defect that we can take action on.
    Whenever you refresh/reload a tab, the browser should signal to us that our process is being destroyed, at which point we would release all of our resources and shut down.  SergeStone's comment above makes it sound like this might not be happening in a particular case.  I'm going to build out a few tests this week to explore this in more detail, and I'll follow up with results.
    Also, it's worth discussing the difference between memory consumption and memory leaks.  Flash Player is designed to consume a percentage of your available memory.  If you have a 32-bit machine with 2GB of RAM, we're going to consume a lot less memory than a 64-bit system with 16GB of RAM. 
    Not all Flash content is authored well.  If the ActionScript developer is continuously loading objects into their SWF and never releasing them (a slide-show is a good simplistic example), you'll see a steady usage increase as each new object loads in.  You should also see that evenutally, our automatic Garbage Collection process will kick in.  Memory will peak out, and then you'll see a short CPU spike as we look at all of the available objects and cull as many unused ones as possible, consumed memory will dip down significantly (as long as we can cull stuff), and then start growing again until the next time GC kicks in.  We tend to do this judiciously, as poorly-timed GC can cause games to stutter if it happens when lots of things are moving around on the display and you don't have a lot of available CPU.
    If it's our bug, it should be straightforward to fix, and I can follow up to this thread with a beta build for you guys to evaluate once we have one available.  In the meantime, it would be interesting to know if you're seeing the problem on our current Beta builds (which is where we would do the work). 
    Here's a link to the latest Beta download:
    http://labs.adobe.com/downloads/flashplayer11-5.html
    Also, the simplest example is the most actionable.  If you can find a situation where a site in a single tab reproduces the problem, that's a quick and easy thing to deal with.  If the repro case involves opening seven tabs and waiting six hours, someone needs to repeat that over and over, until they can isolate what content experiences the problem and then iterate a bunch more with a debugger attached to try and isolate the root cause.  The more complicated the content, the more difficult that is.
    Secondly, I wanted to offer some actionable suggestions that you could use now to work around this issue. 
    Try Firefox or Chrome.  Both of these browsers run Flash Player as a separate process.
    For those of you using Performance Monitor and other tools to measure, you can directly observe the resources used by Flash Player
    For the folks concerned about Bookmarks synchronization, both Firefox and Chrome provide native bookmark syncing and import from IE mechanisms. 
    Xmarks is a really nice, free utility that provides cross-browser, cross-platform bookmark synchronization.
    Thanks,
    Jeromie Clark

  • Memory Leak with Flash Game - video of incident - Fix?

    My hypothesis:
    There is a memory leak in Flash Player that leads to Flash crashing, predictably and repeatedly, when used.
    My question:
    When will this problem be fixed?
    Evidence:
    Observe the progression in the following single-take video of me playing my favorite Flash game, posted to Youtube.  Skip to the times indicated in the "About" description for the video to observe the increase in use of physical memory, as observed in Windows Task Manager, until there isn't anything left.
    http://www.youtube.com/watch?v=gNIJvTuUitU
    My computer gets bogged down, the game stalls out, and Flash needs to be closed to enable my computer to function once more.  It makes it impossible to play this specific game for very long, and is an insidious problem lurking in the background every time I watch a video, play a game, or use Flash Player for any purpose.  My computer always slows down, with the problem worsening as time passes until I need to close everything and start again.
    Details:
    Flash Player Version: 11.7.700.224
    Operating System: Windows Vista (32-bit)
    Browser: Mozilla Firefox
    (Also happens when using Google Chrome)
    Conclusion:
    If you need further information about my specific computer, please feel free to ask.
    If this problem is specific to my computer, I would appreciate knowing this and determining a way to solve the problem.  My suspicion is that the problem originates in Flash Player itself and is experienced by many people in a variety of circumstances.  It is my hope that an articulate response indicating how long it will take to correct this bug in Flash Player can be provided.
    Thanks in advance for your help.

    My hypothesis:
    There is a memory leak in Flash Player that leads to Flash crashing, predictably and repeatedly, when used.
    My question:
    When will this problem be fixed?
    Evidence:
    Observe the progression in the following single-take video of me playing my favorite Flash game, posted to Youtube.  Skip to the times indicated in the "About" description for the video to observe the increase in use of physical memory, as observed in Windows Task Manager, until there isn't anything left.
    http://www.youtube.com/watch?v=gNIJvTuUitU
    My computer gets bogged down, the game stalls out, and Flash needs to be closed to enable my computer to function once more.  It makes it impossible to play this specific game for very long, and is an insidious problem lurking in the background every time I watch a video, play a game, or use Flash Player for any purpose.  My computer always slows down, with the problem worsening as time passes until I need to close everything and start again.
    Details:
    Flash Player Version: 11.7.700.224
    Operating System: Windows Vista (32-bit)
    Browser: Mozilla Firefox
    (Also happens when using Google Chrome)
    Conclusion:
    If you need further information about my specific computer, please feel free to ask.
    If this problem is specific to my computer, I would appreciate knowing this and determining a way to solve the problem.  My suspicion is that the problem originates in Flash Player itself and is experienced by many people in a variety of circumstances.  It is my hope that an articulate response indicating how long it will take to correct this bug in Flash Player can be provided.
    Thanks in advance for your help.

  • Problem Report: Severe memory leak in Flash Player 9.0

    Summary
    Flash player 9.0 is prone to a severe memory leak when
    playing SWF files produced by Captivate 1 containing full-motion
    recordings.
    Versions affected
    The problem reproduces with Flash player 9.0 (Flash9.ocx,
    Version 9.0.16.0) hosted in either Internet Explorer 6.0 or Mozilla
    Firefox 1.5 on a Windows XP SP2 system.
    The problem does not reproduce with Flash player 8.0
    (Flash8.ocx, Version 8.0.22.0) in the same environment.
    Description
    After a few minutes playing a SWF file produced by Captivate
    1 containing a full-motion recording recorded with Captivate 1, the
    host browser ends up using more than a gigabyte of memory, and the
    playback of the movie slows down to a halt, together with
    responsiveness of the whole system.
    Impact
    Our organization develops E-learning content with Captivate 1
    for various customers, mostly Fortune 100 companies.
    This bug severely limits our ability to deliver content to
    our customers.
    Steps to reproduce
    1. Using Captivate 1.01.1418, create a “blank
    movie” with default settings.
    2. Use the “Record” button and begin recording a
    full-motion movie for about 2-4 minutes. For the purposes of this
    bug, it is enough to record a user typing random text in a Notepad
    window resized to fit in the default 800x600 window.
    3. After recording the full-motion movie, publish the
    Captivate movie as a “Flash (SWF)” movie, using default
    settings (making sure that the “export HTML” checkbox
    is selected).
    4. Open the published movie’s HTML file with a host
    browser, making sure that the browser is using the Flash 9.0
    player.
    5. While the movie is playing, watch the memory usage of the
    browser process using Windows Task Manager, and you will see that
    the values of the “Mem Usage” and “VM Size”
    counters keep increasing until the system becomes unusable.

    Also see:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=44&catid=184&threadid =1249396&enterthread=y
    Flash is generating around 300 page faults per second per
    flash animation
    Performance
    issues: page faulting
    Flash is also generating around 300 page faults per second.
    This can be observed by following the instructions in the link
    above for displaying page faults in the system task manager.

  • FLVPlayback Memory Leak in Flash CS3

    Hi There,
    I' making a flash file with AS2 in Flash CS3. I put a FlVPlayback in stage and let it load a couple of FLV files from my local HDD and playing continuously. I use "addEventListener" to check the current running flash movie is completed. After complete event occur, I load another flv movie to paly again.Here, I noticed that memory usage is increasing every time a new flv file is loaded and played. I heard "addEventListener" in CS3 is causing the memory leak and not being detected by GC.
    Please let me know if there is a solution to solve the memory  leak issue. I posted my codes here to know something I'm doing wrong.
    Thanks in advance...
    ================================
    onClipEvent (load)
        function _fun_complete(eventObj)
            this.autoRewind = "true";
            var _v1 = _root.v;
            var _v2 = _root.FLVlists.length;
            --__v2;
            if (_v1 < _v2)
                ++_v1;
            else
                _v1 = 0;
            this.contentPath = _root.FLVlists[_v1].path;
            var _v3 = _root.listVids[_v1].width;
            var _v4 = (stage._width - _v3) / 2;
            this._x = _v4;
            _root.v = _v1;
            this.play();
        this.addEventListener("complete", _fun_complete);

    Helllo Friend,
    Thanks for your feedback. The problem with removeEventListener is that , the player stops and not playing anymore. In my application, I nned to loop and play one FLV files after another. For example, I need to play 3 flv files, File1.flv, File2.flv, File3.flv. I load and play File1.flv first. Once complete event trigger from "addEventlisterner" , then I load File2.flv and then File3.flv and then Flie1.flv. So it needs play continuously and causing memory leak. Please let me know if there is another way of working around.
    Regards

  • Evony Memory Leak in Flash Player

    Is there a work-around of any sort for the massive memory leak in the Evony flash player based game?   When you play this game actively, opening dialogs, and submitting attack, the game can easily leak 250MB/hour until the browser grows in size to well over 1GB, before either crashing or becoming unacceptably slow to interact with.
    This problem is well known on the Evony forums and easily verified by numerous people.  Just google "Evony memory leak".
    It has been repro'ed on all browsers and all platforms that have the Adobe Flash player.  Is this being investigated?  Does the dev team know about this problem?  Is there already a thread on it here somewhere that I missed?
    Thanks,

    Also see:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=44&catid=184&threadid =1249396&enterthread=y
    Flash is generating around 300 page faults per second per
    flash animation
    Performance
    issues: page faulting
    Flash is also generating around 300 page faults per second.
    This can be observed by following the instructions in the link
    above for displaying page faults in the system task manager.

  • Memory leak found in flash player active-x 'CallFunction' method.

    Hello,
    I think I found a memory leak that results from  calling the flash player active-X object's method 'CallFunction'. Each time this  method is called it seems that memory is not properly freed.
    I'm attaching here a  simple program I've made with C# that uses the shockwave flash object to load a  SWF and continuously perform calls to it using the 'CallFunction'. It also  displays the process memory so you can see how it's being increased after some  time running.
    In the zip file, under the bin/release directory, you'll find the  compiled executable and both the test SWF (CallFunctionTest.swf) and its source (AS3 file) which is  just a dummy Sprite that exposes a callable method using the ExternalInterface.  The SWF has been compiled using Flex compiler (Version 3.3.0 build 4852).
    The  leak may become more visible after some hours running. Also, it's interesting to  note that even by reloading the SWF without closing the application (by stopping  and restarting the stress in my test application) the memory is not freed.
    As a reference, in my  computer (Intel Dual core E2180 @ 2Ghz) the test application's virtual memory  (VM64) increased from 192MB to 480MB in 4 hours. In Windows XP 32-bit when this value reaches 2GB the process runs out of memory and the application crashes.
    Does anyone experienced the same problem?
    I have Flash Player version 10,0,32,18 installed.
    Thanks,
    Joan

    Hi,
    I found this problem recently.
    I embedded Flash in my Visual C++ project through ActiveX, and intensively call
    ShockwaveFlashObjects::IShockwaveFlash::CallFunction().
    It seems that every time I invoke this function, the memory usage of my program increase about 8kB, and never goes back again. I think this is caused by the internal memory leak in Flash.
    Does adobe have any plan to fix this issue?
    Alvin. C. Chung

  • Bug:4705928 PLSQL: Memory leak using small varrays

    We have Oracle version 10.2.0.1.0
    We have a problem with a procedure.
    In our scenario we make use of VARRAY in the procedure to pass some filter parameters to a select distinct querying a view made on three tables.
    Unfotunately not always execution it is successful.
    Sometimes it returns wrong value (0 for the count parameter), sometimes (rarely) the server stops working.
    We suspect that this is caused by a bug fixed in versione 10.2.0.3.0
    Bug:4705928 PLSQL: Memory leak using small varrays when trimming the whole collection and inserting into it in a loop
    We suspect this becasue we made two procedure the first (spProductCount) uses a function (fnProductFilter) to calculate the values of a varray and passes them into the select,
    while in the second procedure (spProductCount2) parameters are passed directly into the statement without varray
    and there are failures only in the first procedure.
    On the other hand on another server 10.2.0.1.0 we never have this problem.
    The instance manifesting the bug runs under shared mode, while the other is under dedicated mode.
    Turning the first one to dedicated mode makes the bugs disapear.
    Unfortunately this is not a solution.
    In the sample there are the three table with all constraints, the view, tha varray custom type, the function and the two procedures.
    Is there someone that may examine our sample and tell us if the pl/sql code corresponds to the bug desciption.
    We also want to know if it's possibile that the same server running under different mode (SHARED/DEDICATED) doesn't behave the same way.
    The tables:
    --Products
    CREATE TABLE "Products" (
         "Image" BLOB
         , "CatalogId" RAW(16)
         , "ProductId" RAW(16)
         , "MnemonicId" NVARCHAR2(50) DEFAULT ''
         , "ProductParentId" RAW(16)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M04" CHECK ("CatalogId" IS NOT NULL)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M05" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "Products"
    ADD CONSTRAINT "PK_Products"
    PRIMARY KEY ("ProductId")
    CREATE INDEX "IX_Products"
    ON "Products" ("CatalogId", "MnemonicId")
    CREATE UNIQUE INDEX "UK_Products"
    ON "Products" (DECODE("MnemonicId", NULL, NULL, RAWTOHEX("CatalogId") || "MnemonicId"))
    --Languages
    CREATE TABLE "Languages" (
         "Description" NVARCHAR2(250)
         , "IsStandard" NUMBER(1)
         , "LanguageId" RAW(16)
         , "MnemonicId" NVARCHAR2(12)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M05" CHECK ("MnemonicId" IS NOT NULL)
    ALTER TABLE "Languages"
    ADD CONSTRAINT "PK_Languages"
    PRIMARY KEY ("LanguageId")
    ALTER TABLE "Languages"
    ADD CONSTRAINT "UK_Languages"
    UNIQUE ("MnemonicId")
    --ProductDesc
    CREATE TABLE "ProductDesc" (
         "Comment" NCLOB
         , "PlainComment" NCLOB
         , "Description" NVARCHAR2(250)
         , "DescriptionText" NCLOB
         , "PlainDescriptionText" NCLOB
         , "LanguageId" NVARCHAR2(12)
         , "ProductId" RAW(16)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM02" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "PK_ProductDesc"
    PRIMARY KEY ("ProductId", "LanguageId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc1"
    FOREIGN KEY("ProductId") REFERENCES "Products" ("ProductId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc2"
    FOREIGN KEY("LanguageId") REFERENCES "Languages" ("MnemonicId")
    /The view:
    --ProductView
    CREATE OR REPLACE VIEW "vwProducts"
    AS
         SELECT
               "Products"."CatalogId"
              , "ProductDesc"."Comment"
              , "ProductDesc"."PlainComment"
              , "ProductDesc"."Description"
              , "ProductDesc"."DescriptionText"
              , "ProductDesc"."PlainDescriptionText"
              , "Products"."Image"
              , "Languages"."MnemonicId" "LanguageId"
              , "Products"."MnemonicId"
              , "Products"."ProductId"
              , "Products"."ProductParentId"
              , TRIM(NVL("ProductDesc"."Description" || ' ', '') || NVL("ParentDescriptions"."Description", '')) "FullDescription"
         FROM "Products"
         CROSS JOIN "Languages"
         LEFT OUTER JOIN "ProductDesc"
         ON "Products"."ProductId" = "ProductDesc"."ProductId"
         AND "ProductDesc"."LanguageId" = "Languages"."MnemonicId"
         LEFT OUTER JOIN "ProductDesc" "ParentDescriptions"
         ON "Products"."ProductParentId" = "ParentDescriptions"."ProductId"
         AND ("ParentDescriptions"."LanguageId" = "Languages"."MnemonicId")
    /The varray:
    --CustomType VARRAY
    CREATE OR REPLACE TYPE Varray_Params IS VARRAY(100) OF NVARCHAR2(1000);
    /The function:
    --FilterFunction
    CREATE OR REPLACE FUNCTION "fnProductFilter" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId                    NVARCHAR2 := N'it-IT',
         parFilterValues                    OUT Varray_Params
    RETURN INTEGER
    AS
         varSqlCondition                    VARCHAR2(32000);
         varSqlConditionValues          NVARCHAR2(32000);
         varSql                              NVARCHAR2(32000);
         varDbmsCursor                    INTEGER;
         varDbmsResult                    INTEGER;
         varSeparator                    VARCHAR2(2);
         varFilterValue                    NVARCHAR2(1000);
         varCount                         INTEGER;
    BEGIN
         varSqlCondition := '(T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId )';
         varSqlConditionValues := CHR(39) || TO_CHAR(parCatalogId) || CHR(39) || N', ' || CHR(39 USING NCHAR_CS) || parLanguageId || CHR(39 USING NCHAR_CS);
         parFilterValues := Varray_Params();
         varSql := N'SELECT FilterValues.column_value FilterValue FROM TABLE(Varray_Params(' || varSqlConditionValues || N')) FilterValues';
         BEGIN
              varDbmsCursor := dbms_sql.open_cursor;
              dbms_sql.parse(varDbmsCursor, varSql, dbms_sql.native);
              dbms_sql.define_column(varDbmsCursor, 1, varFilterValue, 1000);
              varDbmsResult := dbms_sql.execute(varDbmsCursor);
              varCount := 0;
              LOOP
                   IF (dbms_sql.fetch_rows(varDbmsCursor) > 0) THEN
                        varCount := varCount + 1;
                        dbms_sql.column_value(varDbmsCursor, 1, varFilterValue);
                        parFilterValues.extend(1);
                        parFilterValues(varCount) := varFilterValue;
                   ELSE
                        -- No more rows to copy
                        EXIT;
                   END IF;
              END LOOP;
              dbms_sql.close_cursor(varDbmsCursor);
         EXCEPTION WHEN OTHERS THEN
              dbms_sql.close_cursor(varDbmsCursor);
              RETURN 0;
         END;
         FOR i in parFilterValues.first .. parFilterValues.last LOOP
              varSeparator := ', ';
         END LOOP;
         RETURN 1;
    END;
    /The procedures:
    --Procedure presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varResult := "fnProductFilter"(parCatalogId, parLanguageId, varFilterValues);
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, varFilterValues(1), varFilterValues(2);
    END;
    --Procedure NOT presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount2" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, parCatalogId, parLanguageId;
    END;Edited by: 835125 on 2011-2-9 1:31

    835125 wrote:
    Using VARRAY was the only way I found to transform comma seprated text values (e.g. "'abc', 'def', '123'") in a collection of strings.A varray is just a functionally crippled version of a nested table collection type, with a defined limit you probably don't need. (Why 100 specifically?) Instead of
    CREATE OR REPLACE TYPE varray_params AS VARRAY(100) OF NVARCHAR2(1000);try
    CREATE OR REPLACE TYPE array_params AS TABLE OF NVARCHAR2(1000);I don't know whether that will solve the problem but at least it'll be a slightly more useful type.
    What makes you think it's a memory leak specifically? Do you observe session PGA memory use going up more than it should?
    btw good luck with all those quoted column names. I wouldn't like to have to work with those, although they do make the forum more colourful.
    Edited by: William Robertson on Feb 11, 2011 7:54 AM

  • Oracle JDBC Thin Driver Memory leak in scrollable result set

    Hi,
    I am using oracle 8.1.7 with oracle thin jdbc driver (classes12.zip) with jre 1.2.2. When I try to use the scrollable resultset and fetch records with the default fetch size, I run into memory leaks. When the records fetched are large(10000 records) over a period of access I get "outofmemory" error because of the leak. There is no use increasing the heap size as the leak is anyhow there.
    I tried using optimizeit and found there is a huge amout of memory leak for each execution of scrollable resultsets and this memory leak is propotional to the no of records fetched. This memory leak is not released even when i set the resultset,statement objects to null. Also when i use methods like scrollabelresultset.last() this memory leak increases.
    So is this a problem with the driver or i am doing some wrong.
    If some of you can help me with a solution to solve this it would be of help. If needed i can provide some statistics of these memory leaks using optimize it and share the code.
    Thanks
    Rajesh

    This thread is ancient and the original was about the 8.1.7 drivers. Please start a new thread. Be sure to include driver and database versions, stack traces, sample code and why you think there is a memory leak.
    Douglas

  • Memory leak using GWT 1.4 and JDK 1.5

    We are running the following:
    OS : Solaris 5.10
    WebLogic version: 10.0
    JDK : Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
    GWT : 1.4
    Oracle : 10g
    We have found memory leak with the above configuration.
    After running 1 session we are facing memory leak. The used Java heap is 4% higher than the one used after we conduct
    our memory tests for 1 user.
    Similarly, after running 5 concurrent sessions we are also facing memory leak where Java heap memory is utilised more
    by about 4%.
    I have used JRockit JDK 1.5 for figuring out memory leak. I have not found a memory leak in any of the modules
    developed by us.
    The memory leak issue is we think concerned with the version of JDK, Weblogic, Sun OS.
    Can somebody please suggest whether we can use the version as mentioned above?
    Any help on this front will be appreciated.

    gc log:
    #log information
    JAVA_OPTS="$JAVA_OPTS -verbose:gc "
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails "
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps "
    JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC "
    JAVA_OPTS="$JAVA_OPTS -Xloggc:/path/to/gclog`date +%Y.%m.%d-%H:%M:%S`.log "Check sun papers for garbage collecting tips.
    >
    Is there any other way we can detect memory leak?
    >
    You have to profile your Application Server like you did with your own code.
    regards
    slowfly

  • Memory leak in fileStream.readMultiByte?

    Hi everybody,
    after a long session bug hunting my ipad application because of a memory leak, i think i found a memory bug in the fileStream class.
    I am using the fileStream class to load xml and css files in my application for initial data etc.
    I parsed the fileStream using readMultiByte() to a string, but there seems to be a small (<1kb) memory leak using this method.
    After switching to fileStream.readUTFBytes() the memory leak seems to be gone.
    Can someone confirm this for me, so that we can submit this to the adobe bug database.
    Greetings,
    Kriz

    Hi Hank,
    how are you using the fileStream to open your files?. If u use the fileStream.open, your application will stop everything, and waits for the file to be completely loaded before continuing, instead u can use the fileStream.openAsync to open a asynchronous connection, and use listeners for the fileStream to execute on completion.
    For you next question, try building your own tweens using Event.ENTER_FRAME, and frame counters instead of a tween engine like TweenLite (tween engines have a lot of handles that are still being used, even if u are not using them), Also try to use Bitmaps, or cacheAsBitmap items for GPU rendering. There are a lot of thread in this forum about this question, and the method used really depends on the type of animation.
    Hope that answers your questions,
    Kriz

  • Memory leak in Safari 4 & 5

    In 10.5 and 10.6, Safari has what I think is called a memory leak. It ties up memory that it is not actually using, so that its use balloons. I can quit and re-open all the same windows and gain half a gig of memory back.
    Anybody know a way to stop this?

    There is an on-going thread from Aug 2009 about "Snow Leopard" and "Memory Leak" or similarly "Memory Hog" etc and not releasing memory as well as how Safari is one of the worst offenders for many others.
    Some have 4GB RAM and no trouble, some with same amount but do.
    And of course clearing Previews, History, Cache, even the Bookmarks cache.
    ~/Library/Caches/
    Flash and other plug-ins, (flash has its own cache) and using something to only load Flash if desired.
    But most found 10.5 and Safari 4 "better behaved" and not the issue 5.0 and 10.6 are.

  • Possible memory leak in e4x or HTTPService with e4x format

    Hello,
    I think I have found a memory leak in e4x.
    In very special cases (=xml) the player swallows the memory.
    The little test program connects to a web server for an xml
    file, and the result is converted to an array.
    The array is displayed in a DataGrid.
    There are two files:
    leaktest.xml doesn't leak in any cases (format: e4x or xml)
    pbentries.xml leaks when the format is e4x.
    Choose e4x format and check Use "Leak" file! Than the program
    leaks.
    For the whole test case (mxml file, html file and xml files)
    please contact me at
    [email protected]
    or
    [email protected]
    and I send a zip file as soon as possible.
    Probably there is a bug in my test program. If so than please
    send me a feedback.
    Thanks,
    Lacito
    ------ For the program cut here ------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    import mx.core.Application;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.http.mxml.HTTPService;
    protected var records_:Array = null;
    protected var httpService:HTTPService = null;
    [Bindable("recordsChange")]
    public function set records(_records:Array):void
    this.records_ = _records;
    var e:Event = new Event("recordsChange");
    dispatchEvent(e);
    public function get records():Array
    return records_;
    protected function getXML():void
    var resultFormat:String = cbResultFormat.selectedItem as
    String;
    var params:Object = new Object();
    httpService = new HTTPService();
    httpService.concurrency = "single";
    httpService.showBusyCursor = true;
    var lastIndex:int = url.lastIndexOf("/");
    var fileName:String = null;
    if(chbUseLeakFile.selected)
    // It leaks... :(
    fileName = "pbentries.xml";
    else
    // It doesn't leak... :)
    fileName = "leaktest.xml";
    var _url:String = url.substr(0, lastIndex+1) + fileName;
    httpService.url = _url;
    httpService.resultFormat = resultFormat;
    httpService.method = "POST";
    httpService.addEventListener(ResultEvent.RESULT,
    processResult);
    httpService.addEventListener(FaultEvent.FAULT,
    processFault);
    httpService.send(params);
    protected function processResult(e:ResultEvent):void
    var resultFormat:String = cbResultFormat.selectedItem as
    String;
    removeListeners();
    if(resultFormat==mx.rpc.http.HTTPService.RESULT_FORMAT_XML)
    setArrayFromXMLNode();
    else
    setArrayFromXML();
    destroyHttpService();
    // format= "e4x"
    protected function setArrayFromXML():void
    var xml_:XML = httpService.lastResult as XML;
    var ar:Array = new Array();
    var x:XML = null;
    var xl:XMLList = xml_.phonebookEntries[0].phonebookEntry;
    for each(x in xl)
    var record:Object = new Object();
    var prop:XML = null;
    var props:XMLList = x.children();
    for each(prop in props)
    record[prop.localName()] = prop.toString();
    ar.push(record);
    records = ar;
    // format= "xml"
    protected function setArrayFromXMLNode():void
    var xml_:XMLNode = httpService.lastResult as XMLNode;
    var ar:Array = new Array();
    var x:XMLNode = null;
    var xl:Array = xml_.lastChild.childNodes;
    for each(x in xl)
    var record:Object = new Object();
    var prop:XMLNode = null;
    var props:Array = x.childNodes;
    for each(prop in props)
    record[prop.localName] = prop.firstChild!=null ?
    prop.firstChild.nodeValue : null;
    ar.push(record);
    records = ar;
    protected function destroyHttpService():void
    httpService.clearResult(false);
    httpService.disconnect();
    httpService = null;
    protected function processFault(e:FaultEvent):void
    removeListeners();
    Alert.show(e.fault.faultString, e.fault.faultCode);
    destroyHttpService();
    protected function removeListeners():void
    httpService.removeEventListener(ResultEvent.RESULT,
    processResult);
    httpService.removeEventListener(FaultEvent.FAULT,
    processFault);
    protected function collect():void
    // Garbage Collection
    try
    new LocalConnection().connect('foo');
    new LocalConnection().connect('foo');
    catch(e:*)
    ]]>
    </mx:Script>
    <mx:ArrayCollection id="alRecords" source="{records}"
    />
    <mx:Label x="10" y="10" text="Result format:"
    id="lResultFormat"/>
    <mx:ComboBox x="104" y="8" id="cbResultFormat">
    <mx:Array>
    <mx:String>e4x</mx:String>
    <mx:String>xml</mx:String>
    </mx:Array>
    </mx:ComboBox>
    <mx:DataGrid id="dgRecords" x="10" y="36" width="936"
    height="437"
    dataProvider="{alRecords}"
    verticalScrollPolicy="auto"
    horizontalScrollPolicy="auto">
    </mx:DataGrid>
    <mx:Button x="355" y="496" label="Get xml" id="btnGetXML"
    click="{getXML();}" />
    <mx:Button x="155" y="496" label="GC" id="btnGC"
    click="{collect();}" />
    <mx:CheckBox x="276" y="10" label="Use
    &quot;LEAK&quot; file:" labelPlacement="left"
    id="chbUseLeakFile" selected="true"/>
    </mx:Application>

    Hello,
    After 3 months (and a new version of flex and flash player)
    my test program is still leaking.
    If somebody could confirm the leak it would be appreciated.
    Thanks,
    Lacito
    P.S.: I heard that Adobe had donated ActionScript 3 VM to
    Mozilla.org. Should I disturb them with my problem?

  • Finding Memory leaks in C using Visual Studio 2013

    I am using Visual Studio 2013, and taking a course in C programming and we started
    talking about memory bugs detaction, in particular memory leaks, and how to detect them using Valgrind on Linux.
    I want to know if there is a way to detect such memory leaks using VS 2013. I tried searching online but it just leads to lots of articles and blogs and msdn posts and blogs with lots of words like dump files, and analyzing them, etc which is weird
    because:
    1) It sounds so complex, convoluted and unintuitive it is actually hard to comprehend it.
    2) The main reason this is weird is due to the fact that VS is the most advanced IDE around and Microsoft spends so much money on in, yet from what I have read it seems that there is no simple way to use VS to detect memory leaks
    - certainly no way that's as simple as Valgrind where I only have to compile the program and run the command valgrind -leaks-check=yes ProgramName
    and it simply prints to me all location it thinks there is a memory leak and describes the error (like not freeing memory after allocating it with malloc hence having "dead" memory after the program finishes, or accessing memory that's out of
    the array bounds)                                                                                                                                                               
    So my question is how to use VS 2013 in order to achieve the same results and to find out First in high level if there are memory leaks in the program, and Second - to detect in a simple manner where those leaks are- preferably without involving dump files
    (not that I know how to use them anyway in VS).

    Hi MicrosoftLaw,
    Thanks for your post.
    Based on your issue, if you want to check if there are memory leaks in the C program from this VS2013. I suggest you could try to find Memory Leaks Using the CRT Library, for more information:
    https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx?f=255&MSPPError=-2147217396
    In addition, I find a similar thread about this issue, please you refer the Dusty's suggestion to check this issue.
    http://stackoverflow.com/questions/45627/how-do-you-detect-avoid-memory-leaks-in-your-unmanaged-code
    I did some research about this issue, I found that the Visual Leak Detector extension tool is a free, robust, open-source memory leak detection system for Visual C++. So if possible, I suggest you could try to use the Visual Leak Detector extension
    tool to find the memory leak for Visual C/ C++ program.
    https://visualstudiogallery.msdn.microsoft.com/7c40a5d8-dd35-4019-a2af-cb1403f5939c
    However, if you have any issue about how to use this Visual Leak Detector extension tool to find the memory leak for C program. I suggest you could directly to write a review to this REVIEW tab in Visual Leak Detector site.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • JMF memory leak

    Hello,
    I made player with playlist and when it runs it is using more an more memory. I think there is some memory leak. I am using java 6.
    This is my code:
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.CachingControl;
    import javax.media.CachingControlEvent;
    import javax.media.Controller;
    import javax.media.ControllerClosedEvent;
    import javax.media.ControllerErrorEvent;
    import javax.media.ControllerEvent;
    import javax.media.ControllerListener;
    import javax.media.EndOfMediaEvent;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.media.RealizeCompleteEvent;
    import javax.swing.JPanel;
    public class EMGPlayer {
         private static Player player;
         private static int st = 0;
         private static Vector<String> v_filePaths = new Vector<String>();
         public EMGPlayer(JPanel p, Rectangle rec, Vector<String> v_filePaths, boolean autoStart) {
              this.v_filePaths = v_filePaths;
              init(p, rec, autoStart);
         public EMGPlayer(JPanel p, Rectangle rec, String  filePath, boolean autoStart) {     
              this.v_filePaths.addElement(filePath);
              init(p, rec, autoStart);
         public void setVisible(boolean visible) {
              if (player.getState() > player.Realized) {
                   if (player.getVisualComponent() != null) {
                        player.getVisualComponent().setVisible(visible);
         public static void init(JPanel p, Rectangle rec, boolean autoStart) {
              try {
                   if (st == v_filePaths.size()) {
                        st = 0;
                   MediaLocator mrl = new MediaLocator(v_filePaths.elementAt(st));
                   st++;
                   player = Manager.createPlayer(mrl);
                   //********gc call*************
                   System.gc();
                   System.gc();
                   System.gc();
                   player.addControllerListener(new Listener(player, p, rec));
                   player.realize();
                   if (autoStart) {
                        player.start();
              } catch (NoPlayerException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
         public static void stop() {
              player.stop();
         public static void start() {
              player.start();
    class Listener implements ControllerListener {
         private static Player player;
         private static JPanel panel;
         private Component visualComponent = null;
         private Component controlComponent = null;
         private int controlPanelHeight = 0;
         private int videoWidth = 0;
         private int videoHeight = 0;
         private static Rectangle rectangle;
         public Listener(Player player, JPanel panel, Rectangle rectangle) {
              this.player = player;
              this.panel = panel;
              this.rectangle = rectangle;
         public synchronized void controllerUpdate(ControllerEvent event) {
              if (player == null)
                   return;
              if (event instanceof RealizeCompleteEvent) {
                   int width = 320;
                   int height = 0;
                   if (controlComponent == null)
                        if ((controlComponent = player.getControlPanelComponent()) != null) {
                             controlPanelHeight = controlComponent.getPreferredSize().height;
                             // panel.add(controlComponent);
                             height += controlPanelHeight;
                   if (visualComponent == null)
                        if ((visualComponent = player.getVisualComponent()) != null) {
                             panel.add(visualComponent);
                             Dimension videoSize = visualComponent.getPreferredSize();
                             videoWidth = videoSize.width;
                             videoHeight = videoSize.height;
                             width = videoWidth;
                             height += videoHeight;
                             visualComponent.setBounds(rectangle);
                   if (controlComponent != null) {
                        controlComponent.setBounds(0, videoHeight, width, controlPanelHeight);
                        controlComponent.invalidate();
              } else if (event instanceof CachingControlEvent) {
                   if (player.getState() > Controller.Realizing)
                        return;
                   CachingControlEvent e = (CachingControlEvent) event;
                   CachingControl cc = e.getCachingControl();
              } else if (event instanceof EndOfMediaEvent) {
                   EMGPlayer.init(panel, rectangle, true);
              } else if (event instanceof ControllerErrorEvent) {
                   player = null;
                   Fatal(((ControllerErrorEvent) event).getMessage());
              } else if (event instanceof ControllerClosedEvent) {
                   panel.removeAll();
         void Fatal(String s) {
              System.err.println("FATAL ERROR: " + s);          
              throw new Error(s);
    }

    I found bug. This code works OK.
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.CachingControl;
    import javax.media.CachingControlEvent;
    import javax.media.CannotRealizeException;
    import javax.media.Controller;
    import javax.media.ControllerClosedEvent;
    import javax.media.ControllerErrorEvent;
    import javax.media.ControllerEvent;
    import javax.media.ControllerListener;
    import javax.media.EndOfMediaEvent;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.media.RealizeCompleteEvent;
    import javax.swing.JPanel;
    public class EMGPlayer {
         private static Player player;
         private static int st = 0;
         private static Vector<String> v_filePaths = new Vector<String>();
         public EMGPlayer(JPanel p, Rectangle rec, Vector<String> v_filePaths, boolean autoStart) {
              this.v_filePaths = v_filePaths;
              init(p, rec, autoStart);
         public EMGPlayer(JPanel p, Rectangle rec, String  filePath, boolean autoStart) {     
              this.v_filePaths.addElement(filePath);
              init(p, rec, autoStart);
         public void setVisible(boolean visible) {
              if (player.getState() > player.Realized) {
                   if (player.getVisualComponent() != null) {
                        player.getVisualComponent().setVisible(visible);
         public static void init(JPanel p, Rectangle rec, boolean autoStart) {
              try {
                   if (st == v_filePaths.size()) {
                        st = 0;
                   MediaLocator mrl = new MediaLocator(v_filePaths.elementAt(st));
                   st++;
                   try {
                        player = Manager.createRealizedPlayer(mrl);
                   } catch (CannotRealizeException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //********gc call*************
                   System.gc();
                   System.gc();
                   System.gc();
                   player.addControllerListener(new Listener(player, p, rec));
                   player.realize();
                   if (autoStart) {
                        player.start();
              } catch (NoPlayerException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
         public static void stop() {
              player.stop();
         public static void start() {
              player.start();
    class Listener implements ControllerListener {
         private static Player player;
         private static JPanel panel;
         private Component visualComponent = null;
         private Component controlComponent = null;
         private int controlPanelHeight = 0;
         private int videoWidth = 0;
         private int videoHeight = 0;
         private static Rectangle rectangle;
         public Listener(Player player, JPanel panel, Rectangle rectangle) {
              this.player = player;
              this.panel = panel;
              this.rectangle = rectangle;
         public synchronized void controllerUpdate(ControllerEvent event) {
              if (player == null)
                   return;
              if (event instanceof RealizeCompleteEvent) {
                   int width = 320;
                   int height = 0;
                   if (controlComponent == null)
                        if ((controlComponent = player.getControlPanelComponent()) != null) {
                             controlPanelHeight = controlComponent.getPreferredSize().height;
                             // panel.add(controlComponent);
                             height += controlPanelHeight;
                   if (visualComponent == null)
                        if ((visualComponent = player.getVisualComponent()) != null) {
                             panel.add(visualComponent);
                             Dimension videoSize = visualComponent.getPreferredSize();
                             videoWidth = videoSize.width;
                             videoHeight = videoSize.height;
                             width = videoWidth;
                             height += videoHeight;
                             visualComponent.setBounds(rectangle);
                   if (controlComponent != null) {
                        controlComponent.setBounds(0, videoHeight, width, controlPanelHeight);
                        controlComponent.invalidate();
              } else if (event instanceof CachingControlEvent) {
                   if (player.getState() > Controller.Realizing)
                        return;
                   CachingControlEvent e = (CachingControlEvent) event;
                   CachingControl cc = e.getCachingControl();
              } else if (event instanceof EndOfMediaEvent) {
                   player.stop();
                   player.close();
                   player = null;
                   EMGPlayer.init(panel, rectangle, true);
              } else if (event instanceof ControllerErrorEvent) {
                   player.stop();
                   player.close();
                   player = null;
                   Fatal(((ControllerErrorEvent) event).getMessage());
              } else if (event instanceof ControllerClosedEvent) {
                   panel.removeAll();
         void Fatal(String s) {
              System.err.println("FATAL ERROR: " + s);          
              throw new Error(s);
    }

Maybe you are looking for