Save game causes Aurora not to start

Create issue
Issue #312 new
wottis created an issue

Greetings,

after saving the current game manually and exiting the game, it won't restart anymore and the following exception is thrown:

Sun Aug 30 21:49:54 CST 2015 ERROR:Bad file descriptor
java.io.IOException: Bad file descriptor
    at java.io.FileInputStream.available(Native Method)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:53)
    at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:292)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:187)
    at org.newdawn.slick.Image.<init>(Image.java:192)
    at org.newdawn.slick.Image.<init>(Image.java:166)
    at ru.game.aurora.application.ResourceManager.loadImage(ResourceManager.java:294)
    at ru.game.aurora.application.ResourceManager.addElementAsImage(ResourceManager.java:284)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:125)
    at ru.game.aurora.application.ResourceManager.addNewResourceFile(ResourceManager.java:158)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:100)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:73)
    at ru.game.aurora.application.AuroraGame.initGameAndGUI(AuroraGame.java:150)
    at de.lessvoid.nifty.slick2d.NiftyOverlayGame.init(NiftyOverlayGame.java:68)
    at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
    at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
    at ru.game.aurora.application.AuroraGame.main(AuroraGame.java:375)
Sun Aug 30 21:49:54 CST 2015 ERROR:Could not load image
org.newdawn.slick.SlickException: Could not load image
    at ru.game.aurora.application.ResourceManager.loadImage(ResourceManager.java:296)
    at ru.game.aurora.application.ResourceManager.addElementAsImage(ResourceManager.java:284)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:125)
    at ru.game.aurora.application.ResourceManager.addNewResourceFile(ResourceManager.java:158)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:100)
    at ru.game.aurora.application.ResourceManager.loadResources(ResourceManager.java:73)
    at ru.game.aurora.application.AuroraGame.initGameAndGUI(AuroraGame.java:150)
    at de.lessvoid.nifty.slick2d.NiftyOverlayGame.init(NiftyOverlayGame.java:68)
    at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
    at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
    at ru.game.aurora.application.AuroraGame.main(AuroraGame.java:375)
Caused by: org.newdawn.slick.SlickException: Failed to load image from: sprites/tiles/asph/tiles_0015.png
    at org.newdawn.slick.Image.<init>(Image.java:195)
    at org.newdawn.slick.Image.<init>(Image.java:166)
    at ru.game.aurora.application.ResourceManager.loadImage(ResourceManager.java:294)
    ... 10 more
Caused by: java.io.IOException: Bad file descriptor
    at java.io.FileInputStream.available(Native Method)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
    at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:53)
    at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:292)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254)
    at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:187)
    at org.newdawn.slick.Image.<init>(Image.java:192)
    ... 12 more

The autosave seems to work fine though. The Aurora version is 0.4.3 and I'm running it on Linux (Arch Linux) with OpenJDK 1.8.0_60.

Removing the savegame resolves the issue but yea the game state will be gone then :/.

Just downloaded the latest zip archive and running it via the shell script that ships within the bin directory.

Comments (3)

  1. Егор Смирнов repo owner

    This is very strange. The error indicates that something wrong is with one of image resources. But you say that for other saves it works fine? Will check that though can hardly imagine the cause of it right now.

  2. Егор Смирнов repo owner

    Can you please confirm that image at resources/sprites/tiles/asph/tiles_0015.png is a valid image and can be opened in some image viewer?

  3. wottis reporter

    Sorry for the late response.

    The mentioned file is a valid image and can be opened by image viewers (tested with mirage and feh).

  4. Log in to comment