Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Big txt file - Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

82 views
Skip to first unread message

Norberto Barroca

unread,
Dec 26, 2009, 1:14:07 PM12/26/09
to
When I tried to open a big text file in matlab 7.9.0(R2009b) I have this error.
How can I solve this problem

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at sun.font.GlyphList.ensureCapacity(Unknown Source)
at sun.font.GlyphList.setFromChars(Unknown Source)
at sun.java2d.pipe.GlyphListPipe.drawChars(Unknown Source)
at sun.java2d.SunGraphics2D.drawChars(Unknown Source)
at org.netbeans.editor.DrawGraphics$GraphicsDG.flush(DrawGraphics.java:633)
at org.netbeans.editor.DrawGraphics$GraphicsDG.flush(DrawGraphics.java:522)
at org.netbeans.editor.DrawGraphics$GraphicsDG.setBuffer(DrawGraphics.java:756)
at org.netbeans.editor.DrawEngine.draw(DrawEngine.java:1116)
at org.netbeans.editor.DrawEngineLineView.paint(DrawEngineLineView.java:233)
at org.netbeans.lib.editor.view.GapBoxViewChildren.paintChildren(GapBoxViewChildren.java:783)
at org.netbeans.lib.editor.view.GapBoxView.paint(GapBoxView.java:1463)
at org.netbeans.lib.editor.view.GapDocumentView.paint(GapDocumentView.java:231)
at org.netbeans.editor.DrawEngineDocView.paint(DrawEngineDocView.java:314)
at org.netbeans.editor.view.spi.LockView.paint(LockView.java:363)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at sun.font.GlyphList.ensureCapacity(Unknown Source)
at sun.font.GlyphList.setFromChars(Unknown Source)
at sun.java2d.pipe.GlyphListPipe.drawChars(Unknown Source)
at sun.java2d.SunGraphics2D.drawChars(Unknown Source)
at org.netbeans.editor.DrawGraphics$GraphicsDG.flush(DrawGraphics.java:633)
at org.netbeans.editor.DrawGraphics$GraphicsDG.flush(DrawGraphics.java:522)
at org.netbeans.editor.DrawGraphics$GraphicsDG.setBuffer(DrawGraphics.java:756)
at org.netbeans.editor.DrawEngine.draw(DrawEngine.java:1116)
at org.netbeans.editor.DrawEngineLineView.paint(DrawEngineLineView.java:233)
at org.netbeans.lib.editor.view.GapBoxViewChildren.paintChildren(GapBoxViewChildren.java:783)
at org.netbeans.lib.editor.view.GapBoxView.paint(GapBoxView.java:1463)
at org.netbeans.lib.editor.view.GapDocumentView.paint(GapDocumentView.java:231)
at org.netbeans.editor.DrawEngineDocView.paint(DrawEngineDocView.java:314)
at org.netbeans.editor.view.spi.LockView.paint(LockView.java:363)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

Rune Allnor

unread,
Dec 26, 2009, 1:23:19 PM12/26/09
to
On 26 Des, 19:14, "Norberto Barroca" <norberto.barr...@hotmail.com>
wrote:

> When I tried to open a big text file in matlab 7.9.0(R2009b) I have this error.
> How can I solve this problem
>
> Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

You have two options:

1) Buy a bigger computer
2) Read and process only a part of the file at the time.

Rune

Norberto Barroca

unread,
Dec 26, 2009, 1:47:02 PM12/26/09
to
I have Intel Core(TM) 2 Duo T7500 2.2GHz

My memory is 3GB DDR2

It's no enough?


"Norberto Barroca" <norberto...@hotmail.com> wrote in message <hh5jpf$ks9$1...@fred.mathworks.com>...

Yair Altman

unread,
Dec 26, 2009, 6:26:03 PM12/26/09
to
"Norberto Barroca" <norberto...@hotmail.com> wrote in message <hh5ln6$m70$1...@fred.mathworks.com>...

> I have Intel Core(TM) 2 Duo T7500 2.2GHz
>
> My memory is 3GB DDR2
>
> It's no enough?
>
>
> "Norberto Barroca" <norberto...@hotmail.com> wrote in message <hh5jpf$ks9$1...@fred.mathworks.com>...
> > When I tried to open a big text file in matlab 7.9.0(R2009b) I have this error.
> > How can I solve this problem
> >
> > Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
> > at sun.font.GlyphList.ensureCapacity(Unknown Source)
[snip]

It's more than enough - the problem is that Matlab only uses a small portion of this memory by default. You can increase this: http://www.mathworks.com/support/solutions/en/data/1-18I2C/

Yair Altman
http://UndocumentedMatlab.com

0 new messages