Maescool/Catacomb-Snatch — Issue #142: Game crashes when reading level from ~/.mojam/levels
Author: jbarabbas
Created: 2012-02-22 13:12:03+00:00
State: open

Hi,

the game crashes, when a level is placed into the folder ~/.mojam/levels. What I did:

* I extracted AsymeTrical.bmp vom the .jar file
* I put it into the folder ~/.mojam/levels and renamed it to "testx.bmp"
* I run the game and clicked on "Start"
* The game crashes

The error I get:

Map info added: /home/daniel/.mojam/levels/testx.bmp
Exception in thread "Thread-0" java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1388)
at com.mojang.mojam.level.Level.fromFile(Level.java:94)
at com.mojang.mojam.gui.LevelButton.buildMinimap(LevelButton.java:55)
at com.mojang.mojam.gui.LevelButton.(LevelButton.java:38)
at com.mojang.mojam.gui.LevelSelect.setupLevelButtons(LevelSelect.java:64)
at com.mojang.mojam.gui.LevelSelect.(LevelSelect.java:40)
at com.mojang.mojam.MojamComponent.handleAction(MojamComponent.java:591)
at com.mojang.mojam.MojamComponent.buttonPressed(MojamComponent.java:570)
at com.mojang.mojam.gui.ClickableComponent.tick(ClickableComponent.java:38)
at com.mojang.mojam.gui.GuiMenu.tick(GuiMenu.java:33)
at com.mojang.mojam.MojamComponent.tick(MojamComponent.java:438)
at com.mojang.mojam.MojamComponent.run(MojamComponent.java:283)
at java.lang.Thread.run(Thread.java:722)

The same thing happens with any other level I place in that folder - so this issue is not related to the bitmaps themselfes.