3.6.7 Lag, Delay, Memory Leak Checked But Not Fixed?

Well, open a tab, try to open another tab, about 20 seconds of appearing frozen passed.
Okay let's try clicking the first tab again, oh well, another 20 seconds frozen with cursor not even usable.
Okay let's try clicking the url bar, oops, another 20 seconds of delay, and the program is up to 180 megs of memory, that spikes down to 150, then builds again, apparently a new routine is added to "clear" the memory every so often, however, THE MEMORY LEAK ITSELF REMAINS UNTOUCHED.
Maybe Firefox has become so disgustingly bloated with worthless and useless "innovations" that stroke the egos of its developers that, finally, the program is worthless for daily use.
Second Life is a program that's been around for a very long time, and just open firefox, then Second Life. First, you log in to second life wearing the image of the webpage you have open in Firefox. Then you notice that Second Life is lagging endlessly, sometimes with 5 second delays trying to select anything. Close Firefox, and Second Life performs properly. Amazing isn't it?
Memory issue is THE MOST IMPORTANT FIRFOX ISSUE but apparently no one cares, too busy appreciating themselves for some part of the program that was their idea I guess.
Who cares if 3.5 Firefox is the first to have video without a plug in, if, the program is memory leaking like the BP well was leaking oil??
But, as one can see with a memory monitoring program, Firefox now, finally after almost 20 revisions, has a "fix," to lower the amount of memory along some time-line that seems to keep it from accumulating to 500 megs in a matter of minutes, but, WITHOUT ACTUALLY FIXING THE CAUSE OF THE MEMORY LEAK.
I wonder if these volunteers for Firefox are unemployed, and that's why they have time to work on Firefox, their lack of competence the reason they are unemployed, long before this recession.
FIX THE MEMORY LEAK THAT STARTED WITH 3.5 ALREADY! PUT EVERYONE ON THAT INSTEAD OF ANYTHING ELSE!
P.S. My extensions have nothing to do with Firefox's lack luster performance. The issues have existed with or without them installed. Reality: Firefox programmers are busy with head inserted in hindquarters, feeling good about themselves for volunteering, irrespective of coding pure junk. Quality and doing what is right have apparently been thrown out the door, and the message, "a free internet means you get worthless products" the message of Mozilla.org.
== This happened ==
Every time Firefox opened
== version 3.5

same basic idea- ctrl-shift-del (clear everything) and it went from taking >700megs on startup (PC XP,all addins disabled) to ~60megs.
Better wtf is what was stored in that 650+ megs?

Similar Messages

  • Dbx SEGV signal encountered while memory leak checking

    Good morning,
    Last week, I have encountered the following problem while debugging a UNIX Solaris on a SUN server:
    Running the program without memory leak checking goes fine.
    Running the program while memory leak checking gives following error message:
    RTC: Enabling Error Checking...
    t@1 (l@1) signal SEGV (no mapping at the fault address) in __rtc_memcpy at 0xffffffff7312dc98
    I have already mentioned the problem on the SUN forum (as it is dbx related), but as the problem is not solved by installing patches, using more recent dbx versions and, most important, as a "where -l" dbx command reveals that the problem is located within an Oracle file, I start to believe that the problem is not caused by dbx, but by Oracle.
    The SUN forum post can be found back using following URL:http://forum.java.sun.com/thread.jspa?messageID=9575156
    The result of the "where -l" command is the following:
    (dbx) where -l
    current thread: t@1
    [1] libwtc8.so:_init(0x0, 0xffdfffff, 0xffffffff7f72a3f8, 0xffffffff7f72a9e8, 0x200000, 0x400000), at 0xfffffffd22501180
    [2] ld.so.1[L]:setup(0xffffffff7f72a9e8, 0xffffffff7f72a158, 0xffffffff7f72d838, 0xffffffff7f72a140, 0x3, 0x1001403c8), at 0xffffffff7f60f8fc
    [3] ld.so.1[L]:_setup(0x2710, 0x2710, 0xb00, 0xffffffffffffffff, 0x0, 0xffffffffffffffff), at 0xffffffff7f61d8c0
    [4] ld.so.1[L]:_rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f604ce0
    <UNIX prompt>find / -name libwtc8.so 2>/dev/null
    <internal directory>/oracle/lib/libwtc8.so
    <internal directory>/oracle/lib64/libwtc8.so
    As the "nm" command only reveals a "_init" function for the latter libwtc8.so file, I believe strongly that this is the one referred by by dbx.
    In case you need more information (e.g. as far as Oracle versions are concerned), could you also include the UNIX commands, needed for retrieving this information?
    Kind regards
    Dominique

    The statement 'while memory leak checking' is not clear. Are u compiling with -g flag or profile flags ? OR using the 'collect' of SUN STUDIO ??
    Can u place the complete trace of CORE using the command 'dbx - core' for further analysis.
    Are U using any STL 3rd party libraries for Linking ?? .
    Place the sample code if possible.
    After going through SUN forum , I realize that there can be an imcompatibility with SOLARIS LIBS and Oracle of 64Bit layer. Are compiling in 64bit or 32 bit ?
    Try 64Bit compilation.

  • Solaris process memory usage increase but not forever

    On Solaris 10 I have a multithreaded process with a strange behaviour. It manages complicated C++ structures (RWTVal or RWPtr). These structures are built from data stored in a database (using Pro*C). Each hour the process looks for new informacion in database, builds new structures on memory and it frees older data. But, each time it repeats this procedure, the process memory usage increases several MB (12/16MB). Process's memory usage starts from 100M until near 1,4G. Just to this point, it seems the process has memory leaks. But the strange behaviour is that after this point, the process stops to continue growing up anymore. When I try to look for memory leaks (using Purify tool) the process doesn't grow up and no significant leaks were showed. Did anyone found a similar behaviour or can explain what could be happening?

    markza wrote:
    Hi, thanks for responding
    Ja, i guess thats possible, but to do it all one row by row seems ridiculous, and it'll be so time consuming and sluggish surely.  I mean, for a months worth of data (which is realistic) thats 44640 individual queries.  If push comes to shove, then I'll have to try that for sure.  
    You can see by the example that I'm saving it to a text file, in csv format.  So it needs to be a string array, a cluster won't be of much help I dont think.
    The only other way I can think of is to break it up into more manageable chunks...maybe pull each column separately in a for loop and build up a 2D array like that until the spreadsheet storing.  
    You only do 1 query, but instead of Fetching All (as the Select does) you'll use the cursor to step through the data.
    You can use Format to String or Write Spreadsheet fire with doubles.
    You can break it down to get the data day by day instead of a full month at once.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Power book G4 Leopard 10.5.8. File sharing preference checked but not working after start up until unchecked and the rechecked?

    I hope the title is enough info, please ask. In the mean time I have created an applescript to open preferences/ sharing and uncheck then check the file sharing box. This works but I would obviously prefer it just work normally. I have no corrupt preference files. Perhaps a file is missing? Thank you.

    Greetings Kwnez
    I'm not up to your level of expertise yet. I'm networking and file sharing too, on my Mac Powerbook 1.33 GHz PowerPC G4; OS 10.5.8 Lepoard. At the public library I found by asking the clerk a book Authored by David Pogue. "Mac OS X Leopard the Missing Manual". It (the book) has helped me ask better questions. I'm not saying that your question "
    Power book G4 Leopard 10.5.8. File sharing preference checked but not working after start up until unchecked and the rechecked?
    is hard for me to understand, I went to system preferences and looked at the sharing box. when I clik it it opens up and the first thing I see is my computers name, and under that i see, " Computers on your local network can access your computer at: ...-powerbook-g4-15.local"
    What I'm saying is "Are we on the same Page"

  • Memory leak checking doesn't work: SEGV problem while debugging with dbx

    I am debugging a program which has memory leaks.
    When I do the following:
    dbx <program>
    (dbx) run <input parameters>
    everything runs fine, but as I didn't use RTC leaks checking, this is of no use. Therefore I do the following:
    dbx <program>
    (dbx) check -memuse
    memuse checking - ON
    (dbx) check -leaks -frames 8
    leaks checking - ON
    (dbx) run <input parameters>
    which gives the following result:
    Running: <program> <input parameters>
    (process id 17075)
    Reading rtcapihook.so
    Reading rtcaudit.so
    Reading libmapmalloc.so.1
    Reading rtcboot.so
    Reading librtc.so
    RTC: Enabling Error Checking...
    t@1 (l@1) signal SEGV (no mapping at the fault address) in __rtc_memcpy at 0xffffffff7312ed90
    0xffffffff7312ed90: __rtc_memcpy+0x0014: st %o4, [%o0 + %o3]
    dbx: Stopped within call to '__rtc_suppress_always'. Starting new command interpreter
    (dbx) where -l
    current thread: t@1
    [1] libaio.so.1:_init(0xfffffffe52000058, 0x0, 0xffdfffff, 0xfffffffe52000030, 0x400000, 0x80000), at 0xfffffffe55907a90
    [2] ld.so.1[L]:setup(0xffffffff7ffff250, 0x0, 0xffffffff7f72c2b0, 0x10000, 0x0, 0x0), at 0xffffffff7f610ba4
    [3] ld.so.1[L]:_setup(0xffffffff7fffffab, 0x1f, 0xffffffff7ffff640, 0xffffffff7fffffbe, 0xffffffff7ffff628, 0xffffffff7f72dde8), at 0xffffffff7f61f24c
    [4] ld.so.1[L]:_rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f6052d4
    I think this means that there is a problem within my 'RTC' libraries.
    When I run the "version" command within my dbx session, I get following results:
    (dbx) version
    Machine hardware: sun4u
    OS version: 5.9
    Processor type: sparc
    Hardware: SUNW,Sun-Fire-480R
    The following components are installed on your system:
    Sun Studio 9
    Sun Studio 9 C Compiler
    Sun Studio 9 C++ Compiler
    Sun Studio 9 Tools.h++ 7.1
    Sun Studio 9 C++ Standard 64-bit Class Library
    Sun Studio 9 Garbage Collector
    Sun Studio 9 Fortran 95
    Sun Studio 9 Debugging Tools (including dbx)
    Sun Studio 9 Debugger GUI
    Sun Studio 9 Performance Tools (including collect, ...)
    Sun Studio 9 X-Designer
    Sun Studio 9 VIM editor
    Sun Studio 9 XEmacs editor
    Sun Studio 9 Native Connector Tool
    Sun Studio 9 LockLint
    Sun Studio 9 Building Software (including dmake)
    Sun Studio 9 Documentation Set
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.0 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.3 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Performance Analyzer 7.3 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.5 2004/07/15
    Can anybody help me out?
    Which additional information do I need to provide in order to solve this issue?
    Message was edited by: B.V. (the "where -l" command has been added
    B.V.

    Hello Maxim,
    As you said, it was worth to try, but unfortunately, it was not a very good investment :-(
    The patch 117564-06 has been installed, and I have retried the same procedure, but the same problem occurs.
    As you have mentioned in a previous reply, I have flagged the "rtc_error_stack" before launching the "where" command.
    The result is the following:
    Running: <program> <input parameters>
    (process id 21873)
    Reading rtcapihook.so
    Reading rtcaudit.so
    Reading libmapmalloc.so.1
    Reading rtcboot.so
    Reading librtc.so
    RTC: Enabling Error Checking...
    t@1 (l@1) signal SEGV (no mapping at the fault address) in __rtc_memcpy at 0xffffffff7312f068
    0xffffffff7312f068: __rtc_memcpy+0x0014: st %o4, [%o0 + %o3]
    dbx: Stopped within call to '__rtc_suppress_always'. Starting new command interpreter
    (dbx) dbxenv rtc_error_stack on
    (dbx) where -l
    current thread: t@1
    =>[1] librtc.so[0xffffffff7de01778]:__rtc_memcpy(0xfffffffe5013fff0, 0xfffffffe50220040, 0x8, 0x
    10, 0x803, 0x64a3c338), at 0xffffffff7312f068
    [2] librtc.so[0xffffffff7de01778]:change_masks_work(0xfffffffeff90e878, 0xfffffffeff90e878, 0x
    803, 0x2, 0x0, 0xffffffff73243608), at 0xffffffff7312e618
    ---------- called from debugger ----------
    [3] libmd5.so.1:_init(0xfffffffe50b00228, 0x0, 0xffdfffff, 0xfffffffe50b00208, 0x400000, 0x800
    00), at 0xfffffffe531016e0
    [4] ld.so.1[L]:setup(0xffffffff7ffff260, 0x0, 0xffffffff7f72c2b0, 0x10000, 0x0, 0x0), at 0xfff
    fffff7f610ba4
    [5] ld.so.1[L]:_setup(0xffffffff7fffffa6, 0x1f, 0xffffffff7ffff650, 0xffffffff7fffffb9, 0xffff
    ffff7ffff638, 0xffffffff7f72dde8), at 0xffffffff7f61f24c
    [6] ld.so.1[L]:_rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f6052d4
    (dbx)
    Any ideas?
    Thanks
    Dominique

  • T420S Synaptics Memory Leak + Volume buttons not working

    As title says, I'm having big problems with a memory leak from the touchpad driver. I've updated to the latest driver, but it still happens. This morning, the process was using 6.5 GB of ram! This is ridiculous.
    2nd issue is with the volume controls on the keyboard. They only work 50% of the time. I've reinstalled the driver, but it still happens. I have to manually change the volume in windows for the buttons to start working.
    Anyone know any solutions to these problems? Thanks

    I would be interested in knowing which process was using 6.5 GB of RAM, and how you measured the memory usage. I'm not seeing this on my T420s
    It sounds like the problems with the volume buttons are related to this problem: http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/Some-control-keys-don-t-work/td-p/558657 and possibly this one: http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T400-Brightness-cannot-be-changed-after-sta... 
    It seems like, in recent years, several vexing and frustrating problems have been introduced into the programs in the Thinkvantage software suite which handle the onscreen displays and buttons. So far, Lenovo has ignored threads reporting these problems.

  • Windows Server 2008 R2 - When svchost.exe memory-leaks Outlook does not load properly

    Hi all,
    We have a server which runs Windows Server 2008 R2, fully updated, and acts as a Terminal Server (Citrix XenApp 6.5).
    In the past couple months we have had problems with svchost.exe leaking memory, growing to 2-3GB of RAM usage. Sometimes is occurs with weeks between the incidents, sometimes days. To solve the issue we have to reboot the server.
    When this occurs, Outlook (fully updated) doesn't start for any users at all. Outlook doesn't continue from the "Loading profile.."-stage. The users who already has Outlook started doesn't have any problems, unless they close Outlook ;) . 
    The svchost.exe is the one which runs the services:
    NSI
    WinHttpAutoProxySvc
    W32Time
    Netprofm
    FontCache
    EventSystem
    We've patched the server with KB2847346 but with no result. Patch KB2950358 is not applicable..
    Any ideas?

    svchost is hosting multiple services. when the issue occurs you can use sysinternals procmon (or enable the command line column in task manager process tab) to view to determine which service is using that much memory.
    MCP/MCSA/MCTS/MCITP
    Did you read my whole post, or did you just misunderstand the part were I wrote:
    The svchost.exe is the one which runs the services:
    NSI
    WinHttpAutoProxySvc
    W32Time
    Netprofm
    FontCache
    EventSystem"
    I know that svchost.exe runs ALOT of services, so when the problem occurred I checked which services the specific svchost.exe runs. Everytime it happens the svchost.exe (which leaks and has 2-3GB mem usage) runs this specific services.

  • Excessive lag in VI on Mac, but not Windows

    I have created a VI that accepts user input to collect, save, and open voltage waveforms from a DAQmx board. It is a while loop and a state machine with a lot of information in it so I understand that efficiency might be an issue. This lag only exists, however, on a Mac, whether it is compiled into an application or run through LabVIEW. The VI on my Windows 8 machine has no issue handling 1000 samples, but when I run it on my MacBook, asking for 10 samples creates approximately a 20 second lag between data aquisition and data display, and a 30 second lag when asking for 100 samples, etc. This is the case for my Mac desktop as well. Could this be an issue with the way a Mac handles this information/memory, and are there any quick fixes to reduce this lag? Thank you for your input!

    It would be helpful if we could see a bit o' code.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Starcraft lags in full screen mode but not minimzed mode, hardware issue?

    hi
    recently ive noticed that starcraft ( fully updated ) in fullscreen mode lags incredibly, pratically beyond being playable, im not sure what this is due to, but in minimized mode it plays just fine, the game is really old and i dont really see any software reason for this.
    here are some relevant notes
    my computer was affected by the nvidia issue and the part was replaced less than a year ago, so i dont think its the video card, or could it be?
    my computer has been heating up a bit for like 3 months, i recently downloaded the smc fan control to control that and its been fine since then
    i ran the hardware test that came with the comp and everything seems to be fine
    i ran techtools pro too and everything it checked seemed to be fine
    dont know what else to say, this kinda confused me, if anyone knows anything, i would be greatful

    I cant say I've tried starcraft on it but I have played WoW on mine, extensively. And it does the same for me, suggesting its a matter of software design... since they are both from Blizzard.
    Its quite a notable difference too...

  • Materials in stock at u loc consider for Availability check but not for MRP

    Dear ALL,
    Please solved the problem by settings in the customizing  we are able to set the materials  at stock U location (serviceable )should not be considered in Mat Availability  for PM orders
    Settings we have made for all storage locations in U * By excluding storage location stock from MRP
    If storage location stock is excluded from MRP at plant level, no receipts for this storage location will be created in the planning run.
    so we are able to run the availability check perfectly
    But now MM dept.is not accepting this as they want this stock to be considered for MRP
    Has anybody done this scenrio successfully please reply the solution
    Regards
    Pratap

    A way that I think of, is to set the ATP at SL level, so in PM order you check only in a specific location, not in all the plant.
    Of course that you need to let all SLs to be relevant for MRP, otherwise this stock is not considered for planning.

  • Password button checked but not required to open screen saver or wake up

    I want my iMac to require a password to wake from sleep or restore the screen. The button for this option (Require password to wake this computer from sleep or screen saver) is checked under Security, but is not being used. I tried unclicking and reclicking the button, and I tried making sure iTunes is turned off, in case having a radio station playing prevents something from happening, but no luck. Any suggestions?
    David

    I have seen many threads about this over the years, and have even seen it on my own Mac (but it's working fine right now.) The long and the short of it is that I no longer trust that feature to work as advertised. Now I fast user switch to the login window before sleeping my Mac or leaving it unattended. The next person to use the Mac will need to enter the account password to get back in, so this really works just as well as what the screen saver password is supposed to do.
    I even wrote a little script to switch to the login window and then put my Mac to sleep when I press Command-F13. I can share how to do that with you if you like.

  • CS4 inserted image shows in browser check but not with actual web site

    I started a web page with CS3 and images were inserted with
    cells show on web page. Now I have CS4. I made set number of rows.
    Each row has text and images. They show up in live view but when I
    search my site and check the page only the text shows. I am so
    confused!!

    Your link goes to...
    http://www.proheatinc.com/company/images/zane-storms2.png
    and is 404 File Not Found. Then another one in the same folder...
    http://www.proheatinc.com/company/images/bill-burnett.png
    pops up no problem.
    Check your file names and link names to verify they are identical. Servers are CaSe SeNsITiVe, so Zane-Storms2.png is not the same as zane-storms2.png as far as your server cares (your local OS is not case sensitive, so a link to either would go to the same file).

  • Videos checked but not coming on my ipod.

    i have a spongebob episode and its in my library (in purchased folder) and i open my ipod tab and klick on movies that i have and its checked of but it wont go into my ipod. i keep checking it and pressing apply to update it but it wont put the video in my ipod. help. and by the way, this video was on my ipod last nite and it was working fine. but now what do i do?

    Read and study the article in details:
    http://docs.info.apple.com/article.html?artnum=304680
    Hope this helps???
    Compaq PC / 1GB Ipod Nano & 80GB Video   Windows XP   Pent 2.53 GHZ 512MHZ MB RAM 120GB HD

  • How to configure license file for Memory Leak tool and WL Server 9.2?

    (I posted to general JRockit forum before realizing existence of this forum which is probably more applicable.)
    Here's our problem:
    Running latest version of WL 9.2 MP3 and JRockit Mission Control 3.0.1
    Able to run Mission Control, and connect to the WL Server and to run View Console with no problems.
    I can't get Memory Leak tool to run because it complains about needing a license file.
    First I tried with off the shelf WL 9.2 MP3.
    Get error:
    A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (192).
    Error: Can not find component Memory Leak Detector for JRockit * in the license file. Please check http://www.jrockit.com/license for license updates.
    So I downloaded license file from JRockit download site - wls92.zip. It contains several files, but no clear instructions on what to do with these files. I copied one of these files "LIC-WLSP92.txt" to my JRockit home as C:\bea\JROCKI~1\jre\license.bea
    Tried again. Restarted WL server. Restarted JRockit Mission Control.
    Get error: A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (3052).
    The license file does not exist at: C:\bea\JROCKI~1\jre\license.bea
    Any advise on how to install license or who to contact for help?

    Installed Mission Control 3.0.3.
    Got following message when I attempted to run Memory Leak:
    A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (192).
    Error: Can not find component Memory Leak Detector for JRockit * in the license file.
    Please check http://www.jrockit.com/license for license updates.
    I believe that we're using the latest downloads of WebLogic 9.2.x and JRockit.
    WebLogic is running using 9.2.3 and JRockit build R27.4.0-90_CR358515-94243-1.5.0_12-20080118-1154-windows-ia2
    Contents of C:\bea\jrockit_150_12\jre\license.bea:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bea-licenses>
    <license-group format="1.0" product="JRockit" release="*">
    </license-group>
    </bea-licenses>
    Could WebLogic be misconfigured?
    Any diagnostics to help figure out the licensing?
    Any other ideas?

  • Memory Leak with new Font()

    Hello all,
    Not sure if this is the right place to post this but here goes. I have a program that needs to change the font of at least 250,000 letters, however after doing this the program runs slow and laggy as if changing the fonts of each letter took up memory and never released it? Here is a compilable example, Click the button at the bottom of the window and watch the letter it is currently working on. You will notice that around 200,000 it will begin to not smoothly count up anymore but count in kind of a skipping pattern. This seems to get worse the more you do it and seems to indicate to me that something is using memory and not releasing it. I'm not sure why replacing a letter's font with a new font would cause more memory to be taken up I would think if I was doing it properly it would simply replace the old font with the new one not taking anymore memory then it did before. Here is the example: This program sometimes locks up so be prepared. If someone could maybe point out what is causing this to take up more memory after changing the fonts that would be great and hopefully find a solution :) Thanks in advance.
    -neptune692
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package paintsurface;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class PaintSurface implements Runnable, ActionListener {
    public static void main(String[] args) {
            SwingUtilities.invokeLater(new PaintSurface());
    List<StringState> states = new ArrayList<StringState>();
    Tableaux tableaux;
    Random random = new Random();
    Font font = new Font("Arial",Font.PLAIN,15);
    //        Point mouselocation = new Point(0,0);
    static final int WIDTH = 1000;
    static final int HEIGHT = 1000;
    JFrame frame = new JFrame();
    JButton add;
    public void run() {
            tableaux = new Tableaux();
            for (int i=250000; --i>=0;)
                    addRandom();
            frame.add(tableaux, BorderLayout.CENTER);
            add = new JButton("Change Font of letters - memory leak?");
            add.addActionListener(this);
            frame.add(add, BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(WIDTH, HEIGHT);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    public void actionPerformed(ActionEvent e) {
        new Thread(new ChangeFonts()).start();
    void addRandom() {
            tableaux.add(
                            Character.toString((char)('a'+random.nextInt(26))),
                            UIManager.getFont("Button.font"),
                            random.nextInt(WIDTH), random.nextInt(HEIGHT));
    //THIS CLASS SEEMS TO HAVE SOME KIND OF MEMORY LEAK I'M NOT SURE?
    class ChangeFonts implements Runnable {
        public void run() {
        Random rand = new Random();
            for(int i = 0; i<states.size(); i++) {
                font = new Font("Arial",Font.PLAIN,rand.nextInt(50));
                states.get(i).font = font;
                add.setText("Working on letter - "+i);
    class StringState extends Rectangle {
            StringState(String str, Font font, int x, int y, int w, int h) {
                    super(x, y, w, h);
                    string = str;
                    this.font = font;
            String string;
            Font font;
    class Tableaux extends JComponent {
            Tableaux() {
                    this.enableEvents(MouseEvent.MOUSE_MOTION_EVENT_MASK);
                    lagState = createState("Lag", new Font("Arial",Font.BOLD,20), 0, 0);
            protected void processMouseMotionEvent(MouseEvent e) {
                    repaint(lagState);
                    lagState.setLocation(e.getX(), e.getY());
                    repaint(lagState);
                    super.processMouseMotionEvent(e);
            StringState lagState;
            StringState createState(String str, Font font, int x, int y) {
                FontMetrics metrics = getFontMetrics(font);
                int w = metrics.stringWidth(str);
                int h = metrics.getHeight();
                return new StringState(str, font, x, y-metrics.getAscent(), w, h);
            public void add(String str, Font font, int x, int y) {
                    StringState state = createState(str, font, x, y);
                    states.add(state);
                    repaint(state);
            protected void paintComponent(Graphics g) {
                    Rectangle clip = g.getClipBounds();
                    FontMetrics metrics = g.getFontMetrics();
                    for (StringState state : states) {
                            if (state.intersects(clip)) {
                                    if (!state.font.equals(g.getFont())) {
                                            g.setFont(state.font);
                                            metrics = g.getFontMetrics();
                                    g.drawString(state.string, state.x, state.y+metrics.getAscent());
                    if (lagState.intersects(clip)) {
                    g.setColor(Color.red);
                    if (!lagState.font.equals(g.getFont())) {
                        g.setFont(lagState.font);
                        metrics = g.getFontMetrics();
                    g.drawString("Lag", lagState.x, lagState.y+metrics.getAscent());
    }Here is the block of code that I think is causing the problem:
    //THIS CLASS SEEMS TO HAVE SOME KIND OF MEMORY LEAK I'M NOT SURE?
    class ChangeFonts implements Runnable {
        public void run() {
        Random rand = new Random();
            for(int i = 0; i<states.size(); i++) {
                font = new Font("Arial",Font.PLAIN,rand.nextInt(50));
                states.get(i).font = font; // this line seems to cause the problem?
                add.setText("Working on letter - "+i);
    }

    neptune692 wrote:
    jverd wrote:
    You're creating a quarter million distinct Font objects, and obviously you must be hanging on to all of them because each character is having its font set to the newly created object. So if you have 250k chars, you're forcing it to have 250k Font objects.
    Since the only difference is that rand.nextInt(50) parameter, just pre-create 50 Font objects with 0..49, stick 'em in the corresponding elements in an array, and use rand.nextInt to select the Font object to use.That does make sense but it does that when the the program is first launched and doesn't lag. But the second and third time you change the letters font it seems to lag so if it wasn't taking up more memory the second time it should perform like it did when it first launched. I don't care to investigate any further. The real problem is almost certainly the quarter million Font objects. It could be that 250k is fine, but by the time you get to 500k, it has to do a lot of GC, and that's where the slow down is coming. You might even be able to make it work better with the code you have just by tweaking the GC parameters at startup, but I wouldn't bother. Fix the code first, and then see if you have issues.
    Does creating a new font for each of those letters not replace the old font object? If it didn't use more memory the second and third time I don't think you would see the skipping in the counter and the slowing down of the iterations. So it must be remembering some of the old font objects or am I wrong?Using new always creates a new object. When you do it the second time around, and call letter.setFont(newFont), the old Font object is eligible for GC. That doesn't mean it will be GCed right away though. The JVM can leave them all laying around until it runs out of memory, and then GC some or all of them.

Maybe you are looking for

  • How to retirve data in the same sequence as it is entered by user.

    Dear All, Can anybody please help me to resolve the below oaf issue. Issue : In one of the column in advanced table is OAMessageTextInputBean. User will enter data as 1) color 2) size 3) name. I set the properties of Text inputBean Heigth and length.

  • Selecting records based on different fields

    Post Author: timg CA Forum: General I have three groups which I study quite often, the blues (as identified in field 1with codes), the reds (identified in field 2 with codes), and the greens (identified in field 3 with certain codes). I want to be ab

  • Address bar i'm feeling lucky

    The reason I'm using firefox is that i could change the configurations and that allowed me to use the address bar as I wanted. Before the last update, I used the address bar with the option I'm feeling lucky from Google and had Duck for the search ba

  • Track not downloaded

    I have just downloaded an album and track 2 did not download, it is labelled in my playlist in light grey with an exclamation mark beside it.  How do I get it to download? Thanks.

  • Strange error from grant_permission call error

    Hello, I just updated from Oracle 10g to 10.2.0.2.0, then I tried to load TIFF into Oracle using the sample scripts. connect system/manager; call dbms_java.grant_permission('PUBLIC','SYS:java.io.FilePermission','&1', 'read' ); call dbms_java.grant_pe