bun icon indicating copy to clipboard operation
bun copied to clipboard

--covarage crashed on windows and show files from node_modules

Open scffs opened this issue 11 months ago • 7 comments

What version of Bun is running?

1.0.35-canary.23+e808cdb72 and 1.0.35-canary.35+dea877f19

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

please run bun test --coverage apps\web\src\utils\handleResponse in my project

I'll give a simpler example if I find the source of the problem

What is the expected behavior?

see the coverage

What do you see instead?

uh-oh: attempt to cast negative value to unsigned integer bun will crash now 😭😭😭

----- bun meta ----- Bun v1.0.35-canary.23 (e808cdb7) Windows x64 TestCommand: bunfig transpiler_cache Elapsed: 3576ms | User: 406ms | Sys: 140ms RSS: 0.24GB | Peak: 0.24GB | Commit: 0.27GB | Faults: 60395 ----- bun meta -----

0 00007FF6A5917428 1 ??? 2 ??? 3 ??? 4 ??? 5 ??? 6 ??? 7 ??? 8 ??? 9 ??? 10 ??? 11 ???

Search GitHub issues https://bun.sh/issues or join in #windows channel in https://bun.sh/discord

thread 28168 panic: attempt to cast negative value to unsigned integer ???:?:?: 0x7ff6a46eba8a in ??? (bun.exe) ???:?:?: 0x7ff6a46b845e in ??? (bun.exe) ???:?:?: 0x7ff6a69591de in ??? (bun.exe) ???:?:?: 0x7ff6a4549609 in ??? (bun.exe) ???:?:?: 0x7ff6a454e594 in ??? (bun.exe) ???:?:?: 0x7ff6a458b119 in ??? (bun.exe) ???:?:?: 0x7ff6a42c16c6 in ??? (bun.exe) ???:?:?: 0x7ff6a6dce053 in ??? (bun.exe) ???:?:?: 0x7ffcedca257c in ??? (KERNEL32.DLL) ???:?:?: 0x7ffceea6aa47 in ??? (ntdll.dll)

Additional information

image

scffs avatar Mar 28 '24 12:03 scffs

this command actually didn't work correct with custom path

and idk why but bun show files from node_modules

image

scffs avatar Mar 28 '24 12:03 scffs

Same here. I'm using v1.1.2.

dsogari avatar Apr 06 '24 18:04 dsogari

Still happening with v1.1.3 as well.

Arilith avatar Apr 09 '24 10:04 Arilith

deprecated, now it works good

for me after upgrade bun the `bun test` command just can't find any of files with `.test` in filename

image

but there is a lot of files with .test

image

scffs avatar Apr 09 '24 13:04 scffs

@Electroid sorry for ping but should I create a new issue about that or what?

scffs avatar Apr 09 '24 13:04 scffs

@Electroid sorry for ping bun should I create a new issue about that or what?

If you could create a new issue for the .test/spec that would be great!

Electroid avatar Apr 09 '24 18:04 Electroid

If you could create a new issue for the .test/spec that would be great!

idk how but for now the problem is gone (with .test/spec)

maybe after I reboot my PC or smth

scffs avatar Apr 11 '24 11:04 scffs

Since Bun's new crash reporter was released, this crash report may help:

Bun v1.1.5 (#10527) on windows x86_64_baseline [TestCommand]

panic: attempt to cast negative value to unsigned integer

In my case, the crash seems to be caused by defining the class properties like this:

// lexer.js
export default class Lexer {
    input; // this line caused the crash

    constructor(input) {
        this.input = input;
    }
}

syahid-dev avatar Apr 26 '24 14:04 syahid-dev

Bun v1.1.5 (b257a309) Windows x64 Args: "C:\Users\scffs.bun\bin\bun.exe", "test", "--coverage", "apps\web\src\utils\handleResponse" Features: bunfig transpiler_cache(6) tsconfig_paths(2) tsconfig(10) Builtins: "node:assert" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:http" "node:https" "node:net" "node:path" "node:stream" "node:stream/web" "node:string_decoder" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" Elapsed: 5314ms | User: 500ms | Sys: 390ms RSS: 0.25GB | Peak: 0.25GB | Commit: 0.28GB | Faults: 61111

panic(main thread): attempt to cast negative value to unsigned integer oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team, please file a GitHub issue using the link below:

https://bun.report/1.1.5/wt1b257a30AghggwDgvgtIgul+H+5/4sCkqw9E8h3+E+zztFql/Bu4Iojrj2CCa\KERNEL32.DLL63yEA0eNoVyMEJACAMA8BVslrRUApaRaPzi/c8k9inoIFiW0i6KS5xrR3+PrnDkxWRonM95EETDA

scffs avatar Apr 26 '24 17:04 scffs