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

MultiProgress example does not draw correctly after atomic position #413

Closed
djc opened this issue Mar 21, 2022 · 1 comment
Closed

MultiProgress example does not draw correctly after atomic position #413

djc opened this issue Mar 21, 2022 · 1 comment

Comments

@djc
Copy link
Member

djc commented Mar 21, 2022

When running cargo run --example multi-tree-ext on current main, the output sometimes becomes what could best be described as a jumbled mess.

Expected output:

[32/32]   ✔ the
[32/32]     ✔ quick
[32/32]       ✔ brown
[32/32]         ✔ fox
[32/32]           ✔ jumps
[32/32]             ✔ over
[32/32]               ✔ a
[32/32]                 ✔ lazy
[32/32]                   ✔ dog
████████████████████████████████████████  585/585

Actual output:

[ 5/32] ⠂ temp_1
[24/32]                   ⠉ dog
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   28/585                               
[ 5/32] ⠂ temp_1
[ 0/32]                 ⠉ lazy
[24/32]                   ⠉ dog

Or

[32/32] ✔ the
[ 0/32] ⠉ temp_7
[ 1/32]     ⠙ quick
[32/32] ✔ the
[ 0/32] ⠉ temp_7
[ 1/32]     ⠙ quick
[ 4/32] ⠂ temp_6
[ 2/32]         ⠚ fox
[ 0/32] ⠉ temp_8
[ 1/32]           ⠙ jumps
[32/32] ✔ over
[ 8/32] ⠴ temp_5
[32/32] ✔ a
[32/32] ✔ lazy
[32/32] ✔ dog

This seems to have started with ea1f733. This of course substantially changes the timing so it's possible this is exposing some pre-existing race conditions.

@djc djc mentioned this issue Mar 21, 2022
@djc
Copy link
Member Author

djc commented Mar 21, 2022

This turned out to actually be due to a panic from #405, masked by the fact that the MultiProgress drawing was overwriting the panic output. #414 contains a change (324f3dc) that will stop indicatif from drawing to the terminal while the thread is panicking, hopefully making this easier to diagnose in the future.

@djc djc closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant