java.lang.IllegalArgumentException: Material parameter is not defined: Clipping
at tonegod.gui.core.Element.setFontPages(Element.java:2300)
at tonegod.gui.core.Element.updateLocalClipping(Element.java:2275)
at tonegod.gui.core.Element.updateClipping(Element.java:2244)
at tonegod.gui.core.Element.updateNodeLocation(Element.java:951)
at tonegod.gui.core.Element.setY(Element.java:946)
at tonegod.gui.core.Element.addChild(Element.java:406)
at tonegod.gui.controls.extras.ChatBox.(ChatBox.java:154)
at tonegod.gui.controls.extras.ChatBox.(ChatBox.java:63)
@bgilb said:
Hi I get this error when making a new chatbox:
java.lang.IllegalArgumentException: Material parameter is not defined: Clipping
at tonegod.gui.core.Element.setFontPages(Element.java:2300)
at tonegod.gui.core.Element.updateLocalClipping(Element.java:2275)
at tonegod.gui.core.Element.updateClipping(Element.java:2244)
at tonegod.gui.core.Element.updateNodeLocation(Element.java:951)
at tonegod.gui.core.Element.setY(Element.java:946)
at tonegod.gui.core.Element.addChild(Element.java:406)
at tonegod.gui.controls.extras.ChatBox.<init>(ChatBox.java:154)
at tonegod.gui.controls.extras.ChatBox.<init>(ChatBox.java:63)
I noticed that if I remove my custom theme it goes away. I’m not really doing anything special in the custom theme. I just copied the default one out of the tonegodgui jar and changed the font.
The weird thing is it works in my gui testing application which is just a simple application, but not my main game application. They have almost no difference, just where they instantiate the gui object that includes the screen with the custom style.
You have the jar referenced in the new project? Silly question probably… but since the Material is a replacement for Unshaded.j3md, it’s worth me asking just in case.
I am using Unshaded.j3md in my game. Could that cause any problems?
I do this quite often and have never seen this issue. Is this the entire stack trace? And can you post the part of the stack trace prior to the library calls with the code from and around the error lines. Should be able to tell you right away what the issue is from that.
Here is the full stack trace:
[java]
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalArgumentException: Material parameter is not defined: Clipping
at com.jme3.material.Material.checkSetParam(Material.java:442)
at com.jme3.material.Material.setParam(Material.java:458)
at com.jme3.material.Material.setVector4(Material.java:645)
at tonegod.gui.core.Element.setFontPages(Element.java:2166)
at tonegod.gui.core.Element.updateLocalClipping(Element.java:2141)
at tonegod.gui.core.Element.updateClipping(Element.java:2110)
at tonegod.gui.core.Element.updateNodeLocation(Element.java:901)
at tonegod.gui.core.Element.setY(Element.java:896)
at tonegod.gui.core.Element.addChild(Element.java:366)
at tonegod.gui.controls.extras.ChatBox.(ChatBox.java:154)
at tonegod.gui.controls.extras.ChatBox.(ChatBox.java:48)
at mygame.gui.IngameGui$1.(IngameGui.java:55)
at mygame.gui.IngameGui.(IngameGui.java:55)
at mygame.main.Game.initialize(Game.java:194)
at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:219)
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:249)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:238)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
at java.lang.Thread.run(Thread.java:722)
[/java]
Here is the relevant code. It errors right on the = new Chatbox line
[java]
screen = new Screen(sharedParts.app, “Interface/style/def/style_map.xml”);
sharedParts.app.getGuiNode().addControl(screen);
Actually, more specifically, does it point to a custom xml style def for ChatBox? And can you if so, can you post both the style_map.xml and the ChatBox.xml files?