Snapshot errors on 3.6.2 #10

Closed
tanepiper opened this Issue Dec 8, 2011 · 19 comments

Projects

None yet
@tanepiper

When trying to take a snapshot using function:

undefined:1
:true}Content-Le
                       ^
SyntaxError: Unexpected token C
    at Object.parse (native)
    at parse (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:36:22)
    at Socket.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:67:17)
    at TCP.onread (net.js:324:31)

When taking one in node inspector:

undefined:1
(length: 624814)
                       ^
SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/session.js:910:26
    at Object.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/callback.js:22:18)
    at parse (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:38:29)
    at Socket.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:67:17)
    at TCP.onread (net.js:324:31)

On node 0.6.5 on Ubuntu 11.10 32bit with latest node-inspector from npm

@Stanley
Stanley commented Jan 1, 2012

+1

@jlporter

I am getting this error as well.

@DBarney
DBarney commented Feb 2, 2012

+1

It also seems that some of the JSON encoding is way off:

{"lowlevels":{},"entries":{},"children":{"743263520":{"743116136":{"constructorName":"native runtime.js","count":679},"743137288":{"constructorName":"input","count":124},"743137440":{"constructorName":"// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// "Software"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n.......

and the rest I omitted, but as you can see it seems to be JSON encoding a .js source file as the name of a constructor :)
Not sure if that is what it should be sending across.

@rashfael
rashfael commented Feb 9, 2012

+1

@mauritslamers

+1
node itself also prints "Error 0" on stdout.

@tanepiper

@dannycoates - thanks for the fix on NPM now - however still getting issues with this. If I try to take a snapshot with the API - my snapshot appears in node-profiler, however has no data appearing. If I try invoke one from node-inspector still getting issues like this:

undefined:1
(length: 617719)
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at /usr/local/lib/node_modules/node-inspector/lib/session.js:910:26
at Object. (/usr/local/lib/node_modules/node-inspector/lib/callback.js:22:18)
at parse (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:38:29)
at Socket. (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:114:5)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:342:31)

@dannycoates
Member

V8's snapshot data structures have fundamentally changed and aren't compatible with the current version of node-inspector. I hope to update inspector soon.

@tanepiper

Ok, thanks for the update - I'll look forward to seeing it in a future version, until then I'll hold on :)

@robertpitt

Exact same issue here, ETA on a fix?

@acheshkov

the same problem.

@c4milo
Contributor
c4milo commented Mar 22, 2012

@dannycoates how are you updating front-end? does it have custom changes? from what webkit's version or revision are you pulling it from?

@samccone
samccone commented Apr 9, 2012

+1

@c4milo
Contributor
c4milo commented Apr 9, 2012

well, since v8-profiler and node-inspector seems to be really inactive I came up with my own module, it allows to do cpu and heap profiling as for now. Check out it https://github.com/c4milo/node-webkit-agent

@ando-takahiro

Hi, I researched this issue.

At first, following message is

undefined:1
(length: 617719)
^

made by this(https://github.com/dannycoates/node-inspector/blob/master/lib/session.js#L123). This configuration limits message size, so responsed JSON was broken, and node-inspector crashed.

I modified configure to escape this problem. That's works good. node-inspector keep alive. But I met an another problem. Front end of node-inspector(https://github.com/dannycoates/node-inspector/tree/master/front-end) can't treat new heap JSON message. I tried to replace these from latest Chromium. But... it's difficult for me.

Finally I gave up this problem.

@brechindo

+1

Just encountered exact same taking snapshot via node-inspector. I guess node-inspector is falling behind, from reading the above. B-( Too bad, it's an excellent tool otherwise.

@cortfr
cortfr commented May 14, 2012

+1

@samccone

@all this is what i ended up using ... it worked great

https://github.com/c4milo/node-webkit-agent

@spollack

+1

@3y3
Member
3y3 commented Apr 3, 2014

Node Inspector community starts resurrection of project. Please, confirm your issue on last version.

@3y3 3y3 closed this Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment