Skip to content

Expression: object->InternalFieldCount() > 0 #855

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

Closed
svantonov opened this issue Dec 6, 2016 · 12 comments
Closed

Expression: object->InternalFieldCount() > 0 #855

svantonov opened this issue Dec 6, 2016 · 12 comments

Comments

@svantonov
Copy link

svantonov commented Dec 6, 2016

Steps to Reproduce

var Canvas = require('canvas');
var canvas = new Canvas(200, 200);
...

Error

Assertion failed!

Program: ...\node_modules\canvas\build\Release\canvas.node
File: ...\node_modules\nan\nan_object_wrap.h

Expression: object->InternalFieldCount() > 0
....

Environment

  • Version of node-canvas (e.g. v1.6.2):
  • Environment (e.g. node v6.9.1 (x64) on Windows 10):
@zbjornson
Copy link
Collaborator

This is fixed by #808 :-)

@svantonov
Copy link
Author

I used installing instructions for Windows and nothing changed in node-canvas code.
Node installer download from official website.
Is fix already applied to v1.6.2 release?

@zbjornson
Copy link
Collaborator

Ah, sorry for not being clear. #808 is not merged into master yet.

The other people who have reported this problem only got the assertion failure while a debugger was attached. If you need an immediate fix, you could use the branch for #808 (npm install github:zbjornson/node-canvas#prototype-fix), or try not using a debugger if you're using one...

@svantonov
Copy link
Author

Thank you. But this fix just halt application (in debug mode) without any message.
I used debug mode with Visual Studio Code.
Application works without debug.

@zbjornson
Copy link
Collaborator

zbjornson commented Dec 8, 2016

OK, using my branch from #808, I can reproduce the failure with Visual Studio Code in both launch and attach modes if I put a breakpoint after your 1st line (procdump says 0xc0000005, access violation), but I cannot reproduce it with Visual Studio or with the node.js built-in debugger.

I don't know how VSCode's debugger works with node to try to troubleshoot this further, unfortunately. I can't tell if this is from node-canvas or vscode, but it's odd that it only happens wtih vscode's debugger.

@ip
Copy link

ip commented Jul 25, 2017

I'm experiencing the same problem:

image

It crashes on the line with new Canvas(...) and this is not specific to VS Code or which Node.js debugging protocol is used. I tried it also with node-inspector.

@zbjornson
Copy link
Collaborator

Oops, I had a typo in PR #808 -- it should have said "Fixes #855" (this issue). This is fixed in 2.0-alpha.

@webworker01
Copy link

webworker01 commented Nov 5, 2017

Hello I am receiving this error on [email protected]

@zbjornson
Copy link
Collaborator

@webworker01 is there a particular line of your code that causes it to happen?

@feuerste
Copy link

@zbjornson would it be a lot of effort to backport PR #808 into the 1.x series?

@RedGlow
Copy link

RedGlow commented Jul 19, 2018

I still get this bug with 1.6.11 under Windows with debugger attached.

@zbjornson
Copy link
Collaborator

@RedGlow this is fixed in 2.x. I don't have plans at the moment to backport it to 1.x, as I think/hope 2.x will be out of alpha shortly.

I left this open because @webworker01 reported a crash in 2.0.0-alpha.5, but I haven't heard back, so will close now.

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

No branches or pull requests

6 participants