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

Strange behavior in Node debugger (REPL) #36

Closed
svlapin opened this issue Oct 9, 2015 · 1 comment
Closed

Strange behavior in Node debugger (REPL) #36

svlapin opened this issue Oct 9, 2015 · 1 comment

Comments

@svlapin
Copy link

svlapin commented Oct 9, 2015

Hello,

first of all, thanks for amazing module!
I pretty enjoy it and everything works awesome until I try to do some things in Node debugger.

Consider the following trivial snippet (test.js):

var Curl = require('node-libcurl').Curl;

var curl = new Curl();

debugger;

Run it in debugger mode:

$ node debug test.js

And after pressing c to continue, get stopped at the breakpoint. Type repl + Enter, get into REPL console.
Type curl and hit Enter, and get the error:

node: ../node_modules/nan/nan_object_wrap.h:33: static T* Nan::ObjectWrap::Unwrap(v8::Local<v8::Object>) [with T = NodeLibcurl::Easy]: Assertion `object->InternalFieldCount() > 0' failed.
program terminated

I guess it happens because debugger tries to obtain some internal structure of the Curl instance.

Also, that does not reproduce if I start in REPL from the very beginning:

$ node
> new (require('node-libcurl').Curl)()
Curl {
  domain: 
   Domain {
     domain: null,
     _events: { error: [Function] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] },
  _events: {},
  _eventsCount: 0,
  _maxListeners: undefined,
  _handle: Easy { onData: [Function: bound ], onHeader: [Function: bound ] },
  _id: 1,
  _chunks: [],
  _headerChunks: [],
  _chunksLength: 0,
  _headerChunksLength: 0,
  _isRunning: false,
  _features: 0,
  onData: null,
  onHeader: null }

Thanks.

@svlapin svlapin changed the title Strange behavior in Node debugger Strange behavior in Node debugger (REPL) Oct 9, 2015
@JCMais
Copy link
Owner

JCMais commented Oct 9, 2015

Hi, thanks for the report.

From what I can see, this is a bug with node itself, see this issue: nodejs/node-v0.x-archive#9028

Closing this, since it's not something I can fix from here.

@JCMais JCMais closed this as completed Oct 9, 2015
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