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

bug(cast): failed printing to stdout: Broken pipe (os error 32) #8568

Closed
2 tasks done
Tracked by #8794
Cocodrilette opened this issue Jul 30, 2024 · 3 comments
Closed
2 tasks done
Tracked by #8794

bug(cast): failed printing to stdout: Broken pipe (os error 32) #8568

Cocodrilette opened this issue Jul 30, 2024 · 3 comments
Assignees
Labels
C-cast Command: cast T-blocked Type: blocked T-bug Type: bug
Milestone

Comments

@Cocodrilette
Copy link

Component

Cast

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (fdfaafd 2024-07-30T00:19:45.054521589Z)

What command(s) is the bug in?

cast call

Operating System

Linux

Describe the bug

I was running this command:

cast call $USDT_POL "balanceOf(address)" 0x6464C0D320599d2E8c2ee3b1E0331Ef8D5bbe035 --rpc-url $POL_RPC | calc $1/1e6

And this error was throw (the result was returned btw):

	0.000001
The application panicked (crashed).
Message:  failed printing to stdout: Broken pipe (os error 32)
Location: library/std/src/io/stdio.rs:1118

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

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __libc_start_call_main<unknown>
      at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
   2: __libc_start_main_impl<unknown>
      at ./csu/../csu/libc-start.c:392

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
@Cocodrilette Cocodrilette added the T-bug Type: bug label Jul 30, 2024
@Cocodrilette
Copy link
Author

The result is wrong

@zerosnacks zerosnacks added the C-cast Command: cast label Jul 31, 2024
@zerosnacks zerosnacks changed the title failed printing to stdout: Broken pipe (os error 32) bug(cast): failed printing to stdout: Broken pipe (os error 32) Jul 31, 2024
@zerosnacks zerosnacks added the T-to-investigate Type: to investigate label Jul 31, 2024
@zerosnacks
Copy link
Member

Possibly related: rust-lang/rust#46016 + use of println over writeln

Likely related: #6569

@zerosnacks
Copy link
Member

cast call 0xc2132D05D31c914a87C6611C10748AEb04B58e8F "balanceOf(address)" 0x6464C0D320599d2E8c2ee3b1E0331Ef8D5bbe035 --rpc-url <POLYGON_RPC_URL> | cast to-fixed-point 6 now yields 1887.408245 after common::shell has been introduced

@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 11, 2024
@zerosnacks zerosnacks moved this from Todo to Done in Foundry Nov 11, 2024
@zerosnacks zerosnacks self-assigned this Nov 11, 2024
@grandizzy grandizzy moved this from Done to Completed in Foundry Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-blocked Type: blocked T-bug Type: bug
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants