Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (813)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  OutOfMemory?  (Read 1379 times)
0 Members and 1 Guest are viewing this topic.
Offline mantesat

Junior Devvie




Java games rock!


« Posted 2006-04-19 12:39:59 »

Hi all

I'm profiling my application to check out memory usage, and memory consumption seems to stay well below the max heap size (80% of  the max heap size). However, occasionaly, I get this:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: java.lang.OutOfMemoryError: Java heap space
        at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:268)
        at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:245)
        at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
        at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
        at gr.talent.viewer3d.Viewer3D$4.paint(Viewer3D.java:197)
        at javax.media.opengl.GLCanvas.update(GLCanvas.java:202)
        at sun.awt.RepaintArea.updateComponent(Unknown Source)
        at sun.awt.RepaintArea.paint(Unknown Source)
        at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

When this happens, the whole application freezes. The strange thing about it is that even if I clear the memory  used (using the profiler), the application still stays frozen.

Has anyone came up to this problem? I use a nightly build of JSR231-beta03, built in early March.

N
Offline bjgil2

Senior Newbie




That's it Mr. Giraffe, get all the marmalade


« Reply #1 - Posted 2006-04-19 13:06:47 »

Please post the code for your paint() method (gr.talent.viewer3d.Viewer3D$4.paint) and you'll get more help.  Without seeing the code, we can't tell what could be causing the problem.

Cheers,
Brett
Offline mantesat

Junior Devvie




Java games rock!


« Reply #2 - Posted 2006-04-19 13:17:08 »

There is nothing much there, just a simple call to repaint the GLCanvas I'm using
1  
2  
3  
   public void paint(Graphics g) {
      canvas.repaint();
   }


N
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
cybrmynd (138 views)
2017-08-02 12:28:51

cybrmynd (159 views)
2017-08-02 12:19:43

cybrmynd (153 views)
2017-08-02 12:18:09

Sralse (169 views)
2017-07-25 17:13:48

Archive (646 views)
2017-04-27 17:45:51

buddyBro (766 views)
2017-04-05 03:38:00

CopyableCougar4 (1300 views)
2017-03-24 15:39:42

theagentd (1264 views)
2017-03-24 15:32:08

Rule (1237 views)
2017-03-19 12:43:22

Rule (1312 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!