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

--covarage crashed on windows and show files from node_modules #9681

Closed
scffs opened this issue Mar 28, 2024 · 12 comments · Fixed by #11131
Closed

--covarage crashed on windows and show files from node_modules #9681

scffs opened this issue Mar 28, 2024 · 12 comments · Fixed by #11131
Labels
bug Something isn't working crash An issue that could cause a crash windows An issue that only occurs on Windows

Comments

@scffs
Copy link

scffs commented Mar 28, 2024

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 (e808cdb) 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 scffs added the bug Something isn't working label Mar 28, 2024
@scffs
Copy link
Author

scffs commented Mar 28, 2024

this command actually didn't work correct with custom path

and idk why but bun show files from node_modules

image

@scffs scffs changed the title --covarage crashed on windows --covarage crashed on windows and show files from node_modules Mar 28, 2024
@Electroid Electroid added crash An issue that could cause a crash windows An issue that only occurs on Windows labels Mar 28, 2024
@disog
Copy link

disog commented Apr 6, 2024

Same here. I'm using v1.1.2.

@Arilith
Copy link

Arilith commented Apr 9, 2024

Still happening with v1.1.3 as well.

@scffs
Copy link
Author

scffs commented Apr 9, 2024

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
Copy link
Author

scffs commented Apr 9, 2024

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

@Electroid
Copy link
Contributor

@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!

@scffs
Copy link
Author

scffs commented Apr 11, 2024

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

@syahid-dev
Copy link

syahid-dev commented Apr 26, 2024

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;
    }
}

@scffs
Copy link
Author

scffs commented Apr 26, 2024

Bun v1.1.5 (b257a30) 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

@Jarred-Sumner
Copy link
Collaborator

Duplicate of #10836

@Jarred-Sumner Jarred-Sumner marked this as a duplicate of #10836 May 16, 2024
@Jarred-Sumner
Copy link
Collaborator

We will fix this, but please follow along in #10836 to track this issue (there have been several duplicates)

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@scffs
Copy link
Author

scffs commented May 16, 2024

Duplicate of #10836

ok

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash An issue that could cause a crash windows An issue that only occurs on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants