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

Debugger - Message: index out of bounds: the len is 0 but the index is 0 #6546

Closed
2 tasks done
riordant opened this issue Dec 8, 2023 · 2 comments · Fixed by #6547
Closed
2 tasks done

Debugger - Message: index out of bounds: the len is 0 but the index is 0 #6546

riordant opened this issue Dec 8, 2023 · 2 comments · Fixed by #6547
Labels
T-bug Type: bug

Comments

@riordant
Copy link

riordant commented Dec 8, 2023

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (8a31bf1 2023-12-08T00:22:10.680255274Z)

What command(s) is the bug in?

forge test --debug

Operating System

Linux

Describe the bug

I'm attempting to debug the challenges at https://github.com/RareSkills/huff-puzzles

The tests themselves run successfully, ie.:

❯ forge test --mc Add1Test
[⠢] Compiling...
No files changed, compilation skipped

Running 2 tests for test/Add1.t.sol:Add1Test
[PASS] testAdd1(uint256) (runs: 256, μ: 5417, ~: 5417)
[PASS] testNonMatchingSelector(bytes32) (runs: 256, μ: 5788, ~: 5788)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.08s

Ran 1 test suites: 2 tests passed, 0 failed, 0 skipped (2 total tests)

But attempting to run the debugger on a function in the test file fails:

❯ forge test --debug testAdd1
[⠢] Compiling...
No files changed, compilation skipped
The application panicked (crashed).
Message:  index out of bounds: the len is 0 but the index is 0
Location: crates/debugger/src/tui/context.rs:64

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[1]    1060659 abort (core dumped)  forge test --debug testAdd1
@riordant riordant added the T-bug Type: bug label Dec 8, 2023
@gakonst gakonst added this to Foundry Dec 8, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Dec 8, 2023
@riordant riordant changed the title Encountered Debugger - Message: index out of bounds: the len is 0 but the index is 0 Dec 8, 2023
@mattsse
Copy link
Member

mattsse commented Dec 8, 2023

@DaniPopes

@riordant
Copy link
Author

riordant commented Dec 8, 2023

Legends!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants