Mdworker memory leak when indexing m4a files?

Hello!
I just upgraded to ML from SL and I really like it so far. In fact I have only one problem that I can't seem to find any solution to and I'm almost certain it's probably a bug. But I also can't really find any other information anywhere which seems strange if it was a real bug.
Anyway, the problem is with spotlight. After I installed a clean copy of ML it did it's first indexing with no problems. Then I started copying data from my Time Machine backup and all was well until I reached my iTunes library. At this point my mac almost froze, I could barely move the mouse or issue any command. I had a Terminal window open so I could force a reboot without forcing a shutdown.
I started investigating and as far as I can tell indexing has no problems with any file except m4a files. Normally during indexing both CPU and mem increase slightly for a brief period and then go back down. When indexing an m4a file (seen on the Open Files tab in Activity Monitor) one mdworker almost immediately eats all free memory (around 3GB usually) and then the kernel starts paging GB of data for around 30 min per file during which the OS is almost frozen. Then this mdworker disappears, mds takes over for a while until another mdworker appears and repeats the cycle.
This wouldn't be a problem except my iTunes library is pretty large and it would take a looooong time to index everything. For now I simply added my library to the privacy tab in Spotlight which solved the problem until I tried to do a Time Machine backup that seems to use Spotlight in some fashion and this triggers indexing again.
In the mean time system.log is full of messages like these:
Aug 28 22:27:44 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10130]): Exited: Killed: 9
Aug 28 22:27:44 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10130 [SleepServicesD]
Aug 28 22:27:56 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10131]): Exited: Killed: 9
Aug 28 22:27:57 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10131 [SleepServicesD]
Aug 28 22:28:10 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10132]): Exited: Killed: 9
Aug 28 22:28:11 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10132 [SleepServicesD]
Aug 28 22:28:24 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10133]): Exited: Killed: 9
Aug 28 22:28:25 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10133 [SleepServicesD]
Aug 28 22:28:36 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10135]): Exited: Killed: 9
Aug 28 22:28:37 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10135 [SleepServicesD]
Aug 28 22:28:49 macbookpro kernel[0]: (default pager): [KERNEL]: ps_select_segment - send HI_WAT_ALERT
Aug 28 22:28:49 macbookpro kernel[0]: (default pager): [KERNEL]: ps_vstruct_transfer_from_segment - ABORTED
Aug 28 22:28:49 macbookpro kernel[0]: macx_swapoff FAILED - 35
Aug 28 22:29:04 macbookpro WindowServer[82]: CGXDisableUpdate: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
Aug 28 22:29:04 macbookpro WindowServer[82]: reenable_update_for_connection: UI updates were finally reenabled by application "Finder" after 9.48 seconds (server forcibly re-enabled them after 9.29 seconds)
Aug 28 22:29:07 macbookpro kernel[0]: macx_swapon SUCCESS
Aug 28 22:29:18 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10136]): Exited: Killed: 9
Aug 28 22:29:18 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10136 [SleepServicesD]
Aug 28 22:29:40 macbookpro kernel[0]: (default pager): [KERNEL]: default_pager_backing_store_monitor - send LO_WAT_ALERT
Aug 28 22:29:40 macbookpro kernel[0]: macx_swapoff SUCCESS
Aug 28 22:29:50 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10139]): Exited: Killed: 9
Aug 28 22:29:51 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10139 [SleepServicesD]
Aug 28 22:30:09 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10140]): Exited: Killed: 9
Aug 28 22:30:09 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10140 [SleepServicesD]
Aug 28 22:30:13 macbookpro kernel[0]: (default pager): [KERNEL]: default_pager_backing_store_monitor - send LO_WAT_ALERT
Aug 28 22:30:11 macbookpro netbiosd[81]: name servers down?
Aug 28 22:30:13 macbookpro WindowServer[82]: CGXDisableUpdate: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
Aug 28 22:30:25 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10141]): Exited: Killed: 9
Aug 28 22:30:25 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10141 [SleepServicesD]
Aug 28 22:30:39 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10144]): Exited: Killed: 9
Aug 28 22:30:39 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10144 [SleepServicesD]
Aug 28 22:30:51 macbookpro WindowServer[82]: disable_update_likely_unbalanced: UI updates still disabled by application "Finder" after 41.72 seconds (server forcibly re-enabled them after 1.22 seconds). Likely an unbalanced disableUpdate call.
Aug 28 22:30:52 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10146]): Exited: Killed: 9
Aug 28 22:30:52 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10146 [SleepServicesD]
Aug 28 22:31:06 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10147]): Exited: Killed: 9
Aug 28 22:31:07 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10147 [SleepServicesD]
Aug 28 22:31:20 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10148]): Exited: Killed: 9
Aug 28 22:31:21 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10148 [SleepServicesD]
Aug 28 22:31:26 macbookpro WindowServer[82]: reenable_update_for_connection: UI updates were finally reenabled by application "Finder" after 76.64 seconds (server forcibly re-enabled them after 1.22 seconds)
Aug 28 22:31:29 macbookpro com.apple.launchd[1] (com.apple.cfprefsd.xpc.daemon[10150]): Exited: Killed: 9
Aug 28 22:31:30 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10150 [cfprefsd]
Aug 28 22:31:30 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10149 [cfprefsd]
Aug 28 22:31:31 macbookpro com.apple.launchd.peruser.501[133] (com.apple.cfprefsd.xpc.agent[10149]): Exited: Killed: 9
Aug 28 22:31:34 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10151]): Exited: Killed: 9
Aug 28 22:31:35 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10151 [SleepServicesD]
Aug 28 22:31:46 macbookpro com.apple.launchd[1] (com.apple.sleepservicesd[10154]): Exited: Killed: 9
Aug 28 22:31:47 macbookpro kernel[0]: memorystatus_thread: idle exiting pid 10154 [SleepServicesD]
Aug 28 22:31:53 macbookpro mdworker[10116]: (Normal) Import: Spotlight giving up on importing file after 304.275 seconds, (300.442 seconds in Spotlight importer plugin) - diagnostic:0 - find suspect file using: sudo mdutil -t 817999
Any ideas or just wait until 10.8.2?

I have this problem too, exactly same thing but on a fresh install. Copied over my music from a time machine backup and suddenly machine is no longer usable, Activity Monitor shows mdworker using >3GB of real memory. I force quit the process and it just starts again a few seconds later.
I added Music to my privacy list in the Spotlight system preferences and it's indexing fine now.
BTW - bug reported to Apple. For others with this problem, let Apple know about it: http://www.apple.com/feedback/macosx.html

Similar Messages

  • Memory Leak when running Contacts

    I am having a big memory leak when running the app Contacts on a MB Air. It gobbles up 2 GB of ram in just a few minutes forcing a reboot. I have re-installed Mountain Lion 10.8.2 and it still leaks memory. Watching Activity Monitor shows the rapid increase in Ram being gobbled up by Contacts. Used Mackeeper to clear cache as well as ran Cocktail, all to no avail. Any tips would be greatly appreciated.

    The size of oracle.exe is not an indication of how the Java VM GC works; so you are not comparing apples to apples. It'll be too long to explain here but in my upcoming book (see hereafter), I gave a detailled explanation of the various memory areas the Java VM uses and how these are GCed and also how you can meausre their size (not all, though).
    In short you want to use OracleRuntime methods such as
    OracleRuntime.getSessionSize(); --> get he current size of Sessionspace
    OracleRuntime.getNewspaceSize(); --> get he current size of Newspace
    there are other memory areas described in the book
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
    Sample chapter: http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
    Kuassi

  • App Memory Leak When Open iPhoto

    Hi everyone,
    Does anyone have experienced app memory leak when open iPhoto?  My free memory immediate dropped from 5000 mb to 15mb when I open iPhoto and the app never open.  If I force to quit iPhoto, all return to normal and everything work fine.  I only have iPhoto app running, not sure what caused the memory leak??? 
    Looking for help. 
    Thanks
    JHML

    Actually the new library was a test to see if the problem occurred only with your current library or with all libraries.  The fact that switching libraries cleared up the problem is just serendipitous. 

  • Memory leak when using Threads?

    I did an experiment and noticed a memory leak when I was using threads.. Here's what I did.
    ======================================
    while( true )
         Scanner sc = new Scanner(System.in);
         String answer;
         System.out.print("Press Enter to continue...");
         answer = sc.next();
         new TestThread();
    ========================================
    And TestThead is the following
    ========================================
    import java.io.*;
    import java.net.*;
    public class TestThread extends Thread
    public TestThread() { start(); }
    public void run() {  }
    =====================================
    When I open windows Task Manager, every time a new thread starts and stops, the java.exe increases the Mem Usage.. Its a memory leak!? What is going on in this situation.. If I start a thread and the it stops, and then I start a new thread, why does it use more memory?
    -Brian

    MoveScanner sc = new
    Scanner(System.in);out of the
    loop.Scanner sc = new Scanner(System.in);
    while (true) {
    That won't matter in any meaningful way.
    Every loop iteration creates a new Scanner, but it also makes a Scanner eligible for GC, so the net memory requirement of the program is constant.
    Now, of course, it's possible that the VM won't bother GCing until 64 MB worth of Scanners have been created, but we don't care about that. If we're allowing the GC 64 MB, then we don't care how it uses it or when it cleans it up.

  • Memory Leak when TOMCAT connects to Oracle 10g RAC using JDBC Thin driver.

    We had experienced Memory leak when a Oracle 10g (10.2.0.3) RAC node was evicted. TOMCAT app server is connecting to the Oracle 10g RAC database instances using JDBC 10.2.0.3 thin driver.
    Anyone had similar experience?
    Any ideas? Any bugs reported/fixed?
    Thanks,
    Raj

    If you're doing XA, we absolutely do not support
    driver-level load-balancing OR failover. Use neither.
    For non-XA, you can use driver-level failover. For
    non-XA, you could set load-balancing, but it won't
    help because we get connections from the driver,
    and keep them indefinitely, so the driver never gets
    the chance to affect which connections the pool
    uses after that.

  • I am experiencing a memory leak when I write to a file in a loop.

    I am conducting a cycling test, each cycle represents about 48k of memory. I collect a selectable number of cycles into a shift register. When the chosen number of cycles is reached, I write the data to text files and then clear out the shift register. Unfortunately, I do not free up any memory space when this happens. I have been able to isolate the memory leak to the file writing function. I thought I was closing the reference when I closed the file, but apparently that is not happening. What space I free up by clearing the buffer, is cancelled by the memory required to make a reference to the file (I am guessing). This is all happening in a loop that must run as many as 500,000 times. Ideally, I
    would like to write as many as 1500 records at a time. At this point the memory leak makes this almost impossible. I have ordered some more memory, but I would rather plug the leak. I have read that LabView leaves a reference open to the file even after the file is closed. What can I do to clear the memory used up by leaving the reference open? Any insights would be very appreciated.

    The behaviour you describe is strange. Something to try: Open a refernce to the file one time before entering the loop, then inside the loop use that reference to do all the writing. Finally close the reference when the loop completes.If this doesn't work, post your code in 6.0 format and I'll be glad to look at it.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

  • Memory leak when transferring files Lion

    hi all, help   I'm experiencing a memory leak since upgrading to Lion when transferring shared files between my macbook pro and imac. This occures through ethernet (wireless/wired) and firewire 800. No other apps are open except activity montior and finder. I am trying to transfer about 100g of itunes music / video files and pictures. Time machine backups to my TC do not have this affect.
    When transfer starts the free memory slowly decreases whilst the inactive memory increases. Eventually the free memory drops below 10mg, active memory is approx 5-6gb and wired/active is about 2gb. Bascially as the free memory decreases the inactive memory increases however does not get realocated so the mac grinds to a halt and dies with lots of page outs etc.
    this only happens when trying to transfer files. I have tried whole folders and just small individual ones and noticed the same event. I am struggling to find the cuase of the problem - any ideas?
    mac os x 10.7.1
    processor 2.53 GHz Intel Core i5
    Memory 8 GB 1067 MHz DDR3
    cheers, Kevin

    I dont think you have a memory leak. I think the problem is the xml file is 1000000 records long and takes up too much memory. Even if you find a way to increase memory size, you are loading down the server too much for other people's applications to run. I suggest instead reading up on xml and learning how to read in only a few records at a time, processing it, and getting the next set of records to process. There are two methods to parse an xml file using an xml parser, one is to parse it all and put it in memory, the other is to process one record at a time (an xml book explains it better).
    However, I question why you have reports that are 1000000 records long. end-users cannot effectively use such records (you cant scroll through 1000000 records). I suggest finding a way to greatly decrease the number of records in each file such as by providing just the records a particular user needs to do his job and not all records. For instance, put a textfield on his screen to let him only fetch records within a certain date range.
    Lastly, I suggest putting your code in a try/catch/finally block where the finally block actually closes the objects. Example:
    finally{
    if(conn!=null)
    conn.close();
    }

  • Memory leakage when using Ini-file VIs

    I'm using the Configuration File Vis to read and write data to different .ini files. The files contain both standard keys and clusters written as a segment using the Open G toolkit. Instead of opening the files and keeping them in the memory of the Config VIs I'm just using them to read and write, decode and encode...the references are all closed using the Close Config Data.vi. The problem is that even though immediately close the config data the application keeps grabbing more and more data...every time a configuration file is open, read or written to and the closed everything from 4K to 50K of additional memory has been allocated by the application (this is a stripped down application that only deals with the config files, so
    there are no other sources for the memory leak).
    Has anyone else experienced this? How can you repeatedly open and close config file slike this without it continoulsy allocating more memory?
    Attached is a copy of the VIs, the directory structure must be kept intact if the ini file is to be read correctly.
    I've been stearing so hard on this the whole day that I might just be overlooking something obvious...
    In the full application the VI init and write operations are only done when the user reconfigures the system, which may be a couple of times per month...so the memory leak would not cause a problem right away, but it would not be healthy to leave it there...
    MTO
    Attachments:
    Memory_Leak_Demo.zip ‏1391 KB

    Could you post a 6.1 version?
    LV7 is still about two weeks away for me.
    Does the problem show up in 6.1?
    I ran across an error while writting to a FP output that was not configured that would cause a "drop of memory" to leak every time the VI performed the write. The leak did not show up in the profiler but windows would show te memory foot print growing continually as long as the writes continued. The work around was "don't do that!".
    I bring this up because I found and reported this just prior to LV7 release and the featur may still be present in LV7. I also believe that Jean-Pierre used a "write and check" metod to detail with the unknown data types of of complex data structures.
    If you just read does it leak?
    If you just use simple data types do
    es it leak?
    Is the ini file growing?
    I really appreciate the effort you have been putting into the Dev-Exchange Mads! I wish i could do to more to help.
    Keep us posted.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Photoshop CS6 memory leak when idle and nothing open

    Photoshop CS6 runs away with memory after being used and then going idle. If I open up PS and leave it, it will be ok but as soon as I open any file it will go up in memory usage (which is normal) but when I close all files and hide PS the memory will stay high never goes back down. When I close PS and re-open (no files open) again it idles at 300Mb memory but when I open a file then close it and then hide/idle PS it raises and stays around 1.25-1.5 GB if not more.
    I have tried to Purge All, and even hide all menus to no avail. I have even tried to close Suitcase (eleminiate any font issues) and still same problem. I am running PS bone stock, no extra plug-ins. 
    Any ideas on why it would be doing this would be greatly appreciated!
    My Computer:
    Photoshop 13.0.1
    MacBookPro
    OS 10.6.8
    CPU: 2.66 GHz Intel Core 2 Duo
    Mem: 4 GB 1067 MHz DDR3
    HD: 300GB (30GB Free)

    Photoshop is not supposed to free memory when you close documents -- that's normal, because the memory gets reused.
    Yes, opening a file makes the memory usage go up - because space is needed for the document and it's window.
    None of what you said describes a leak, and sounds like perfectly normal behavior.

  • Huge memory leak when closing PDF from Hyperlink

    I was wondering if anyone else has experienced this issue with Adobe Reader 11.0.10 on Windows 7 64bit:
    1. I have a list of hyperlinks in an Access Table to certain PDF files on a local network folder.
    2. Clicking the hyperlink opens the corresponding PDF.
    The PDF file opens just fine, and renders normally. The issue is when I attempt to close the PDF. This results in an instant Memory leak that will grow to 4GB in under 10 seconds. System crashes completely. I can reproduce the crash in Safe Mode as well. I am able to open/close the PDF from its source location normally without incident. Clean Uninstall/Reinstall produces the same results.
    Downgrade to Adobe 10 fixes the problem completely. I can reproduce the problem on all computers on my network (all running windows 7 32bit or 64bit) by upgrading to Reader 11.0.10.
    I prefer to keep my software updated to prevent vulnerabilities, so any help would be appreciated.

    That is very strange because it is a 32-bit program and cannot (according to popular wisdom) grow over 2 GB. Also, if it were to reach 2 GB it would simply crash, not break the system.
    Do you have a screen shot showing the 4 GB? There might be clues there what is happening.

  • Memory leak when running in database

    I am somewhat new to java and very new to java in the db. I just ran into a problem with what appears to be a memory leak. I have a substantial java program used to parse XML files. I developed this app in jDeveloper and for testing purposes created a method that would connect to the database so that I could run the app from jDeveloper instead of having to deploy it everytime i needed to run it. When deployed the application uses the existing connection to connect to the db.
    I am running Oracle 9i on a windows 2k machine.
    When I run the application through jDeveloper the javaw.exe process takes up roughly 20mb of RAM and doesn't increase. I also watched the oracle.exe process and there was little to no increase in the RAM that it was using.
    When deployed to a db and run through a java stored procedure the RAM used by the oracle.exe process sky rockets, jumping from 70mb to 139mb at about 2mb per second.
    Hopefully this will make some sense to someone as posting code would be somewhat difficult considering the size of the project. Is there something I'm missing? I've tried calling the garbage collector explicity but it has had no effect. I have made sure that all my cursors, statements, resultsets are closing. I have a number of Vecotors which are all being de-allocated(as far as i can tell). Are there any known issues with the garbage collector in a 9i DB?
    Thanks
    Butch Wesley

    The size of oracle.exe is not an indication of how the Java VM GC works; so you are not comparing apples to apples. It'll be too long to explain here but in my upcoming book (see hereafter), I gave a detailled explanation of the various memory areas the Java VM uses and how these are GCed and also how you can meausre their size (not all, though).
    In short you want to use OracleRuntime methods such as
    OracleRuntime.getSessionSize(); --> get he current size of Sessionspace
    OracleRuntime.getNewspaceSize(); --> get he current size of Newspace
    there are other memory areas described in the book
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
    Sample chapter: http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
    Kuassi

  • TestStand 2010 Memory Leak when calling sequence in New Thread or New Execution

    Version:  TestStand 4.5.0.310
    OS:  Windows XP
    Steps to reproduce:
    1) Unzip 2 attached sequences into this folder:  C:\New Thread Memory Leak
    2) Open "New Thread Memory Leak - Client" SEQ file in TestStand 2010
    3) Open Task Manager, click Processes tab, sort A-Z (important), and highlight the "SeqEdit.exe" process.  Note the memory useage.
    4) Be ready to click Terminate All in TestStand after you see the memory start jumping.
    5) Run the "New Thread Memory Leak - Client" sequence.
    6) After seeing the memory consumption increase rapidly in Task Manager, press Terminate All in TestStand.
    7) Right click the "While Loop - No Wait (New Thread)" step and set Run Mode » Skip
    8) Right click the "While Loop - No Wait (New Execution)" step and set Run Mode » Normal
    9) Repeat steps 3 through 6
    I've removed all steps from the While Loop to isolate the problem.  I've also tried the other methods you'll see in the ZIP file but all cause the memory leak (with the exception of the Message Popup).
    I have not installed the f1 patch, but none of the bug fixes listed appear to address this issue.  NI Applications Engineering has been able to reproduce the issue (with Windows 7) and is working on it in parallel.  That said, are we missing something??
    Any ideas?
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs
    Solved!
    Go to Solution.
    Attachments:
    New Thread Memory Leak.zip ‏14 KB

    Good point Doug.  In this case parallel sequences are being launched at the beginning of the sequential process model, but I'll keep that in mind for later.  Take away:  be intentional about when to wait at the end of the sequence for threads to complete.
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs

  • Makequeues memory leak when using Lexmark Z53

    Behavior with printer switched off while connected to built-in USB port:
    Problem 1: makequeues has a memory leak, starting up with between 3 and 5 MB of RAM. This is done by connecting the printer when logged in and watching via Activity Monitor.
    Initially makequeues has sent 255 Mach messages. Every ~10.5 seconds, makequeues sends 59 more messages and gets 53 in reply. With each send/receive cycle, its RAM usage grows by 8 KB, a rate of 780 kiB/min.
    Problem 2: The process is started each time the same printer is reconnected.
    Symptoms: Disconnecting the printer doesn't let the process exit (any instance). If left alone, the memory usage cycle continues.
    The memory leak caught my attention after taking up over a half-gigabyte of RAM when I left the Mac running over night.
    Resolution:
    (1) Disconnect USB cable
    (2) Kill each instance of the process
    Results:
    (1) The process launches after reconnection of the printer with 996 KB of RAM, immediately having sent 60 Mach messages and received 56.
    (2) During this run time, the process may use less and less RAM, down to a minimum of 912.
    (3) After sending 64 more messages without replies, one every 4 seconds, the process exits after having sent a total of 120 messages.
    (4) This behavior (1 through 3) is the same for each process launched as a result of printer reconnection.
    This behavior isn't shown during Safe Mode boot - makequeues never starts up as a result of printer connection.
    PowerMac G4 QuickSilver 2001 733Mhz

    If this is meant to be a bug report, please file a bug report in the proper place. This is a user to user discussion forum.
    As to the source of running 'makequeues' (/System/Library/SystemConfiguration/PrinterNotifications.bundle/Contents/MacOS /makequeues), I would look at the Lexmark software. I currently have two Epson printers connected via USB with CUPS running. I see no process 'makequeues' appearing.
    Matt

  • Memory leak when transferring pdf...help needed

    Dear All,
    I'm a newbie in developing java app. I'm making a web based application in reporting using JSP. java 1.6.02, jasper report 204, i-report 2.0.0
    Client : OS : Win xp, memory 512MB
    Server : Tomcat 6.0
    DB Server : SQL Server 2005
    OS Server : Windows Server 2003, memory 1GB
    Report spec : .pdf based, with up to 1million record
    Here's the code :
    String query;
            try {
            String filereport = request.getRealPath("division/accounting/template/POReport.jrxml");
            InputStream input = new FileInputStream(filereport);
            Class.forName(odbcDriver);
            Connection conn = DriverManager.getConnection(odbcURL,username,passwd);
            ResultSet rset = null;
            CallableStatement cs = null;
            query = "{ call sp_tpo_list }";
              cs = conn.prepareCall(query);
              rset = cs.executeQuery();
            JRDataSource dataSource = new JRResultSetDataSource(rset);
            JasperDesign design = JRXmlLoader.load(input);
            JasperReport report = JasperCompileManager.compileReport(design);
            JasperPrint print = JasperFillManager.fillReport(report, null, dataSource);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            JasperExportManager.exportReportToPdfStream(print, baos);
            response.setContentType("application/pdf");
            response.setContentLength(baos.size());
            ServletOutputStream sos;
            sos = response.getOutputStream();
            baos.writeTo(sos);
            sos.flush();
            rset.close();
            cs.close();
            conn.close();
            sos.close();
            baos.close();
            input.close();      
            catch (FileNotFoundException fe) {}
            catch (JRException jre) {}
            catch (ClassNotFoundException cnfe) {}
            catch (SQLException sqle) {} 
            catch (IOException ioe) {}I've already increase heap memory in Tomcat Manager -Xms 64Mb -Xmx 512Mb.
    But when i test with 1million record, out of heap memory error is coming out.
    When i test with 500.000 record, it work out, but only when 1 client access. More than 1 client, out of heap memory error generated by the system.
    How can this happen? How can i detect memory leaks occured in the program?
    And pls let me know if you see something is missing in the code above.
    Thank you

    I dont think you have a memory leak. I think the problem is the xml file is 1000000 records long and takes up too much memory. Even if you find a way to increase memory size, you are loading down the server too much for other people's applications to run. I suggest instead reading up on xml and learning how to read in only a few records at a time, processing it, and getting the next set of records to process. There are two methods to parse an xml file using an xml parser, one is to parse it all and put it in memory, the other is to process one record at a time (an xml book explains it better).
    However, I question why you have reports that are 1000000 records long. end-users cannot effectively use such records (you cant scroll through 1000000 records). I suggest finding a way to greatly decrease the number of records in each file such as by providing just the records a particular user needs to do his job and not all records. For instance, put a textfield on his screen to let him only fetch records within a certain date range.
    Lastly, I suggest putting your code in a try/catch/finally block where the finally block actually closes the objects. Example:
    finally{
    if(conn!=null)
    conn.close();
    }

  • Memory leak when pushView an popView

    Hello to community!
    I am having problems of memory leaks with an app I had build. After using it for 30-40 min it begin to go slow and slow.
    The app show images as a catalog, but when I push and pop the views my memory rise a lot.
    I think I am deleting all my oibjects setting them to to null and disposing all de bitmapdata that I use so I think that the problem should not be there.
    I have 3 views in my app menuView.mxml,categoriesView.mxml and productsView.mxml.
    My App begin in my pc (not in tablet) with TotalMemory: 47Mb and Private Memory : 88 MB
    After pushing and poping the views for 5 times I get TotalMemory: 61Mb and Private Memory : 101 MB
    Imagine if I do this for 20 times, all the app begin to go very slow in my Ipad or my Samsung Galaxy Tab.
    Why is this happening? I have no idea how to solve this.
    Thanks a lot!!
    I put some code below.
    Whe I am in menuView i use the following code to push the view from menuView to categoriesView
    protected function button3_clickHandler(event:MouseEvent):void
                    if((FlexGlobals.topLevelApplication.getIdClienteServidorCompraActual()!=null)&&(FlexGloba ls.topLevelApplication.getIdClienteServidorCompraActual()>0))
                        navigator.pushView(categoriesView);
    Whe I am in categoriesView i use the following code to push the view from categoriesView to productsView. In this view i have 3 button for each category.
    protected function buttonC1_clickHandler(event:MouseEvent):void
                    //Categoria general con todos
                    var ab:ArrayCollection =  getIdAmbienteServidor();
                    cleanMemory();
                    navigator.pushView(productsView, null);
    private function cleanMemory():void
                    result.splice(0);
                    result = null;
                    System.gc();
    Whe I am in productsView I use the following code to pop(I USE PUSH INSTEAD OF POP DUE TO DIFFERENT OPTIONS I HAVE) the view from productsView to categoriesView .
    protected function button1_clickHandler(event:MouseEvent):void
                    cleanMemory();               
                    navigator.pushView(menuView);        
    private function cleanMemory():void
                    if(image1 != null)
                        image1.source = "";
                        if(image1.bitmapData != null)
                            image1.bitmapData.dispose();
                    if(image2 != null)
                        image2.source = "";
                        if(image2.bitmapData != null)
                            image2.bitmapData.dispose();
                    if(result != null)
                        result.splice(0);
                        result = null;
                    if(result1 != null)
                        result1.splice(0);
                        result1 = null;
                    if(result2 != null)
                        result2.splice(0);
                        result2 = null;
                    dbConnection = null;
                    object1 = null;
                    object2 = null;
                    dataToSave = null;
                    cGreyImageSmallAsset = null;
                    cRedImageSmallAsset.bitmapData.dispose();
                    cRedImageSmallAsset = null;
                    cOrangeImageAsset.bitmapData.dispose();
                    cOrangeImageAsset = null;
                    cGreenImageAsset.bitmapData.dispose();
                    cGreenImageAsset = null;
                    cPinkImageAsset.bitmapData.dispose();
                    cPinkImageAsset = null;
                    cBlueImageAsset.bitmapData.dispose();
                    cBlueImageAsset = null;
                    cGreyImageAsset.bitmapData.dispose();
                    cGreyImageAsset = null;
                    cRedImageAsset.bitmapData.dispose();
                    cRedImageAsset = null;
                    cGreenImageSmall = null;
                    cOrangeImageSmall = null;
                    cPinkImageSmall = null;
                    cBlueImageSmall = null;
                    cGreyImageSmall = null;
                    cRedImageSmall= null;
                    cGreenImage = null;
                    cPinkImage = null;
                    cBlueImage= null;
                    cGreyImage = null;
                    cRedImage= null;
                    cOrangeImage= null;
                    System.gc();
    I load the images with.
    private function setImages():void
                    //var width:Number = FlexGlobals.topLevelApplication.width;
                    if(object1!=null)
                        //var widthImage1:Number = (width/2)-80;
                        //image1.width = widthImage1;
                        panelLeft.visible = true;
                        buttonLeftMore.visible = true;
                        image1.source = "file://" + File.applicationStorageDirectory.nativePath + "/b"+object1.idArchivo+"_500.jpg";
                        setObject1MainTexts();
                    else
                        image1.source = "";
                        panelLeft.visible = false;
                        buttonLeftMore.visible = false;
                    if(object2!=null)
                        //var widthImage2:Number = (width/2)-80;
                        //image2.width = widthImage2;
                        panelRight.visible = true;
                        buttonRightMore.visible = true;
                        image2.source = "file://" + File.applicationStorageDirectory.nativePath + "/b"+object2.idArchivo+"_500.jpg";
                        setObject2MainTexts();
                    else
                        image2.source = "";
                        panelRight.visible = false;
                        buttonRightMore.visible = false;
    Whe I am in categoriesView i use the following code to pop(I USE PUSH INSTEAD OF POP DUE TO DIFFERENT OPTIONS I HAVE) the view from categoriesView to menuView.
    protected function button1_clickHandler(event:MouseEvent):void
                    cleanMemory();
                    navigator.pushView(menuView);
    private function cleanMemory():void
                    result.splice(0);
                    result = null;
                    System.gc();

    Hello,
    I've the similar problem. I try to clean all objects, listeners and images. But i still have a memory leak.
    Do you found a solution, Richard ?
    Regards.

Maybe you are looking for