Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException parsing .Obj file #20

Closed
crystalct opened this issue Apr 24, 2012 · 3 comments
Closed

ArrayIndexOutOfBoundsException parsing .Obj file #20

crystalct opened this issue Apr 24, 2012 · 3 comments
Assignees

Comments

@crystalct
Copy link

I can't parse and get this .obj file (http://depositfiles.com/files/sq3ldakif ) (http://depositfiles.com/files/8xrctkf0f )(mtl)

Code:
ObjParser objParser = new ObjParser(mContext.getResources(), mTextureManager, R.raw.mesh092_obj);
objParser.parse();
mObjectGroup = objParser.getParsedObject();
mObjectGroup.addLight(mLight);
addChild(mObjectGroup);

android:minSdkVersion="12"

Error:
04-24 18:10:10.575: E/AndroidRuntime(19374): java.lang.ArrayIndexOutOfBoundsException: length=88258; index=-32767
04-24 18:10:10.575: E/AndroidRuntime(19374): at java.util.ArrayList.get(ArrayList.java:306)
04-24 18:10:10.575: E/AndroidRuntime(19374): at rajawali.parser.ObjParser.parse(ObjParser.java:194)
04-24 18:10:10.575: E/AndroidRuntime(19374): at master.unict.it.RajawaliTestRender.initScene(RajawaliTestRender.java:60)

@ToxicBakery
Copy link
Member

I would be interested in this too. I didn't have any luck parsing basic objects created using the instructions posted in a previous issue. Unfortunately I do not know enough about obj files to correct or improve the parser.

@crystalct
Copy link
Author

This particular problem is caused by the use of short integers inside Parser.......

@crystalct
Copy link
Author

Many thanks, Dennis!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants