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

Missing triangles crash the byte buffer packer #51

Closed
io7m opened this Issue Jun 20, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@io7m
Owner

io7m commented Jun 20, 2017

Packing a model that does not include triangles:

Buffer of size 0 is too small for one element of size 12
		at com.io7m.jpra.runtime.java.JPRACursor1DByteBufferedChecked.<init>(JPRACursor1DByteBufferedChecked.java:59)
		at com.io7m.jpra.runtime.java.JPRACursor1DByteBufferedChecked.newCursor(JPRACursor1DByteBufferedChecked.java:85)
		at com.io7m.smfj.bytebuffer.SMFByteBufferCursors.createUnsigned3Raw(SMFByteBufferCursors.java:774)
		at com.io7m.smfj.bytebuffer.SMFByteBufferTrianglePacker.<init>(SMFByteBufferTrianglePacker.java:59)
		at com.io7m.smfj.bytebuffer.SMFByteBufferPackedMeshes.onHeaderParsed(SMFByteBufferPackedMeshes.java:440)
		at com.io7m.smfj.format.text.v1.SMFTV1Parser.parseHeader(SMFTV1Parser.java:225)
		at com.io7m.smfj.format.text.v1.SMFTV1Parser.parse(SMFTV1Parser.java:196)
		at com.io7m.smfj.format.text.SMFFormatText$Parser.parse(SMFFormatText.java:303)

@io7m io7m added the bug label Jun 20, 2017

@io7m io7m self-assigned this Jun 20, 2017

@io7m io7m closed this in d8f1445 Jun 20, 2017

io7m added a commit that referenced this issue Jun 21, 2017

Merge branch 'release/0.14.0'
Release: com.io7m.smfj 0.14.0
Code fix: Correctly handle a lack of triangles and vertex data in the byte buffer packer. (tickets: #51)
Code change: Require parsers to fail on missing triangles and vertices.

io7m added a commit that referenced this issue Jun 21, 2017

Merge tag 'com.io7m.smf-0.14.0' into develop
Release: com.io7m.smfj 0.14.0

Code fix: Correctly handle a lack of triangles and vertex data in the byte buffer packer. (tickets: #51)
Code change: Require parsers to fail on missing triangles and vertices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment