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

crash canvas in bun #10587

Closed
rober-tm opened this issue Apr 27, 2024 · 3 comments
Closed

crash canvas in bun #10587

rober-tm opened this issue Apr 27, 2024 · 3 comments
Labels
bug Something isn't working crash An issue that could cause a crash

Comments

@rober-tm
Copy link

How can we reproduce the crash?

La aplicacion escanea archivos pdf, los conierte a png y pasa un ocr para extraer informacion.

este es el pj

{
"name": "bot_pdf_ocr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"canvas": "^2.11.2",
"fs-extra": "^11.2.0",
"jsqr": "^1.4.0",
"node-poppler": "^7.2.0",
"os": "^0.1.2",
"pdf-lib": "^1.17.1",
"pdf-poppler": "^0.2.1",
"playwright": "^1.43.1",
"pngjs": "^7.0.0",
"samba-client": "^7.2.0",
"smb2": "^0.2.11",
"sqlite3": "^5.1.7",
"tesseract.js": "^5.0.5"
}
}

Relevant log output

PS C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr> bun run .\bot_ocr.js
1 | 'use strict'
2 | 
3 | const bindings = require('../build/Release/canvas.node')
          ^
TypeError: LoadLibrary failed: Error en una rutina de inicialización de 
      at C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr\node_modules\canvas\lib\bindings.js:3:7
      at C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr\node_modules\canvas\lib\canvas.js:9:7
      at C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr\node_modules\canvas\index.js:1:7
      at C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr\bot_ocr.js:7:26
============================================================
Bun v1.1.5 (b257a309) Windows x64
Args: "C:\Users\rober\.bun\bin\bun.exe", "run", ".\bot_ocr.js"
Builtins: "bun:main" "node:child_process" "node:events" "node:fs" "node:module" "node:path" "node:string_decoder" "node:util" "node:util/types" "node:worker_threads" "node-fetch" 
Elapsed: 236ms | User: 15ms | Sys: 15ms
RSS: 0.14GB | Peak: 0.14GB | Commit: 0.17GB | Faults: 34800

panic(main thread): Segmentation fault at address 0x7FF9959D0E38
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/wr1b257a30AA_CU\ntdll.dll4ppUCU\ntdll.dllu/nUCU\ntdll.dll6pmUCa\KERNEL32.DLL26/FCa\ucrtbase.dllwt/GCa\ucrtbase.dllypgH+8roFkw/Bwj8wGA2y//Bx84rsqD

PS C:\Users\rober\OneDrive\Cursos\bot_pdf_ocr>

Stack Trace (bun.report)

Bun v1.1.5 (#10527) on windows x86_64 [RunCommand]

Segmentation fault at address 0x7FFDF4FF6328

  • 1 unknown/js code
  • ??? at 0x5129c in /ntdll.dll
  • ??? at 0x50ff7 in /ntdll.dll
  • ??? at 0x50c9d in /ntdll.dll
  • ??? at 0x17fab in /KERNEL32.DLL
  • ??? at 0x1bed8 in /ucrtbase.dll
  • ??? at 0x1c099 in /ucrtbase.dll
  • start.zig:484: main
  • Global.zig:97: exit
  • event_loop.zig:634: performGC
@rober-tm rober-tm added bug Something isn't working crash An issue that could cause a crash labels Apr 27, 2024
@loudar
Copy link

loudar commented Jun 13, 2024

Also getting this error:

1 | 'use strict'
2 |
3 | const bindings = require('../build/Release/canvas.node')
          ^
TypeError: LoadLibrary failed: A dynamic link library (DLL) in
      at C:\myproject\node_modules\canvas\lib\bindings.js:3:7
      at C:\myproject\node_modules\canvas\lib\canvas.js:9:7
      at C:\myproject\node_modules\canvas\index.js:1:7
      at freshRequire (C:\myproject\node_modules\chartjs-node-canvas\dist\freshRequire.js:9:22)
      at new ChartJSNodeCanvas (C:\myproject\node_modules\chartjs-node-canvas\dist\index.js:24:28)
      at renderAndSaveGraph (C:\myproject\src\generators\DataAnalysis.ts:34:37)
Segmentation fault at address 0x7ffd92070e38
???:?:?: 0x7ffdaba2129b in ??? (ntdll.dll)
???:?:?: 0x7ffdaba20ff6 in ??? (ntdll.dll)
???:?:?: 0x7ffdaba20c9c in ??? (ntdll.dll)
???:?:?: 0x7ffdab657faa in ??? (KERNEL32.DLL)
???:?:?: 0x7ffda90bbed7 in ??? (ucrtbase.dll)
???:?:?: 0x7ffda90bc098 in ??? (ucrtbase.dll)
???:?:?: 0x7ff7dce0fd78 in ??? (bun.exe)
???:?:?: 0x7ff7dcb9263b in ??? (bun.exe)
???:?:?: 0x7ff7dced66ca in ??? (bun.exe)
???:?:?: 0x7ff7df32157a in ??? (bun.exe)
???:?:?: 0x7ff7dce0fc6e in ??? (bun.exe)
???:?:?: 0x7ff7dce3a420 in ??? (bun.exe)
???:?:?: 0x7ff7dce276d6 in ??? (bun.exe)
???:?:?: 0x7ff7dcb615fe in ??? (bun.exe)
???:?:?: 0x7ff7df6ecce3 in ??? (bun.exe)
???:?:?: 0x7ffdab65257c in ??? (KERNEL32.DLL)
???:?:?: 0x7ffdaba2aa47 in ??? (ntdll.dll)
{
  "name": "myproject",
  "version": "1.0.0",
  "description": "",
  "main": "dist/src/functions/*.js",
  "type": "module",
  "scripts": {
    "build": "tsc",
    "watch": "tsc -w",
    "clean": "rimraf dist",
    "prestart": "npm run clean && npm run build",
    "start": "func start",
  },
  "dependencies": {
    "@azure/cosmos": "^4.0.0",
    "@azure/functions": "^4.0.0",
    "@azure/storage-blob": "^12.17.0",
    "bun": "^1.1.12",
    "canvas": "^2.11.2",
    "chartjs-node-canvas": "^4.1.6",
    "dotenv": "^16.4.5",
    "random-words": "^2.0.1"
  },
  "devDependencies": {
    "@types/node": "18.x",
    "azure-functions-core-tools": "^4.x",
    "rimraf": "^5.0.0",
    "typescript": "^4.0.0"
  }
}

@Jarred-Sumner
Copy link
Collaborator

Duplicate of #5835

@Jarred-Sumner Jarred-Sumner marked this as a duplicate of #5835 Aug 8, 2024
@Jarred-Sumner
Copy link
Collaborator

Please follow along in #5835

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 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

3 participants