oven-sh / bun

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

panic(main thread): Segmentation fault at address 0x5 #13991

Open rootfebri opened 1 month ago

rootfebri commented 1 month ago

How can we reproduce the crash?

relevant function

const Otomatis = async () => {
    const prefix = await input({
        required: true,
        message: 'Masukkan prefix untuk nama profile chrome',
        transformer: value => `${value}_`
    });
    let maxProfile: number | string = await input({
        message: 'Masukkan jumlah profile yang ingin dibuat',
        default: '1',
        validate: (value) => Number(value) > 0 || 'Jumlah profile harus lebih besar dari 0',
    });
    maxProfile = parseInt(maxProfile);

    let created = 0;
    for (let i = 0; i < maxProfile; i++) {
        let profileName = `${prefix}_${i}`;
        if (await Profile.findOne({where: {name: profileName, fullpath: path.join(CHROME_DIR, profileName)}}) === null) {
            const profile = await Profile.create({
                name: profileName,
                fullpath: path.join(CHROME_DIR, profileName),
            })

            const browser = await launcher(profile.name, true);
            await delay(2000)
            await browser.close()
            await confirm({message: `Udah mbot?`})
            console.info(`[${profile.id}] Profile '${profile.name}' Berhasil dibuat!`)
            created++;
        }
    }
    console.log(`Berhasil membuat ${created} profile chrome!`)
}

Relevant log output

~\WebstormProjects\autocmt release
 bun run start
$ bun run src/main.ts
? Menu Pengaturan Browser
? Menu Buat profil chrome
? Pilih cara membuat profile Otomatis
? Masukkan prefix untuk nama profile chrome crhome_
? Masukkan jumlah profile yang ingin dibuat 25
? Udah mbot? yes
[1] Profile 'crhome_0' Berhasil dibuat!
? Udah mbot? yes
[2] Profile 'crhome_1' Berhasil dibuat!

? Udah mbot? yes
[3] Profile 'crhome_2' Berhasil dibuat!

? Udah mbot? yes
[4] Profile 'crhome_3' Berhasil dibuat!

? Udah mbot? yes
[5] Profile 'crhome_4' Berhasil dibuat!

? Udah mbot? yes
[6] Profile 'crhome_5' Berhasil dibuat!

? Udah mbot? yes
[7] Profile 'crhome_6' Berhasil dibuat!

? Udah mbot? yes
[8] Profile 'crhome_7' Berhasil dibuat!
? Udah mbot? yes
[9] Profile 'crhome_8' Berhasil dibuat!
? Udah mbot? yes
[10] Profile 'crhome_9' Berhasil dibuat!
? Udah mbot? yes
[11] Profile 'crhome_10' Berhasil dibuat!
? Udah mbot? yes
[12] Profile 'crhome_11' Berhasil dibuat!
============================================================
Bun v1.1.20 (ae194892) Windows x64
CPU: sse42 avx avx2
Args: "C:\Users\WOL\.bun\bin\bun.exe" "run" "src/main.ts"
Features: jsc Bun.stdin(2) Bun.stdout spawn(13) transpiler_cache(12) tsconfig_paths(2) tsconfig(6) WebSocket(13)
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:net" "node:os" "node:path" "node:process" "node:readline" "node:stream" "node:string_decoder" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "ws"
Elapsed: 59321ms | User: 578ms | Sys: 140ms
RSS: 0.25GB | Peak: 0.25GB | Commit: 0.27GB | Faults: 62692

panic(main thread): Segmentation fault at address 0x5
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.20/wr1ae19489A6ggg0L___A2AK

error: script "start" exited with code 3
~\WebstormProjects\autocmt release x3


Stack Trace (bun.report)

Bun v1.1.20 (ae19489) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x00000005

github-actions[bot] commented 1 month ago

@rootfebri, the latest version of Bun is v1.1.27, but this crash was reported on Bun v1.1.20.

Are you able to reproduce this crash on the latest version of Bun?

bun upgrade
rootfebri commented 1 month ago

Upgraded!

github-actions[bot] commented 1 month ago

Hello @rootfebri. Please provide a minimal reproduction using a GitHub repository, Replit, or CodeSandbox. Issues marked with needs repro will be closed if they have no activity within 3 days.

rootfebri commented 1 month ago

Hello @rootfebri. Please provide a minimal reproduction using a GitHub repository, Replit, or CodeSandbox. Issues marked with needs repro will be closed if they have no activity within 3 days.

I hope this can help

https://github.com/rootfebri/autocmt