GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Verifier crashes on an array read whose element type cannot be resolved (classes not on the classpath) · Issue #425 · liquid-java/liquidjava

Verifier crashes on an array read whose element type cannot be resolved (classes not on the classpath) #425

New issue
Copy link
New issue
Copy link
Closed
#432
Closed
Verifier crashes on an array read whose element type cannot be resolved (classes not on the classpath)#425
#432
Copy link
Labels
bugSomething isn't workingSomething isn't workingreal-world-findingFound when experimenting liquidjava in real world repos or OSSFound when experimenting liquidjava in real world repos or OSS

Description

@CatarinaGamboa
CatarinaGamboa
opened on Oct 27, 2026
Issue body actions

Impact: verification stops with an internal error on an array read whose element type cannot be resolved: 8 of the 74 real-world files below (6 projects).

Description

Reading an element of an array whose element type comes from a class that is not on the classpath (cookies[i] with Cookie[] cookies): RefinementTypeChecker.visitCtArrayRead (RefinementTypeChecker.java:272) adds the element with a null type, and Context.addVarToContext calls getSuperclass() on it (Context.java:193). The same null type in Context as #396 (there from a lambda parameter) and #389, reached from a different construct. An element of unknown type could be added without supertypes.

Minimal reproducer (com.example.missing is not on the classpath)

import com.example.missing.Cookie;

public class Repro {
    void createAll(Cookie[] cookies) {
        for (int i = 0; i < cookies.length; i++) {
            cookies[i].create();
        }
    }
}

Expected

Correct! Passed Verification. (with the usual "Java compilation encountered issues" warning).

Actual

Exception in thread "main" java.lang.RuntimeException: 
Error while checking CtMethodImpl
  on createAll(Cookie[] cookies) { 
  at /tmp/claude-1000/-home-cvgamboa-git/4a721752-8c76-4314-99f8-baeafc8d523a/scratchpad/issues/arrread/Repro.java:4
  with 
Error while checking CtBlockImpl
  on { 
  at /tmp/claude-1000/-home-cvgamboa-git/4a721752-8c76-4314-99f8-baeafc8d523a/scratchpad/issues/arrread/Repro.java:4
  with 
Error while checking CtForImpl
  on for (int i = 0; i < cookies.length; i++) { 
  at /tmp/claude-1000/-home-cvgamboa-git/4a721752-8c76-4314-99f8-baeafc8d523a/scratchpad/issues/arrread/Repro.java:5
...
Caused by: java.lang.NullPointerException: Cannot invoke "spoon.reflect.reference.CtTypeReference.getSuperclass()" because "type" is null
	at liquidjava.processor.context.Context.addVarToContext(Context.java:193)
	at liquidjava.processor.refinement_checker.RefinementTypeChecker.visitCtArrayRead(RefinementTypeChecker.java:272)

Reproduced on main at 0d489e1 (liquidjava-verifier 0.0.36).

Real-world files that hit it

  • arr[i].instanceCreate(): codelerity/netbeans-releases (file)
  • statementContexts[0]: apache/derby (file)
  • svnProperties[0]: scm-manager/svnkit (file)
  • this.errorHandlers[j]: storset/vtk.test (file)
  • perfEntityMetricBases[i]: OpenNMS/opennms (file), before and after its fix
  • this.getConfig().createConnection()[0]: wso2/product-integrator-mi (file), before and after its fix

Context

Found while running LiquidJava on the original repository files of 53 real-world typestate and refinement bugs (74 files with the fixed versions), each verified on its own as in #396. Related: #388, #389, #390, #396.

Activity

  1. CatarinaGamboa
    added
    bugSomething isn't workingSomething isn't working
    real-world-findingFound when experimenting liquidjava in real world repos or OSSFound when experimenting liquidjava in real world repos or OSS
    on Oct 27, 2026
  2. CatarinaGamboa
    closed this as completedin #432on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workingreal-world-findingFound when experimenting liquidjava in real world repos or OSSFound when experimenting liquidjava in real world repos or OSS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.