-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The warp Endeavour ability uses the same code as the in-game star ports to transport the player between planets. This crash only seems to occur when the ability takes the player to the same location where a star port already exists. It was previously rare but seems to be consistently reproduceable with the new system builder code.
The reason for this crash appears to be that the game attempts to save when the player reaches a star port. This fails beacuse the warp module does not have permission to access the save files. Maybe an AccessController.doPrivileged call in the relevant engine code would help?
ERROR [main] (SolApplication.java:231) - Fatal Error:
java.security.AccessControlException: access denied ("java.io.FilePermission" "engine\src\main\resources\world.json" "write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at org.terasology.gestalt.module.sandbox.ModuleSecurityManager.checkPermission(ModuleSecurityManager.java:48)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
at java.io.FileOutputStream.<init>(FileOutputStream.java:200)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.PrintWriter.<init>(PrintWriter.java:192)
at java.io.PrintWriter.<init>(PrintWriter.java:232)
at org.destinationsol.game.SaveManager.saveWorld(SaveManager.java:249)
at org.destinationsol.game.StarPort$Transcendent.update(StarPort.java:405)
at org.destinationsol.warp.abilities.PlanetTunnelAbility.update(PlanetTunnelAbility.java:51)
at org.destinationsol.game.ship.SolShip.updateAbility(SolShip.java:300)
at org.destinationsol.game.ship.SolShip.update(SolShip.java:240)
at org.destinationsol.game.ObjectManager.update(ObjectManager.java:98)
at org.destinationsol.game.SolGame.lambda$null$2(SolGame.java:404)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.destinationsol.game.SolGame.lambda$update$3(SolGame.java:403)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.destinationsol.game.SolGame.update(SolGame.java:402)
at org.destinationsol.SolApplication.update(SolApplication.java:255)
at org.destinationsol.SolApplication.safeUpdate(SolApplication.java:229)
at org.destinationsol.SolApplication.render(SolApplication.java:193)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:392)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:137)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:111)
at org.destinationsol.desktop.SolDesktop.main(SolDesktop.java:149)
Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "engine\src\main\resources\world.json" "write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at org.terasology.gestalt.module.sandbox.ModuleSecurityManager.checkPermission(ModuleSecurityManager.java:48)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
at java.io.FileOutputStream.<init>(FileOutputStream.java:200)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.PrintWriter.<init>(PrintWriter.java:192)
at java.io.PrintWriter.<init>(PrintWriter.java:232)
at org.destinationsol.game.SaveManager.saveWorld(SaveManager.java:249)
at org.destinationsol.game.StarPort$Transcendent.update(StarPort.java:405)
at org.destinationsol.warp.abilities.PlanetTunnelAbility.update(PlanetTunnelAbility.java:51)
at org.destinationsol.game.ship.SolShip.updateAbility(SolShip.java:300)
at org.destinationsol.game.ship.SolShip.update(SolShip.java:240)
at org.destinationsol.game.ObjectManager.update(ObjectManager.java:98)
at org.destinationsol.game.SolGame.lambda$null$2(SolGame.java:404)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.destinationsol.game.SolGame.lambda$update$3(SolGame.java:403)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.destinationsol.game.SolGame.update(SolGame.java:402)
at org.destinationsol.SolApplication.update(SolApplication.java:255)
at org.destinationsol.SolApplication.safeUpdate(SolApplication.java:229)
at org.destinationsol.SolApplication.render(SolApplication.java:193)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:392)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:137)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:111)
at org.destinationsol.desktop.SolDesktop.main(SolDesktop.java:149)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working