OutOfMemoryError with big scenario file
Summary
When trying out a big scenario (407m x 431m) with only one pedestrian an exception is thrown.
What is the current bug behavior?
When running the scenario almost instantly the calculation stops and an alert window opens. Text: There was an unexpected exception in the scenario run of test_for_converter: java.lang.OutOfMemoryError: Java heap space
Steps to reproduce
- Open the scenario under relevant data with vadere.
- Run the scenario
Relevant data
Logs and outputs
13:19:37,281 INFO ProjectView:533 - repainted output table
13:19:37,696 INFO ScenarioRun:94 - Initializing scenario. Start of scenario 'test_for_converter'...
13:19:37,712 INFO ScenarioRun:96 - StartIt test_for_converter
13:19:37,728 WARN HashGenerator:25 - No commit hash found. The project will not contain a hash of the software source code.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.vadere.gui.components.model.DefaultModel.pixelToWorld(DefaultModel.java:453)
at org.vadere.gui.components.model.DefaultModel.setMousePosition(DefaultModel.java:220)
at org.vadere.gui.components.control.DefaultModeAdapter.mouseMoved(DefaultModeAdapter.java:67)
at java.awt.AWTEventMulticaster.mouseMoved(Unknown Source)
at java.awt.Component.processMouseMotionEvent(Unknown Source)
at javax.swing.JComponent.processMouseMotionEvent(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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)13:19:45,574 INFO Simulation:252 - Finished writing all output files
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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)
13:19:45,606 INFO ProjectView:157 - scenario test_for_converter finished
13:19:45,606 INFO VadereProject:285 - SimulationResult{scenarioName='"test_for_converter", nr_overlaps=0, state='"null"}
13:19:45,621 INFO ScenarioRun:143 - Simulation of scenario test_for_converter finished.
java.lang.OutOfMemoryError: Java heap space
at org.vadere.util.data.cellgrid.CellState.clone(CellState.java:19)
at org.vadere.util.data.cellgrid.CellGrid.reset(CellGrid.java:242)13:19:45,621 INFO ProjectView:528 - selected scenario 'test_for_converter'
at org.vadere.util.data.cellgrid.CellGrid.<init>(CellGrid.java:63)
at org.vadere.simulator.models.potential.fields.PotentialFieldDistancesBruteForce.<init>(PotentialFieldDistancesBruteForce.java:40)
at org.vadere.simulator.control.OfflineTopographyController.prepareTopography(OfflineTopographyController.java:46)
at org.vadere.simulator.control.TopographyController.preLoop(TopographyController.java:27)
at org.vadere.simulator.control.Simulation.preLoop(Simulation.java:146)
at org.vadere.simulator.control.Simulation.run(Simulation.java:191)
at org.vadere.simulator.projects.ScenarioRun.run(ScenarioRun.java:120)
at java.lang.Thread.run(Unknown Source)
13:19:45,637 ERROR ScenarioRun:135 - java.lang.OutOfMemoryError: Java heap space
13:19:46,170 INFO ProjectView:533 - repainted output table
13:20:50,391 INFO ProjectView:528 - selected scenario 'New_scenario'
13:22:54,266 INFO ProjectView:533 - repainted output table
13:22:54,281 INFO ProjectView:528 - selected scenario 'test_for_converter'
13:22:55,036 INFO ProjectView:533 - repainted output table```