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

Crash in AnnotatedTypeMirror.fromExpression #5323

Closed
eikemeier opened this issue Sep 19, 2022 · 1 comment · Fixed by #5327
Closed

Crash in AnnotatedTypeMirror.fromExpression #5323

eikemeier opened this issue Sep 19, 2022 · 1 comment · Fixed by #5327

Comments

@eikemeier
Copy link

eikemeier commented Sep 19, 2022

Example repository at https://github.com/eikemeier/checker-framework-crash

Compilation crashes with

error: Error in AnnotatedTypeMirror.fromExpression(KeyForAnnotatedTypeFactory, withInformation): Cannot invoke "org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedDeclaredType.getUnderlyingType()" because "thisType" is null
  ; The Checker Framework crashed.  Please report the crash.
  Compilation unit: [...]/checker-framework-crash/src/main/java/com/example/Source.java
  Last visited tree at line 6 column 1:
  @Value.Immutable
  Exception: java.lang.NullPointerException: Cannot invoke "org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedDeclaredType.getUnderlyingType()" because "thisType" is null; java.lang.NullPointerException: Cannot invoke "org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedDeclaredType.getUnderlyingType()" because "thisType" is null
        at org.checkerframework.framework.type.AnnotatedTypeFactory.getImplicitReceiverType(AnnotatedTypeFactory.java:1987)
        at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitIdentifier(TypeFromExpressionVisitor.java:217)
        at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitIdentifier(TypeFromExpressionVisitor.java:75)
@mernst
Copy link
Member

mernst commented Sep 19, 2022

Thank you for the bug report (and our apologies that you encountered it).

If you are able to run the Checker Framework from source, could you please try the fix in #5327?

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

Successfully merging a pull request may close this issue.

2 participants