simlu/voxelshop

Crashes during rotating or manipulating bit models

Opened this issue · 2 comments

The crash says:

java.lang.OutOfMemoryError: Java heap space
	at gnu.trove.map.hash.TIntObjectHashMap.rehash(TIntObjectHashMap.java:158)
	at gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)
	at gnu.trove.map.hash.TIntObjectHashMap.doPut(TIntObjectHashMap.java:248)
	at gnu.trove.map.hash.TIntObjectHashMap.put(TIntObjectHashMap.java:222)
	at gnu.trove.map.hash.TIntObjectHashMap$1.execute(TIntObjectHashMap.java:62)
	at gnu.trove.map.hash.TIntObjectHashMap.forEachEntry(TIntObjectHashMap.java:417)
	at gnu.trove.map.hash.TIntObjectHashMap.putAll(TIntObjectHashMap.java:287)
	at com.vitco.app.core.data.VoxelData.invalidateV(VoxelData.java:113)
	at com.vitco.app.core.data.VoxelData$1.onChange(VoxelData.java:46)
	at com.vitco.app.core.data.VoxelData$1.onChange(VoxelData.java:36)
	at com.vitco.app.core.data.history.HistoryManager.notifyListener(HistoryManager.java:136)
	at com.vitco.app.core.data.history.HistoryManager.applyIntent(HistoryManager.java:73)
	at com.vitco.app.core.data.VoxelData.rotateVoxelCenter(VoxelData.java:1732)
	at com.vitco.app.layout.content.menu.SelectBarLogic$24.action(SelectBarLogic.java:503)
	at com.vitco.app.manager.action.types.StateActionPrototype.actionPerformed(StateActionPrototype.java:30)
	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 com.jidesoft.plaf.basic.BasicJideButtonListener.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)

What can i do to solve it?

simlu commented

@tSkyte I'm guessing that the models you are working with are large. So the easiest way would be to decrease the amount of voxels. Unfortunately this tool is not optimized to work with huge amounts of voxels.

You could also try saving, closing and reopening more frequently to remove the history (and free memory).

Let me know if that helps!

Thanks for your answer, but i resolved it creating a batch file to run it with the parameter -Xmx4096m in order to increase the amount of memory.

Thanks anyways o/