Materialloader bug?

The used ogrexml is created with ogremax

http://www.nh-game.net/testlvl.7z





relevant code in Materialoader



if (!lnScan.hasNext(“n”)){

mips = lnScan.next();

if (lnScan.hasNext()){

// even more params…

// will have to ignore

}

}

[/code



If i comment “mips = lnScan.next();” out everything works as expected,

Code:
[/code]
java.util.NoSuchElementException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at com.jme3.scene.plugins.ogre.MaterialLoader.readTextureImage(MaterialLoader.java:101)
at com.jme3.scene.plugins.ogre.MaterialLoader.readTextureUnitStatement(MaterialLoader.java:149)
at com.jme3.scene.plugins.ogre.MaterialLoader.readTextureUnit(MaterialLoader.java:185)
at com.jme3.scene.plugins.ogre.MaterialLoader.readPassStatement(MaterialLoader.java:223)
at com.jme3.scene.plugins.ogre.MaterialLoader.readPass(MaterialLoader.java:255)
at com.jme3.scene.plugins.ogre.MaterialLoader.readTechnique(MaterialLoader.java:272)
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterialStatement(MaterialLoader.java:279)
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterial(MaterialLoader.java:301)
at com.jme3.scene.plugins.ogre.MaterialLoader.load(MaterialLoader.java:367)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:224)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:254)
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:766)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:224)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:346)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:356)
at online.newhorizons.client.backgroundloader.LoaderThread.CompileFromFile(LoaderThread.java:245)
at online.newhorizons.client.backgroundloader.LoaderThread.precache(LoaderThread.java:85)
at online.newhorizons.client.backgroundloader.LoaderThread.(LoaderThread.java:72)
at online.newhorizons.client.ClientApplication.initializeGame(ClientApplication.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at online.newhorizons.shared.util.Timedmethodinvocation.Update(TimedInvocation.java:76)
at online.newhorizons.shared.util.TimedInvocation.Update(TimedInvocation.java:17)
at online.newhorizons.client.ClientApplication.update(ClientApplication.java:340)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:141)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:198)
at java.lang.Thread.run(Unknown Source)

1 Like

Hm, the mips variable is never used, so I guess that line can be removed… @Momoko_Fan will have to say though…

Fixed in SVN