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

Node process exits trying to load image #1285

Closed
Peter-Maguire opened this issue Oct 21, 2018 · 7 comments
Closed

Node process exits trying to load image #1285

Peter-Maguire opened this issue Oct 21, 2018 · 7 comments

Comments

@Peter-Maguire
Copy link

Issue or Feature

node.js process exits with no error after attempting to load an image. I think it's a memory issue but there is no error message.

Steps to Reproduce

Run the code below. In theory, you should see "image loaded" and "keeping the process alive" every second, however neither of these happen and the process exits with no error.

const canvas  = require('canvas');
setInterval(function(){
    console.log("Keeping the process alive");
}, 100);
canvas.loadImage("https://static1.squarespace.com/static/55e48783e4b0b05d86d82227/t/59d2f11af5e2315077b900bb/1506996537700/IMG_0293.JPG").then(function(image){
    console.log("image loaded");
}).catch(function(){
    console.log("error");
    console.log(arguments);
});

Your Environment

  • node-canvas 2.0.1
  • node v8.5.0
  • Windows 10 64-bit Version 1709 Build 16299.125
@Hakerh400
Copy link
Contributor

Unable to reproduce the issue using Windows 10 64-bit, Node.js v8.5.0 and node-canvas 2.0.1 built from master. Observed message image loaded and Keeping the process alive keeps logging, as expected.

What is the output of echo %errorlevel% after node crashes?

@Peter-Maguire
Copy link
Author

-1066598273

@Hakerh400
Copy link
Contributor

Thanks. This issue may not be related to node-canvas directly. According to MSDN, the error -1066598273 (aka 0xc06d007f) is probably caused by an antivirus interfering with applications. Please try to

  • Disable antivirus and/or firewall
  • Set UAC level to 0

Also try to download the image using a browser and load it locally in node-canvas.

@Peter-Maguire
Copy link
Author

Disabled antivirus and set UAC to 0, also downloaded the image and attempted to load it locally, with the issue and same error level

@zbjornson
Copy link
Collaborator

zbjornson commented Oct 22, 2018

I found one Google result that happened to have the same error code from Node.js that might be the annoying __ZN2v87Isolate19CheckMemoryPressureEv bug (google/googletest#1277). Could you try Node.js v8.12.0 please?

(See also #1284 and linked issue.)

@zbjornson
Copy link
Collaborator

Sorry, too early for me. ☕️ That might be the "procedure not found" bug vs. the "symbol not found" bug. The former could be node-gfx/node-canvas-prebuilt#55, which seems to only happen with prebuilds in some scenarios that I haven't narrowed down yet.

@Peter-Maguire
Copy link
Author

Wow, good catch - that fixed it! Thanks to both of you.

@zbjornson zbjornson changed the title Node process exists trying to load image Node process exits trying to load image Oct 23, 2018
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

3 participants