There might be something wrong with the teapot

I updated the jar pack. Test codes relate to teapot can not work. It seems like  the engine can not find the teapot.mtl file. When I open the jme3testdata.jar the Teapot.mtl is there.



2010-7-23 10:36:46 com.jme3.asset.DesktopAssetManager <init>

信息: DesktopAssetManager created.

2010-7-23 10:36:49 com.jme3.system.JmeSystem initialize

信息: Running on jMonkey Engine 3 Alpha 0.6

2010-7-23 10:36:49 com.jme3.system.Natives extractNativeLibs

信息: Extraction Directory #1: file:/D:/NetBeanWorkshop/JME3/

2010-7-23 10:36:49 com.jme3.system.Natives extractNativeLibs

信息: Extraction Directory #2: D:NetBeanWorkshopjmonkeyTest

2010-7-23 10:36:49 com.jme3.system.Natives extractNativeLibs

信息: Extraction Directory #3: D:NetBeanWorkshopjmonkeyTest

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay run

信息: Using LWJGL 2.5

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglDisplay createContext

信息: Selected display mode: 640 x 480 x 0 @0Hz

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: Display created.

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: Adapter: ati2dvag

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: Driver Version: 6.14.10.6806

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: Vendor: ATI Technologies Inc.

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: OpenGL Version: 2.1.7537 Release

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: Renderer: ATI Mobility Radeon HD 2300

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

信息: GLSL Ver: 1.20

2010-7-23 10:36:49 com.jme3.system.lwjgl.LwjglTimer <init>

信息: Timer resolution: 1000 ticks per second

2010-7-23 10:36:49 com.jme3.renderer.Camera <init>

信息: Camera created (W: 640, H: 480)

2010-7-23 10:36:49 com.jme3.input.lwjgl.LwjglMouseInput initialize

信息: Mouse created.

2010-7-23 10:36:49 com.jme3.input.lwjgl.LwjglKeyInput initialize

信息: Keyboard created.

2010-7-23 10:36:49 com.jme3.audio.lwjgl.LwjglAudioRenderer initialize

信息: Audio effect extension version: 1.0

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Gui Node)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (BitmapFont) attached to this node (Statistics View)

2010-7-23 10:36:50 com.jme3.scene.Node attachChild

信息: Child (Statistics View) attached to this node (Gui Node)

2010-7-23 10:36:50 com.jme3.asset.DesktopAssetManager loadAsset

警告: Cannot locate resource: Models/Teapot/teapot.mtl

2010-7-23 10:36:50 com.jme3.app.Application handleError

严重: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.NullPointerException

        at com.jme3.scene.plugins.OBJLoader.loadMtlLib(OBJLoader.java:259)

        at com.jme3.scene.plugins.OBJLoader.readLine(OBJLoader.java:300)

        at com.jme3.scene.plugins.OBJLoader.load(OBJLoader.java:462)

        at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:162)

        at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:282)

        at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:292)

        at jme3test.conversion.TestTriangleStrip.simpleInitApp(TestTriangleStrip.java:20)

        at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:158)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:147)

        at java.lang.Thread.run(Thread.java:619)

Java Result: -1073741819

Teapot.mtl is there, but not teapot.mtl

It's looking for the all-lowercase version which isn't there.

I fixed it by changing the reference from teapot to Teapot.

Also now it won't crash anymore if it cant find the material, it will use a default one instead.

Momoko_Fan said:

Teapot.mtl is there, but not teapot.mtl
It's looking for the all-lowercase version which isn't there.
I fixed it by changing the reference from teapot to Teapot.
Also now it won't crash anymore if it cant find the material, it will use a default one instead.


great