Salut à tous,

Je développe actuellement une application capable de manipuler des cartes géographiques. Actuellement, je suis sur un plus petit module qui permet d'adapter n'importe quelle carte scannée sur une carte existante (genre un cadastre).

A chaque fois que je démarre mon application, j'ai droit à un "outofmemoryerror" alors que j'ai dimensionnée ma mémoire (avec xms et xmx) de manière largement suffisante. Voici le log pour mieux comprendre :
cd Maps/Mapsimage && java -Xms64M -Xmx128M -jar Cusimage.jar
init = 67108864(65536K) used = 2829704(2763K) committed = 66650112(65088K) max = 133234688(130112K)
init = 67108864(65536K) used = 2875144(2807K) committed = 66650112(65088K) max = 133234688(130112K)
init = 67108864(65536K) used = 8496784(8297K) committed = 66650112(65088K) max = 133234688(130112K)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
at java.awt.image.Raster.createPackedRaster(Raster.java:458)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
at java.awt.image.BufferedImage.<init>(BufferedImage.java:323)
at Img_addMap.Draw(Img_addMap.java:42)
at MapsPanel.paintComponent(MapsPanel.java:66)
at javax.swing.JComponent.paint(JComponent.java:1006)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4979)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4925)
at javax.swing.JComponent.paint(JComponent.java:996)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1709)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:645)
at java.awt.Component.dispatchEventImpl(Component.java:4060)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
init = 67108864(65536K) used = 7802168(7619K) committed = 133234688(130112K) max = 133234688(130112K)
init = 67108864(65536K) used = 11459048(11190K) committed = 133234688(130112K) max = 133234688(130112K)
L'affichage de la mémoire est demandé à chaque fois que la carte est redessinnée.

Comment je peux avoir un problème de mémoire insuffisante alors que ma mémoire est initialisée et maximisable à des valeurs bien au-delà de ce qui est nécessaire ?

Merci d'avance