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

A random crash #11045

Open
ZYRACX opened this issue May 13, 2024 · 0 comments
Open

A random crash #11045

ZYRACX opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working crash An issue that could cause a crash

Comments

@ZYRACX
Copy link

ZYRACX commented May 13, 2024

How can we reproduce the crash?

I don't know. It just crashed randomly

JavaScript/TypeScript code that reproduces the crash?

const Discord = require("discord.js");


const client = new Discord.Client({intents: ["Guilds", "GuildMessages"]});

const prefix = "!";

client.on("messageCreate", function(message) {
  if (message.author.bot) return;
  if (!message.content.startsWith(prefix)) return;

  const commandBody = message.content.slice(prefix.length);
  const args = commandBody.split(' ');
  const command = args.shift().toLowerCase();

  if (command === "ping") {
    const timeTaken = Date.now() - message.createdTimestamp;
    message.reply(`Pong! This message had a latency of ${timeTaken}ms.`);
  }

  else if (command === "sum") {
    const numArgs = args.map(x => parseFloat(x));
    const sum = numArgs.reduce((counter, x) => counter += x);
    message.reply(`The sum of all the arguments you provided is ${sum}!`);
  }
});


client.login('Bot Token');

Relevant log output

Bun v1.1.5 (b257a309) Windows x64
Args: "C:\Users\soumy\.bun\bin\bun.exe", "."
Features: Bun.stdin(2) fetch transpiler_cache(3) tsconfig(2) WebSocket 
Builtins: "bun:main" "node:buffer" "node:events" "node:fs" "node:fs/promises" "node:http" "node:path" "node:string_decoder" "node:timers" "node:timers/promises" "node:url" "node:util" "node:util/types" "node:zlib" "node:worker_threads" "undici" "ws" 
Elapsed: 1949ms | User: 15ms | Sys: 0ms
RSS: 0.16GB | Peak: 0.16GB | Commit: 0.18GB | Faults: 38755

panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.5 (b257a30) on windows x86_64 [AutoCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

@ZYRACX ZYRACX added bug Something isn't working crash An issue that could cause a crash labels May 13, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant