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

[Bug]: Fatal error in V8: v8 ArrayBuffer NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox. #735

Open
pablohpsilva-forjnetwork opened this issue Apr 3, 2023 · 1 comment

Comments

@pablohpsilva-forjnetwork
Copy link

pablohpsilva-forjnetwork commented Apr 3, 2023

After rebuilding robotjs for Electron 21+, I have an error whenever I try to robotjs.screen.capture.
More information can be found in this Electron issue on github.

Expected Behavior

It should simply work as intended in older Electron versions.

Current Behavior

The following error appears whenever I call robotjs.screen.capture:

Fatal error in V8: v8 ArrayBuffer NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox.

Steps to Reproduce (for bugs)

  1. Electron latest
  2. Rebuild robotjs for electron
  3. Call robotjs.screen.capture
  4. An error is thrown

Context

I was trying to take a screenshot using the x,y,width,height solution robotjs provides so I could try to run tesseract on the returned buffer.

Your Environment

  • RobotJS version: lastest
  • Node.js version: lastest
  • npm version: lastest
  • Operating System: MacOS
  • Electron: latest
@s1hofmann
Copy link

The underlying code for screen.capture does not allocate it’s own memory but forwards the one allocated by the corresponding capture function.

nut-tree/nut.js properly copies allocated memory to the addons address space, thus it does not have this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants