Skip to content

[Bug]: helix check crashes with internal panic on multiple CREATE queries #671

@Pilsertech

Description

@Pilsertech

What happened?

Running helix check on a queries file containing multiple CREATE queries (AddN, AddV, AddE) causes an internal panic in the type inference analyzer. The error message is:

[CHECK] Checking all instances
[VALIDATE] Parsing and validating Helix queries
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: helix-db\src\helixc\analyzer\methods\infer_expr_type.rs:220

If I run a single CREATE query, it works fine. When I add many similar queries (12+), the crash happens. The schema validates successfully, and individual queries work, but the problem seems related to the number or pattern of queries.

Steps to reproduce

  1. Create a schema with 14 node types and matching vector embedding types.
  2. Create a queries file with 12+ CREATE queries (AddN + AddV + AddE)
  3. Run helix check
  4. Observe crash at infer_expr_type.rs:220

Minimal example:

  • Single query works fine
  • Adding 10+ similar queries (all following AddN → AddV → AddE → RETURN) triggers panic
  • Full reproduction files: schema.hx (valid), queries_full_with_errors.hx (crashes), queries_working.hx (valid)

Version

2.0.5

Environment

Development/Local

Relevant log output

[CHECK] Checking all instances
[VALIDATE] Parsing and validating Helix queries
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: helix-db\src\helixc\analyzer\methods\infer_expr_type.rs:220

Backtrace omitted. Run with RUST_BACKTRACE=1 to display it.

Additional context

  • Schema validates with helix check

  • Individual queries work when tested separately

  • Panic is related to query count or complexity, not syntax

  • All queries follow the same pattern: AddN → AddV → AddE → RETURN

  • Panic occurs in type inference phase

  • Using RUST_BACKTRACE=1 shows minimal backtrace (Windows)

  • Impact: Prevents defining comprehensive APIs in HQL, forces logic into app code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions