c4milo / node-webkit-agent

NodeJS agent for WebKit devtools front-end
http://c4milo.github.io/node-webkit-agent/
1.09k stars 78 forks source link

Symbol Lookup Error while CPU profiling #31

Closed mike-lang closed 11 years ago

mike-lang commented 11 years ago

I seem to be unable to perform any CPU profiling using the node-webkit-agent. When I click the stop button within the Chrome devtools client to finish recording a CPU profile, I see the following error come out of my app and the app crashes:

node: symbol lookup error: /home/iron/browzine_cms_dev/node_modules/webkit-devtools-agent/node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZN2v814ObjectTemplate11SetAccessorENS_6HandleINS_6StringEEEPFNS1_INS_5ValueEEENS_5LocalIS2_EERKNS_12AccessorInfoEEPFvS7_NS6_IS4_EESA_ES5_NS_13AccessControlENS_17PropertyAttributeE

Is anyone else seeing this error?

I am running node v0.8.20 and have v0.1.1 of the devtools agent

c4milo commented 11 years ago

strange, I just tested in v0.8.24 using http://c4milo.github.io/node-webkit-agent/26.0.1410.65/inspector.html?host=localhost:9999&page=0 and it worked fine:

camilo@grinch-2 /tmp % rm -rf node_modules
camilo@grinch-2 /tmp % npm install webkit-devtools-agent
npm http GET https://registry.npmjs.org/webkit-devtools-agent
npm http 304 https://registry.npmjs.org/webkit-devtools-agent
npm http GET https://registry.npmjs.org/ws/0.4.25
npm http GET https://registry.npmjs.org/underscore/1.3.3
npm WARN package.json v8-profiler@4.0.0 No repository field.
npm http 304 https://registry.npmjs.org/underscore/1.3.3
npm http 304 https://registry.npmjs.org/ws/0.4.25

> v8-profiler@4.0.0 install /private/tmp/node_modules/webkit-devtools-agent/node_modules/v8-profiler
> node-gyp rebuild

npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
gyp http GET http://nodejs.org/dist/v0.8.24/node-v0.8.24.tar.gz
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/commander

> ws@0.4.25 install /private/tmp/node_modules/webkit-devtools-agent/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

gyp http 200 http://nodejs.org/dist/v0.8.24/node-v0.8.24.tar.gz

  CXX(target) Release/obj.target/profiler/cpu_profiler.o
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  CXX(target) Release/obj.target/profiler/heap_profiler.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  CXX(target) Release/obj.target/profiler/profile.o
  CXX(target) Release/obj.target/profiler/profile_node.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
  CXX(target) Release/obj.target/profiler/profiler.o
  CXX(target) Release/obj.target/profiler/snapshot.o
  SOLINK_MODULE(target) Release/profiler.node
  SOLINK_MODULE(target) Release/profiler.node: Finished

> v8-profiler@4.0.0 postinstall /private/tmp/node_modules/webkit-devtools-agent/node_modules/v8-profiler
> ln -sf build/Release/profiler.node profiler.node

webkit-devtools-agent@0.1.1 node_modules/webkit-devtools-agent
├── underscore@1.3.3
├── ws@0.4.25 (tinycolor@0.0.1, options@0.0.5, commander@0.6.1)
└── v8-profiler@4.0.0
camilo@grinch-2 /tmp %
camilo@grinch-2 /tmp %
camilo@grinch-2 /tmp %
camilo@grinch-2 /tmp % cd node_modules
camilo@grinch-2 /tmp/node_modules % ls
webkit-devtools-agent
camilo@grinch-2 /tmp/node_modules % cd webkit-devtools-agent
camilo@grinch-2 /tmp/node_modules/webkit-devtools-agent % ls
README.md                index.js                 lib                      node_modules             package.json             t.js                     webkit-devtools-agent.js

camilo@grinch-2 /tmp/node_modules/webkit-devtools-agent % node index.js
webkit-devtools-agent: Spawning websocket service process...
webkit-devtools-agent: A proxy got connected.
webkit-devtools-agent: Waiting for commands...
webkit-devtools-agent: Websockets service started on 0.0.0.0:9999
webkit-devtools-agent: new frontend connection!

Timeline.supportsFrameInstrumentation is not implemented
Timeline.canMonitorMainThread is not implemented
CSS.getSupportedCSSProperties is not implemented
Network.enable is not implemented
Network.enable is not implemented
Page.getResourceTree is not implemented
CSS.enable is not implemented
Database.enable is not implemented
DOMStorage.enable is not implemented
c4milo commented 11 years ago

testing now in v0.8.20...

c4milo commented 11 years ago

same result in v0.8.20. Are you using unix or windows?

mike-lang commented 11 years ago

Hi, thanks for the speedy reply!

I'm running on CentOS 6.3

c4milo commented 11 years ago

would it be possible for you to upgrade to 0.8.24? that's the latest stable version in the 0.8.x branch.

mike-lang commented 11 years ago

Probably. Let me give that a try. You are starting and stopping a CPU profiling session in your tests, right? It's not until I stop the profiler that it blows up.

mike-lang commented 11 years ago

My apologies. You can disregard. In the process of switching versions I discovered the npm install of the v8-profiler was choking due to an issue specific to my system. Corrected that and it appears to work as intended in v0.8.24.

Thanks for your help!

c4milo commented 11 years ago

cool, I'm glad you figured it out @mike-lang