Mtalab 运行问题:java.lang.OutOfMemoryError:Java heap space
程序员文章站
2022-06-13 21:34:41
...
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.SunVolatileImage.getBackupImage(Unknown Source)
at sun.awt.image.VolatileSurfaceManager.getBackupSurface(Unknown Source)
at sun.awt.image.VolatileSurfaceManager.initialize(Unknown Source)
at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
at sun.awt.windows.WComponentPeer.createVolatileImage(Unknown Source)
at java.awt.Component.createVolatileImage(Unknown Source)
at java.awt.Component$BltBufferStrategy.createBackBuffers(Unknown Source)
at java.awt.Component$BltBufferStrategy.<init>(Unknown Source)
at java.awt.Component$BltSubRegionBufferStrategy.<init>(Unknown Source)
at java.awt.Component.createBufferStrategy(Unknown Source)
at java.awt.Window.createBufferStrategy(Unknown Source)
at javax.swing.BufferStrategyPaintManager$BufferInfo.createBufferStrategy(Unknown Source)
at javax.swing.BufferStrategyPaintManager$BufferInfo.createBufferStrategy(Unknown Source)
at javax.swing.BufferStrategyPaintManager$BufferInfo.getBufferStrategy(Unknown Source)
at javax.swing.BufferStrategyPaintManager.prepare(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
??? Error using ==> print at 310
Error using ==> get
Invalid handle object.
Error in ==> saveas at 159
print( h, name, ['-d' dev{i}] )
matlab运行时出现的问题,解决方法:
1:Java heap space不足,增加分配的Java heap space, 在Preferences->General->Java Heap Memory。或者在采集过程中及时关闭打开的图像。
2:在C:\Users\$username$\AppData\Roaming\MathWorks\MATLAB\R2013a目录下,找到matlab.prf文件。。。编辑模式下在最后一行添加
JavaMemHeapMax=I190000
推荐阅读
-
ES内存溢出,报错:java.lang.OutOfMemoryError: Java heap space
-
java.lang.OutOfMemoryError: Java heap space 解决方法
-
java.lang.OutOfMemoryError: Java heap space解决方案
-
java.lang.OutOfMemoryError: Java heap space解决方法:即就该内存大小
-
java.lang.OutOfMemoryError: Java heap space 报错实例
-
java.lang.OutOfMemoryError: Java heap space
-
模拟实战排查堆内存溢出(java.lang.OutOfMemoryError: Java heap space)问题
-
Java heap space 问题查找
-
读写文件时内存溢出问题思考(OutOfMemoryError: Java heap space)
-
Java heap space 问题查找