Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Java heap space Exception when using CreateImage() (Read 2539 times)
Ashutosh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Nov 24th, 2008
Java heap space Exception when using CreateImage()
Apr 9th, 2009 at 4:49am
Print Post  
Hi,
when i am creating flowchart for big input code, it draws the flowchart correctly. The problem is when I am creating Image of this flowchart using method diag.CreateImage() it is giving me this exception..
well it works fyn when the flowchart is small..



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:321)
       at com.mindfusion.diagramming.Diagram.a(Unknown Source)
       at com.mindfusion.diagramming.Diagram.createImage(Unknown Source)
       at RecentGUI.saveFile(RecentGUI.java:4666)
       at RecentGUI.btnActionPerformed(RecentGUI.java:3446)
       at RecentGUI.access$2200(RecentGUI.java:113)
       at RecentGUI$20.actionPerformed(RecentGUI.java:1273)
       at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
       at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
       at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
       at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
       at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.jav
a:236)
       at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
       at java.awt.Component.processMouseEvent(Component.java:6041)
       at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
       at java.awt.Component.processEvent(Component.java:5806)
       at java.awt.Container.processEvent(Container.java:2058)
       at java.awt.Component.dispatchEventImpl(Component.java:4413)
       at java.awt.Container.dispatchEventImpl(Container.java:2116)
       at java.awt.Component.dispatchEvent(Component.java:4243)
       at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
       at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
       at java.awt.Container.dispatchEventImpl(Container.java:2102)
       at java.awt.Window.dispatchEventImpl(Window.java:2440)
       at java.awt.Component.dispatchEvent(Component.java:4243)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
       at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273
)
       at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
Total Lines are 0
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Java heap space Exception when using CreateIma
Reply #1 - Apr 9th, 2009 at 9:19am
Print Post  
Hi,

You might either split the flowchart into several smaller images, or increase the JRE heap memory using the -Xmx option:
http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint