oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.31k stars 2.78k forks source link

Bun Crash with WebRTC #11615

Open AlexanderEpolite opened 5 months ago

AlexanderEpolite commented 5 months ago

How can we reproduce the crash?

import Peer from "simple-peer";
import wrtc from "@roamhq/wrtc"; //using normal wrtc crashes as well

var p = new Peer({ initiator: true, wrtc: wrtc });

p.on("signal", (data) => {
    console.log("SIGNAL", JSON.stringify(data));
});

p.on("connect", () => {
    console.log("CONNECT");
    p.send("test");
});

p.on("data", (data) => {
    console.log(`incoming data: ${data}`);
});

Relevant log output

============================================================
Bun v1.1.12 (43f0913c) Windows x64
Args: "C:\Users\Alex\.bun\bin\bun.exe" ".\test.ts"
Features: jsc dotenv tsconfig(2) 
Builtins: "bun:main" "node:buffer" "node:crypto" "node:events" "node:stream" "node:string_decoder" "node:tty" "node:util" "node:util/types" 
Elapsed: 134ms | User: 0ms | Sys: 0ms
RSS: 122.38MB | Peak: 122.38MB | Commit: 0.16GB | Faults: 30199

panic(main thread): incorrect alignment
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:

<link>

Stack Trace (bun.report)

Bun v1.1.12 ([`43f0913`](<https://github.com/oven-sh/bun/tree/43f0913c3875cbf260c60868268adc5953b09a80>)) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x0409514A

- *1 unknown/js code*
- ??? at `0x111a22f` in node.exe
- ??? at `0x1119daa` in node.exe
- ??? at `0xd0fa34` in node.exe
- ??? at `0xba5ce6` in node.exe
- ??? at `0xcf5d05` in node.exe
- ??? at `0x2ebd50` in node.exe
- ??? at `0x1572` in wrtc.node
- ??? at `0x1476f5` in wrtc.node
- ??? at `0x146f8a` in wrtc.node

<!-- from bun.report: LQEJ87csM6yacdIQyE-x -->
nanofuxion commented 3 months ago

bump

mertushka commented 1 month ago

Any heads up here?