#24 Memory Leak redux

V0.50
closed-fixed
F. Gerbig
java (4)
3
2012-05-09
2012-02-26
Anonymous
No

Hi, sorry for not getting back earlier, just noticed now that you closed the other bug report.
I just installed 0.50-4, and the memory leak situation is still there and very noticeable. Starting it with -Xmx512m caps memory usage at about 717MB.
At gamebase selection screen: 75MB
After opening GB64 v08, and before doing anything else: 298MB
Moving to the next game with arrow down adds about from 0-10MB each time, could not establish relationship with number of screenshots or other.
So memory usage keeps increasing while moving down with arrow key until heap size limit is reached.
Unfortunately at that point the frontend becomes completely unusable, with message like the following in the console:
Exception in thread \"Image Fetcher 0\" java.lang.OutOfMemoryError: Java heap space
At this point I can still select games in the list, but no screenshots or other images are loaded.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-02-26

     
    Attachments
  • F. Gerbig
    F. Gerbig
    2012-02-29

     
    Attachments
  • F. Gerbig
    F. Gerbig
    2012-02-29

     
    Attachments
  • F. Gerbig
    F. Gerbig
    2012-02-29

     
    Attachments
  • F. Gerbig
    F. Gerbig
    2012-02-29

    • assigned_to: nobody --> fgerbig
    • priority: 5 --> 3
    • status: open --> pending-works-for-me
     
  • F. Gerbig
    F. Gerbig
    2012-02-29

    Hi,

    I still can't reproduce the problem you are seeing. I *never* get an OutOfMemory exception, jGB *never* stops displaying screen shots. I stress tested for 30 min with GBC_v08 with *all* views loaded (all games, all music, etc.). I displayed items, sorted the list, scrolled with keeping the cursor key pressed etc. I had jconsole and plumbr running and created a heap-dump which I analyzed with the eclipse memory analyzer. The results are the same as last time: as expected jGB uses much mem, but I see the typical saw tooth pattern of a java app. That the residuum rises is due to the fact that I loaded view after view awaiting the OutOfMemory exception. The analysis showed leak *suspects* in derby and hibernate, but not in jGB. Perhaps the problem is in a deeper layer, the jvm or an os library used by java. If the problem were in jGB I should be able to reproduce the problem regardless of os or jvm.

    Kind regards,
    Frank.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-02-29

    • status: pending-works-for-me --> open-works-for-me
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-02-29

    Is there anything I can do to provide some further detail? Unfortunately I am not very familiar with java. Here is my version of java:

    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
    Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

    I am on OS X Lion (10.7.3)

     
  • F. Gerbig
    F. Gerbig
    2012-03-01

    Hi,

    even if you provided further detail: if the problem is in the jvm or os there is nothing I can do ;-(
    I don't have experience with OS X; from what I read on the Internet it seems it would be next to impossible to install a more up to date jvm. What makes me wonder is that other people using OS X didn't report that bug - perhaps it is a problem only occurring on your special configuration. If you know other people using OS X it would be interesting to hear if they can reproduce the problem.

    Kind regards,
    Frank.

     
  • F. Gerbig
    F. Gerbig
    2012-03-01

    • status: open-works-for-me --> pending-works-for-me
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-03-05

    Could this:
    http://stackoverflow.com/questions/9484749/high-memory-consumption-with-bufferedimage-object
    be somehow related to the issue I am experiencing?

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-03-05

    • status: pending-works-for-me --> open-works-for-me
     
  • F. Gerbig
    F. Gerbig
    2012-03-07

    Hi,

    this could be the problem - I didn't call flush(). I just uploaded 50.5 which explicitly calls flush() on the screen shots. Please test :-)

    Kind regards,
    Frank.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-03-11

    Unfortunately no good news, memory usage still grows linearly with number of screenshots and artwork shown, and applications becomes too sluggish to be usable once heap memory limit is reached.

     
  • F. Gerbig
    F. Gerbig
    2012-03-13

    Hi,

    please try V0.50-6. I removed the "finalize()" methods as these were using memory for the finalizer queue. I added some more image.flush() and some explicit <object>=null. jGB does now run with a heap of 256MB.

    Kind regards,
    Frank.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-03-14

    It feels like things are a bit better with 0.50-6, but still, memory consumption only goes up, albeit slower than before. Once heap limit is reached app slows to a crawl an I start getting the heap errors:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-03-15

    There is some improvement: now, when the memory reaches the heap limit, growth stops and it won't give me any more heap space errors. But at that point the application is noticeably slower than at startup.
    Memory usage growth is *much* slower if I hide the sidebar. Apparently loading screenshot, title and all extra images causes it to skyrocket. Maybe an option to limit the number of of extras shown would help to keeps a bit under control?

    Thanks!
    Christian

     
  • F. Gerbig
    F. Gerbig
    2012-04-01

    Hi,

    jGB V0.63 has an option to limit the number of displayed extra images: in the databases "Settings.cfg" file change the line "max_extra_images_shown=9999" to the value you want.

    Kind regards,
    Frank.

     
  • F. Gerbig
    F. Gerbig
    2012-04-01

    • status: open-works-for-me --> pending-works-for-me
     
  • F. Gerbig
    F. Gerbig
    2012-05-09

    • status: pending-works-for-me --> closed-works-for-me
     
  • F. Gerbig
    F. Gerbig
    2012-05-09

    • status: closed-works-for-me --> closed-fixed
     


Anonymous


Cancel   Add attachments