I'm getting the following error when I attempt to use XMLImporter:
java.io.IOException: Wrong number of Savable arrays for 'texBuf'. size says 1, data contains 0
Any ideas on where I should start debugging? I tried stepping through the import process in debug mode, but the jmeXML file is large. So help narrowing down where in code to look would be helpful.
The node, when built in memory, displays properly with no problems.
The node contains various sub-nodes and a large number of TriMesh objects.
The node contains a lot of SharedMesh and several SharedNode objects.
The XML file is generated via XMLExporter and is not touched before attempting an import.
I've also tested binary export/import. That works just fine. No errors.
I'm not including all code at this point since, so far, the node is behaving normally within JME. Also, it is a rather large code built node. Follows is the XML import/export related code.
Regards and such,
Either reproduce the problem with a small subscene, or narrow the problem. Using common sense and good text or XML editor, you can distinguish which Geometry the problem is with. Once you know that, work the problem with just that Geometry. At that point, verify that the error message is correct, that the size says 1 but the coords contains 0 elements. If so, change the attr value from "1" to "0" and see if that makes it work.
Once you have a good test case (by the method described above or any other), post it somewhere and I'll look at it. To avoid potential delays: A test case should clearly exhibit the problem at hand without other complexities or unnecessary size.
POSTNOTE: Make sure to use recent jME code. There have been fixes to XML persistence recently.
Thanks for the reply blaine. I'm off writing code for navmesh generation right now. So it will probably be a while before I get back to this.
Due to the method of geometry generation and composition of the scene graph, and the fact that the binary import/export works fine, I'm proceeding as if the problem is with the jME XML import and/or export code.
I'm using the most recent stable release of jME. So the problem exists in current the jME release.
I'll be starting with keyword searches through the jME code. E.g. Searching for a textBuf variable in classes associated with the import/export. Once I find likely locations in code, I'll begin traces to find the exact location where the error is being generated.
Once I find the source of the problem, I'll post the result here.