aussieplusplus icon indicating copy to clipboard operation
aussieplusplus copied to clipboard

thread 'main' panicked at 'already borrowed: BorrowMutError'

Open bbrk24 opened this issue 2 years ago • 3 comments

I had written this program:

G'DAY MATE!

THE HARD YAKKA FOR recursiveFunc IS () <
    GIMME"running...";
    recursiveFunc();
>

recursiveFunc();

CHEERS C***!

Notice the typo -- GIMME" rather than GIMME ". The program failed with a syntax error. However, when I fixed it and ran it again, I got this error:

thread 'main' panicked at 'already borrowed: BorrowMutError', /Users/zackradisic/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/io/stdio.rs:872:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The more I click run, the worse the errors get, saying thread panicked while panicking. aborting. and then thread panicked while processing panic. aborting..

bbrk24 avatar Oct 29 '21 18:10 bbrk24

Nice catch, investigated a little bit and the code above should crash bc of stack overflow, but on the site the wasm environment is not being teared down properly so funky things are happening when you run once again.

I'll modify the site to detect crashes like this and restart the wasm module

zackradisic avatar Oct 30 '21 12:10 zackradisic

@all-contributors please add @bbrk24 for bugs

jwfxpr avatar Oct 31 '21 21:10 jwfxpr

@jwfxpr

I've put up a pull request to add @bbrk24! :tada:

allcontributors[bot] avatar Oct 31 '21 21:10 allcontributors[bot]