Cursor images wont load

Hi,

I just tried making a cursor system and whenever i try loading a cur ico or ani file using
(JmeCursor) assetManager.loadAsset(“Textures/Cursors/cursor.cur”);

[java]Sep 26, 2013 11:06:03 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ClassCastException: com.jme3.asset.AssetKey cannot be cast to com.jme3.asset.TextureKey
at com.jme3.texture.plugins.AWTLoader.load(AWTLoader.java:196)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:342)
at Utils.CursorAPI.<init>(CursorAPI.java:66)
at Utils.CursorAPI.getInstance(CursorAPI.java:78)
at mygame.Main.simpleInitApp(Main.java:119)
Destroy
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:722)
[/java]

I also get this error when running the sample cursor project
[java]com.jme3.asset.AssetLoadException: An exception has occured while loading asset: Textures/Cursors/nyancat.ico
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:290)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:342)
at jme3test.gui.TestCursor.simpleInitApp(TestCursor.java:53)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.imageio.IIOException: Error reading PNG image data
at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1308)
at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1577)
at javax.imageio.ImageIO.read(ImageIO.java:1448)
at javax.imageio.ImageIO.read(ImageIO.java:1352)
at com.jme3.cursors.plugins.CursorLoader.parseICOImage(CursorLoader.java:515)
at com.jme3.cursors.plugins.CursorLoader.loadCursor(CursorLoader.java:222)
at com.jme3.cursors.plugins.CursorLoader.load(CursorLoader.java:87)
at com.jme3.cursors.plugins.CursorLoader.load(CursorLoader.java:57)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
… 6 more
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at com.sun.imageio.plugins.png.PNGImageReader.decodePass(PNGImageReader.java:1092)
at com.sun.imageio.plugins.png.PNGImageReader.decodeImage(PNGImageReader.java:1196)
at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1301)
… 14 more[/java]

Is this currently broken?

Thanks

I think this is due to a image format problem I was trying to load cursors and ani files directly downloaded from http://www.rw-designer.com

The code seems to have issues with this

I edited the cursors in RealWorld Cursor Editor for cur files and AniTuner for ani files and it seems happy to load them after they have been recreated using those tools

I think this exception could probably be caught at

java.lang.ClassCastException: com.jme3.asset.AssetKey cannot be cast to com.jme3.asset.TextureKey at com.jme3.texture.plugins.AWTLoader.load(AWTLoader.java:196)

and echo that the image is probably an incorrect format

Class cast exception doesn’t seem to = dodgy image, not very user friendly