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

Error while debugging #44

Closed
scriby opened this issue Dec 31, 2011 · 4 comments
Closed

Error while debugging #44

scriby opened this issue Dec 31, 2011 · 4 comments

Comments

@scriby
Copy link

scriby commented Dec 31, 2011

This printed on the console, then the program exited with error code 134.

node: fibers.cc:440: static v8::Handlev8::Value Fiber::GetStarted(v8::Localv8::String, const v8::AccessorInfo&): Assertion `info.This()->InternalFieldCount() == 1' failed.

I was inspecting a variable with the debugger when it occurred.

Just thought I'd pass this along,

Chris

@laverdet
Copy link
Owner

laverdet commented Jan 3, 2012

Is there an easy way to repro this?

@scriby
Copy link
Author

scriby commented Jan 5, 2012

Here's how to reproduce:

  1. Get a project set up with the asyncblock dependency
  2. Run the following code (the exact code doesn't matter, but this works):
var asyncTask = function(callback) {
    process.nextTick(function() {
        callback(null, 1, 2, 3);
    });
};

asyncblock(function(flow) {
    asyncTask(flow.add());
    flow.wait();
});
  1. I'm using the debugger built into the WebStorm editor, so if you can't reproduce in your environment, you might try installing it (it has a 30 day free trial)
  2. Set a breakpoint on the asyncTask(flow.add()); line, and step in there
  3. Once inside the asyncblock's flow.add method, try to inspect the contents of the "this" variable. I did this by right clicking -> evaluate expression -> "this" -> press enter -> expand the little triangle next to the variable
  4. At this point, the error is printed to the console:

Assertion failed: (info.This()->InternalFieldCount() == 1), function GetStarted, file fibers.cc, line 440.

Thanks,

Chris

@laverdet
Copy link
Owner

laverdet commented Jan 5, 2012

Yeah this can be repro'd with:

var fiber = new Fiber(function(){});
var fiber2 = Object.create(fiber);
console.log(fiber.started);

Not really sure how to fix it though. The accessor is called but with the wrong this. I'd have to walk down the prototype chain to find the right one. Doesn't seem worth it.. I guess I could throw instead of crashing the application though.

@scriby
Copy link
Author

scriby commented Jan 5, 2012

Ok. I don't think it's that big of a deal assuming it only affects the debugger.

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