#7 out of heap space on OSX

F. Gerbig
java (4)

Hi, I am using jgamebase on OS X (snow leopard).

First of all, database importing does not work, but I will file a detailed report on that later. So I did the import on linux then moved the database files to OS X. jgamebase is able to browse the db correctly, including screenshots etc. Problems arise when I try to verify available files. After a short file everything hangs, and the console shows a lot of errors relating to heap space. For example:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at sun.java2d.SunGraphics2D.clone(SunGraphics2D.java:433)
at sun.java2d.SunGraphics2D.create(SunGraphics2D.java:467)
at javax.swing.JComponent.paintComponent(JComponent.java:761)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:829)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1045)
at java.awt.Dialog$3.run(Dialog.java:1097)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1095)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:841)
at java.awt.Dialog.setVisible(Dialog.java:985)
at jgamebase.gui.VerifyAvailableFilesDialog.<init>(VerifyAvailableFilesDialog.java:74)
at jgamebase.gui.GuiObjects.verifyAvailableFilesActionPerformed(GuiObjects.java:2993)
at jgamebase.gui.GuiObjects.access$89(GuiObjects.java:2992)
at jgamebase.gui.GuiObjects$122.actionPerformed(GuiObjects.java:2683)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)

Also, "java -version" yields:
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)

but jgamebase complains that I am not running java >=1.6



  • F. Gerbig
    F. Gerbig

    Hi Christian,

    From the error message it seems that the VM runs out of heap space.

    Please try to allow the VM to use more memory as heap (in linux you would add the command line option “-Xmx512m” to specify e.g. 512MB as max heap. I don’t have access to OS X, so I’m not sure if the option is the same).

    Kind regards,

  • F. Gerbig
    F. Gerbig

    • priority: 5 --> 3
    • assigned_to: nobody --> fgerbig
    • labels: --> java
    • status: open --> pending-accepted
  • That did it, thanks. I just used -Xmx512m, but I have no idea what the default value on OSX is, or if some other value is more appropriate.

    • status: pending-accepted --> open-accepted
  • F. Gerbig
    F. Gerbig

    • status: open-accepted --> closed-accepted
  • F. Gerbig
    F. Gerbig

    • status: closed-accepted --> closed-fixed


Cancel   Add attachments