You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo run execute succeeds, cargo run debug fails, but only after continue:
❯ cargo run execute
Finished dev [optimized + debuginfo] target(s) in 0.31s
Running `/Users/michaelklein/Coding/rust/noir/target/debug/nargo execute`
[missing_closure_env] Circuit witness successfully solved
❯ cargo run debug
Finished dev [optimized + debuginfo] target(s) in 0.23s
Running `/Users/michaelklein/Coding/rust/noir/target/debug/nargo debug`
[missing_closure_env] Starting debugger
Finished execution
>continue
(Continuing execution...)
The application panicked (crashed).
Message: index out of bounds: the len is 0 but the index is 0
Location: /Users/michaelklein/Coding/rust/noir/acvm-repo/acvm/src/pwg/mod.rs:350
This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.
If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml❯ cargo run info --json Finished dev [optimized + debuginfo] target(s) in 0.21s Running `/Users/michaelklein/Coding/rust/noir/target/debug/nargo info --json`{"programs":[{"name":"missing_closure_env","acir_opcodes":0,"circuit_size":5}],"contracts":[]}
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
# Description
## Problem\*
Resolves#4231
The REPL debugger is not handling the case when the compiled circuit has
no opcodes and since it assumes there will be some opcodes, it panics on
continue.
## Summary\*
With this PR, the REPL debugger will start in a "finished" stated in
those cases and the DAP will not start the main loop.
## Additional Context
This edge case is very unlikely to happen, especially after applying
#4185 which changes the default mode for the debugger to Brillig (seems
to generate at least a trampoline-like fragment even for empty programs)
and after the introduction of debugging instrumentation. Nevertheless it
will still be possible (eg. empty program and passing `--acir-mode`
option).
## Documentation\*
Check one:
- [X] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.
# PR Checklist\*
- [X] I have tested the changes locally.
- [X] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Aim
Nargo debugger should return the expected error without panicing when running on code with zero ACIR opcodes.
It currently panics here:
noir/acvm-repo/acvm/src/pwg/mod.rs
Line 350 in 96a74bb
Expected Behavior
nargo debug
fails without a panicBug
nargo debug
fails with a panic when you call continue.To Reproduce
Running on the following
main.nr
file:cargo run execute
succeeds,cargo run debug
fails, but only aftercontinue
:Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: