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

Vite react typescript segmentation fault error during develompent build hot-reload #16419

Open
ProkhoDim opened this issue Jan 15, 2025 · 1 comment
Labels
crash An issue that could cause a crash macOS An issue that occurs on macOS runtime

Comments

@ProkhoDim
Copy link

How can we reproduce the crash?

I just hit 'r' button to force hot-reload of development build (because it cached some errors that may not exist) and got the error
Image

Relevant log output

$ bunx --bun vite --force
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
Forced re-optimization of dependencies
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.7.2

Please only submit bug reports when using the officially supported version.

=============

  VITE v5.4.11  ready in 2293 ms

  ➜  Local:   http://localhost:3001/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api


 ERROR(TypeScript)  'disabledMemberId' is declared but its value is never read.
 FILE  /Users/***/components/OrganizationInformation.tsx:36:9

    34 |   const isMemberIdSupported = lobMap[lobId]?.memberIdSupported;
    35 |
  > 36 |   const disabledMemberId = useMemo(() => {
       |         ^^^^^^^^^^^^^^^^
    37 |     // Disable if member ID is already set and matches the form value
    38 |     const currentMemberId = getValues('memberId');
    39 |     const customerMemberId =

[TypeScript] Found 1 error. Watching for file changes.
8:46:39 PM [vite] hmr update /components/OrganizationInformation.tsx 
8:46:44 PM [vite] hmr update /components/OrganizationInformationtsx (x2)

 ERROR(TypeScript)  'getValues' is declared but its value is never read.
 FILE  /Users/***/components/OrganizationInformation.tsx:20:30

    18 |
    19 | export default function OrganizationInformation({ formPack }: Props) {
  > 20 |   const { control, setValue, getValues } = formPack;
       |                              ^^^^^^^^^
    21 |
    22 |   const customerId = useWatch({ control, name: 'customerId' });
    23 |   const organizationId = useWatch({ control, name: 'organizationId' });

[TypeScript] Found 1 error. Watching for file changes.

[TypeScript] Found 0 errors. Watching for file changes.
 ERROR(ESLint)  'getValues' is assigned a value but never used. Allowed unused vars must match /^_/u. (@typescript-eslint/no-unused-vars)
 FILE  /Users/***/components/OrganizationInformation.tsx:20:30

    18 |
    19 | export default function OrganizationInformation({ formPack }: Props) {
  > 20 |   const { control, setValue, getValues } = formPack;
       |                              ^^^^^^^^^
    21 |
    22 |   const customerId = useWatch({ control, name: 'customerId' });
    23 |   const organizationId = useWatch({ control, name: 'organizationId' });

[ESLint] Found 1 error and 0 warning
r
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.7.2

Please only submit bug reports when using the officially supported version.

=============
============================================================
Bun v1.1.38 (bf2f153f) macOS Silicon
macOS v14.5
Args: "node" "/Users/****/node_modules/.bin/vite" "--force"
Features: Bun.stderr Bun.stdin(2) Bun.stdout dotenv(10) fetch(4) http_server jsc spawn(5) transpiler_cache(65) tsconfig(49) tsconfig_paths(3) workers_spawned(4) workers_terminated(2) process_dlopen(5) 
Builtins: "bun:jsc" "bun:main" "detect-libc" "node:assert" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "node:punycode" "ws" "node:v8" 
Elapsed: 119927ms | User: 115414ms | Sys: 32663ms
RSS: 6.97GB | Peak: 6.98GB | Commit: 0.42GB | Faults: 80

panic: Segmentation fault at address 0x5000000000008
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.38/Mn1bf2f153sBzv76/d____msv+2B+uj82B2szr2Bmoi7jC2gy+hB+hwgXA2gggUQ

error: script "start" was terminated by signal SIGTRAP (Trace or breakpoint trap)
[1]    99863 trace trap  bun start

Stack Trace (bun.report)

Bun v1.1.38 (bf2f153) on macos aarch64 [RunAsNodeCommand]

Segmentation fault at address 0x1E000000000008

  • 4 unknown/js code
  • JSC::PreciseAllocation::lastChanceToFinalize
  • JSC::MarkedSpace::lastChanceToFinalize
  • JSC::Heap::lastChanceToFinalize
  • JSC::VM::~VM
  • WebWorker__dispatchExit
  • src.bun.js.web_worker.WebWorker.exitAndDeinit

Features: workers_spawned, workers_terminated, process_dlopen, Bun.stdin, Bun.stdout, http_server, jsc, spawn, transpiler_cache, tsconfig

Sentry Issue: BUN-4R6

@ProkhoDim ProkhoDim added the crash An issue that could cause a crash label Jan 15, 2025
@github-actions github-actions bot added macOS An issue that occurs on macOS runtime labels Jan 15, 2025
Copy link
Contributor

@ProkhoDim, the latest version of Bun is v1.1.43, but this crash was reported on Bun v1.1.38.

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

bun upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash macOS An issue that occurs on macOS runtime
Projects
None yet
Development

No branches or pull requests

1 participant