Persistent Error need restart

Hello Everyone,



While testing my application with com models from the test-data folder inside the jmonkeyproject path the following exception is thrown from the line

[java]

Spatial spatial = desktopAssetManager.loadModel(relativePath);

[/java]

Exc:

[java]

java.lang.AssertionError

at com.jme3.scene.plugins.ogre.SceneLoader.startElement(SceneLoader.java:188)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

at com.jme3.scene.plugins.ogre.SceneLoader.load(SceneLoader.java:340)

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

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

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

[/java]



After the exception was thrown the first time, it repeats itself whenever I try to load the same model or any other model that would normally work. By restarting the app I can load the normal models once again.



Example of working models:

Models/Ferrari/Car.scene

town/main.scene



The model that causes the failures to start poping up is Scenes/ManyLights/Main.scene



Any ideas? Thanks in advance,

biasutti

The xml files seem to be malformed or you forgot to export them. You need to export the models as xml, the scene file only contains the info on how they are arranged.

Thanks for the reply normen. I do believe that is the problem too, however why the models that were loaded normally also crash while being loaded after the first crash. I’ve tried to clear the manager’s cache too also without success. My simple solution is to reinstantiate the manager (oldManager = new DesktopAssetManager) everytime a new model needs to be loaded. But this is only my model importer. I have a scene running on a canvas mode in my app too. Now, once this was fixed when the scene is being loaded directly, without any exceptions to stop it, the whole application stops responding. That only happens if I call my update function where the scene gets cleaned up and all the models are reloaded. Does this have something to do the aside DesktopAssetManagers i’m creating? Or could this be maybe a memory or graphic card problem?



Thanks once more,

cheers

From the stack it seems like this is due to problems in the xml parser api, whats the OS you run this on and do you use OpenJDK or Oracles (you should use Oracles)

It is possible that the SceneLoader doesn’t reset itself properly after loading certain models. I have now fixed it in SVN. Thanks