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

Memory mesh producer: Parse errors do not trigger the right kind of failure #44

Closed
io7m opened this Issue Apr 28, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@io7m
Owner

io7m commented Apr 28, 2017

The memory mesh producer tries to complete the mesh in the onFinish() method. Unfortunately, this method is called regardless of whether or not parsing actually succeeded.

  @Override
  public void onFinish()
  {
    this.mesh =
      SMFMemoryMesh.builder()
        .setArrays(this.arrays)
        .setHeader(this.header)
        .setTriangles(this.triangles)
        .setMetadata(this.metadata)
        .build();

    this.finished = true;
  }

The above will trigger a null pointer exception because the header field is not assigned...

@io7m io7m added the bug label Apr 28, 2017

@io7m io7m self-assigned this Apr 28, 2017

@io7m io7m closed this in d293022 Apr 28, 2017

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

Merge branch 'release/0.11.0'
Release: com.io7m.smfj 0.11.0
Code new: Implement version probing. (tickets: #42)
Code new: Add convenient SMFFilterCommandChecks class for developing filters.
Code change: Move SMFSchemaValidator into the API package as it defines the semantics of validation.
Code change: Make parsers use URIs instead of Paths for diagnostic messages. (tickets: #43)
Code fix: Fail in the correct way when failing to parse files during mesh processing. (tickets: #44)
Code change: Complete redesign of formats for forward and backwards compatibility. (tickets: #46, #45, #41)
Code change: Rename the "formats" command to "list-formats".

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

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

Code new: Implement version probing. (tickets: #42)
Code new: Add convenient SMFFilterCommandChecks class for developing filters.
Code change: Move SMFSchemaValidator into the API package as it defines the semantics of validation.
Code change: Make parsers use URIs instead of Paths for diagnostic messages. (tickets: #43)
Code fix: Fail in the correct way when failing to parse files during mesh processing. (tickets: #44)
Code change: Complete redesign of formats for forward and backwards compatibility. (tickets: #46, #45, #41)
Code change: Rename the "formats" command to "list-formats".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment