[messages] [Technical Support & Bugs] Error when trying to export empty map as png.

Thomas Russ tar at isi.edu
Wed Oct 20 11:51:08 MST 2010


On Oct 20, 2010, at 11:09 AM, lozgreen wrote:

> I have created a hex map that has cells 132 wide by 153 high.
> Board width is set to 33660 wide by 68085 (255*445 cells)
>
> When trying to export a blank png file with just the hex grid - I get
> the following error.
> How do I get around it? I have just installed the latest Java Run time

Well, the workaround would be to make the image smaller.

It looks like the total image size in hxw pixels has to fit into a 32- 
bit integer.
That limits you to 2147483647
What you have is 33660 * 68085 = 2291741100

Try making the cells a bit smaller, say 124x143 instead.


> Cheers
> Loz
>
> Model: none
> OS: XP Sp 3 CPU: Intel Core 2 Duo 2.40GHz Memory: 4GB Video: GeForce  
> A295Gtx VASSAL: 3.1.14 Java: 1.6.0_22
> Module: New
>
> 20 Oct 2010 17:52:28.781 0 -- Starting
> 20 Oct 2010 17:52:28.781 0 -- OS Windows XP
> 20 Oct 2010 17:52:28.781 0 -- Java version 1.6.0_22
> 20 Oct 2010 17:52:28.781 0 -- VASSAL version 3.1.14
> 20 Oct 2010 17:52:28.859 0 -- Manager
> 20 Oct 2010 17:52:37.812 0 -- Loading module file E:\Documents and
> Settings\Loz\War in the Dessert
> 20 Oct 2010 17:52:37.812 0 -- Loading module Test
> 20 Oct 2010 17:52:38.046 0 E:\Program Files\Java\jre6\bin\java - 
> Xms256M
> -Xmx1028M -DVASSAL.id=1 -Duser.home=E:\Documents and Settings\Loz -cp
> lib\Vengine.jar VASSAL.launch.Player
> 20 Oct 2010 17:52:41.734 1 -- Test version 0.0
> 20 Oct 2010 17:52:41.734 1
> 20 Oct 2010 17:52:52.218 1 java.util.concurrent.ExecutionException:
> java.lang.NegativeArraySizeException
> 	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
> 	at java.util.concurrent.FutureTask.get(Unknown Source)
> 	at org.jdesktop.swingworker.SwingWorker.get(Unknown Source)
> 	at
> VASSAL.build.module.map.ImageSaver$SnapshotTask.done(ImageSaver.java: 
> 413)
> 	at org.jdesktop.swingworker.SwingWorker$5.run(Unknown Source)
> 	at
> org.jdesktop.swingworker.SwingWorker 
> $DoSubmitAccumulativeRunnable.run(Unknown
> Source)
> 	at org.jdesktop.swingworker.AccumulativeRunnable.run(Unknown Source)
> 	at
> org.jdesktop.swingworker.SwingWorker 
> $DoSubmitAccumulativeRunnable.actionPerformed(Unknown
> Source)
> 	at javax.swing.Timer.fireActionPerformed(Unknown Source)
> 	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
> 	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown  
> Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.Dialog$1.run(Unknown Source)
> 	at java.awt.Dialog$3.run(Unknown Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.awt.Dialog.show(Unknown Source)
> 	at java.awt.Component.show(Unknown Source)
> 	at java.awt.Component.setVisible(Unknown Source)
> 	at java.awt.Window.setVisible(Unknown Source)
> 	at java.awt.Dialog.setVisible(Unknown Source)
> 	at
> VASSAL.build.module.map.ImageSaver.writeMapAsImage(ImageSaver.java: 
> 220)
> 	at
> VASSAL.build.module.map.ImageSaver$1.actionPerformed(ImageSaver.java: 
> 85)
> 	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> 	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> 	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> 	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> 	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> Source)
> 	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
> 	at java.awt.Component.processMouseEvent(Unknown Source)
> 	at javax.swing.JComponent.processMouseEvent(Unknown Source)
> 	at java.awt.Component.processEvent(Unknown Source)
> 	at java.awt.Container.processEvent(Unknown Source)
> 	at java.awt.Component.dispatchEventImpl(Unknown Source)
> 	at java.awt.Container.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> 	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> 	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> 	at java.awt.Container.dispatchEventImpl(Unknown Source)
> 	at java.awt.Window.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown  
> Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(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)
> Caused by: java.lang.NegativeArraySizeException
> 	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 java.awt.image.BufferedImage.<init>(Unknown Source)
> 	at
> VASSAL.build.module.map.ImageSaver 
> $SnapshotTask.doInBackground(ImageSaver.java:362)
> 	at
> VASSAL.build.module.map.ImageSaver 
> $SnapshotTask.doInBackground(ImageSaver.java:260)
> 	at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> 	at java.util.concurrent.FutureTask.run(Unknown Source)
> 	at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
>
> _______________________________________________
> Read this topic online here:
> http://www.vassalengine.org/forum/viewtopic.php?p=20338#p20338
> _______________________________________________
> messages mailing list
> messages at vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages



More information about the messages mailing list