Capturing node-webgl applications
Hi,
I'm trying to run WebGL projects on the server using node-webgl and pipe them through ClusterGL to a big video wall.
I'm having trouble getting ClusterGL to work with Node though.
Generally either or both the capture process or the renderer processes crash with all the examples.
For example:
$ CGL_CONFIG_FILE=webgl.conf ./cgl-capture node ../../mikeseven-node-webgl/test/lesson02.js
[ mod_app.cpp: 572] XOpenDisplay (0, 0)
**********************************************
ClusterGL(renderer - capture)
**********************************************
[ config.cpp: 8] Loading configuration for 'capture' from '/home/parallels/clustergl/runtime/test.conf'
[ config.cpp: 160] Web configuration server started on port 8081
[ main.cpp: 69] Found output: 127.0.0.1:12345
[ main.cpp: 69] Found output: 127.0.0.1:12346
[ mod_app.cpp: 114] INIT AppModule
[ mod_netclient.cpp: 58] Connected to remote pipeline on 127.0.0.1:12345
[ mod_netclient.cpp: 58] Connected to remote pipeline on 127.0.0.1:12346
********************************************
Total over the last 1000ms:
ticks: 1
Average per tick over the last 1000ms:
mod_netclient write: 23584
********************************************
Status: Using GLEW 1.6.0
[ mod_app.cpp: 4780] Called testing stub GetProgramiv!
[ mod_app.cpp: 4767] Called testing stub GetAttribLocation!
[ mod_app.cpp: 4767] Called testing stub GetAttribLocation!
[ mod_app.cpp: 4838] Called untested stub GetUniformLocation!
[ mod_app.cpp: 4838] Called untested stub GetUniformLocation!
The capture process hangs at this point & both of the renderers have crashed with Segmentation fault (core dumped) (but no other output apart from the startup preamble & the connection message).
With other examples e.g.
$ ./cgl-capture node ../../mikeseven-node-webgl/examples/shadertoy/shadertoy.js
[ mod_app.cpp: 572] XOpenDisplay (0, 0)
**********************************************
ClusterGL(renderer - capture)
**********************************************
[ config.cpp: 8] Loading configuration for 'capture' from '/home/parallels/clustergl/runtime/test.conf'
[ config.cpp: 160] Web configuration server started on port 8081
[ main.cpp: 69] Found output: 127.0.0.1:12345
[ main.cpp: 69] Found output: 127.0.0.1:12346
[ mod_app.cpp: 114] INIT AppModule
[ mod_netclient.cpp: 58] Connected to remote pipeline on 127.0.0.1:12345
[ mod_netclient.cpp: 58] Connected to remote pipeline on 127.0.0.1:12346
********************************************
Total over the last 1000ms:
ticks: 1
Average per tick over the last 1000ms:
mod_netclient write: 26592
********************************************
Status: Using GLEW 1.6.0
I don't get the warnings about untested stubs but both the renderers crash anyway.
I'm running this on Ubuntu 12.04 within Parallels on Mac using the git HEAD version (odd setup I know).
What can I do to debug this?
I just got it to run under OS X and it crashed with the following stack trace:
Process: node [66906]
Path: /usr/local/bin/node
Identifier: node
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [66902]
Date/Time: 2013-04-25 15:36:39.102 +0100
OS Version: Mac OS X 10.7.5 (11G63b)
Report Version: 9
Interval Since Last Report: 13196 sec
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: 0124A4C3-338A-4E6F-A060-E7A136B500D9
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-00000001005d5000 [ 5972K] r-x/rwx SM=COW /usr/local/Cellar/node/0.10.1/bin/node
Application Specific Information:
objc[66906]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libcgl-capture.so 0x00000001007aa180 App::tick() + 64 (stl_vector.h:400)
1 libcgl-capture.so 0x00000001007b5771 glGetString + 177 (mod_app.cpp:227)
2 libglfw.dylib 0x000000012e4b1628 _glfwParseGLVersion + 30
3 libglfw.dylib 0x000000012e4b177b _glfwRefreshContextParams + 39
4 libglfw.dylib 0x000000012e4b385a glfwOpenWindow + 853
5 glfw.node 0x000000012e4a4000 glfw::OpenWindow(v8::Arguments const&) + 371 (glfw.cc:209)
6 node 0x0000000100161ca4 _ZN2v88internalL21Builtin_HandleApiCallENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 429
7 ??? 0x000002ab9f50618e 0 + 2936135508366
8 ??? 0x000002ab9f58a434 0 + 2936136049716
9 ??? 0x000002ab9f589fb1 0 + 2936136048561
10 ??? 0x000002ab9f589c78 0 + 2936136047736
11 ??? 0x000002ab9f563bc4 0 + 2936135891908
12 ??? 0x000002ab9f52851e 0 + 2936135648542
13 ??? 0x000002ab9f562db0 0 + 2936135888304
14 ??? 0x000002ab9f55dee5 0 + 2936135868133
15 ??? 0x000002ab9f559ff6 0 + 2936135852022
16 ??? 0x000002ab9f549567 0 + 2936135783783
17 ??? 0x000002ab9f548f2b 0 + 2936135782187
18 ??? 0x000002ab9f52ceb9 0 + 2936135667385
19 ??? 0x000002ab9f52c445 0 + 2936135664709
20 ??? 0x000002ab9f5245e7 0 + 2936135632359
21 ??? 0x000002ab9f5118b7 0 + 2936135555255
22 node 0x0000000100186253 _ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb + 375
23 node 0x0000000100142628 v8::Function::Call(v8::Handle<v8::Object>, int, v8::Handle<v8::Value>*) + 404
24 node 0x0000000100008ff2 node::Load(v8::Handle<v8::Object>) + 268
25 node 0x0000000100009af1 node::Start(int, char**) + 304
26 node 0x0000000100000bb4 start + 52