Open davethegr8 opened 11 years ago
The hardcoded paths you see above are not related to the segfault -- those are just locations where the debugging symbols could be if they were needed. If they aren't available, nothing bad will happen. Maybe you can run a gdb trace to see where it died on?
Either that's succeeding where regular gdb isn't... or I'm doing something wrong. I can't seem to figure out the gdb trace usage. For context, here is my program:
var Chimera = require('chimera').Chimera;
var c = new Chimera();
c.perform({
url: "http://www.google.com",
locals: {
},
run: function(callback) {
callback(null, "success");
},
callback: function(err, result) {
// capture a screen shot
c.capture("screenshot.png");
}
});
Chimera is installed in the node_modules folder in the same directory.
+1 same problem.
Interesting.
I had the line request = require 'request'
in the same file I use Chimera.
Commenting it out fixed the issue.
Seeing as Chimera needs "request": "~2.12.0"
, it must break with the newer version of request 2.22
.
Full stack on Debian Sid amd64
#0 0x00007ffff553991a in QString::fromLocal8Bit (str=0x4 <Address 0x4 out of bounds>, size=size@entry=-1) at tools/qstring.cpp:3960
#1 0x00007ffff55f80e1 in QCoreApplication::arguments () at kernel/qcoreapplication.cpp:2339
#2 0x00007ffff4a0f45a in sm_performSaveYourself (smd=0x902150) at kernel/qapplication_x11.cpp:5754
#3 0x00007ffff4a0fff5 in sm_saveYourselfCallback (smcConn=<optimized out>, clientData=<optimized out>, saveType=<optimized out>, shutdown=<optimized out>, interactStyle=<optimized out>)
at kernel/qapplication_x11.cpp:5737
#4 0x00007fffed75ad2f in _SmcProcessMessage () from /usr/lib/x86_64-linux-gnu/libSM.so.6
#5 0x00007fffed54c8a6 in IceProcessMessages () from /usr/lib/x86_64-linux-gnu/libICE.so.6
#6 0x00007ffff560a4c8 in QMetaObject::activate (sender=sender@entry=0x905b50, m=m@entry=0x7ffff5959a40 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0,
argv=argv@entry=0x7fffffffd490) at kernel/qobject.cpp:3547
#7 0x00007ffff5654f2e in QSocketNotifier::activated (this=this@entry=0x905b50, _t1=20) at .moc/release-shared/moc_qsocketnotifier.cpp:102
#8 0x00007ffff56132ab in QSocketNotifier::event (this=0x905b50, e=0x7fffffffd780) at kernel/qsocketnotifier.cpp:316
#9 0x00007ffff499675c in QApplicationPrivate::notify_helper (this=this@entry=0x7e39c0, receiver=receiver@entry=0x905b50, e=e@entry=0x7fffffffd780) at kernel/qapplication.cpp:4567
#10 0x00007ffff499cdd0 in QApplication::notify (this=0x7e3230, receiver=0x905b50, e=0x7fffffffd780) at kernel/qapplication.cpp:4353
#11 0x00007ffff55f633d in QCoreApplication::notifyInternal (this=0x7e3230, receiver=0x905b50, event=event@entry=0x7fffffffd780) at kernel/qcoreapplication.cpp:949
#12 0x00007ffff5624110 in sendEvent (event=0x7fffffffd780, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#13 socketNotifierSourceDispatch (source=0x7e5190) at kernel/qeventdispatcher_glib.cpp:110
#14 0x00007ffff41cdea6 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff41ce1f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff41ce29c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007ffff56234b5 in QEventDispatcherGlib::processEvents (this=0x7e4e00, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#18 0x00007ffff4a34896 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#19 0x00007ffff55f9d7f in QCoreApplication::processEvents (flags=...) at kernel/qcoreapplication.cpp:1136
#20 0x00007ffff5964882 in ProcessEvents(v8::Arguments const&) () from /tmp/node_modules/chimera/build/Release/chimera.node
#21 0x00007ffff7440d43 in ?? () from /usr/lib/libv8.so.3.14.5
#22 0x00003c29cf606362 in ?? ()
#23 0x00007fffffffdae0 in ?? ()
#24 0x00003c29cf6062c1 in ?? ()
#25 0x00007fffffffdaa0 in ?? ()
#26 0x00007fffffffdb00 in ?? ()
#27 0x00003c29cf6123f8 in ?? ()
#28 0x00002be18f26bc59 in ?? ()
#29 0x00001bd6fbfdcee1 in ?? ()
#30 0x0000000000000000 in ?? ()
I think this is because you initialized QApplication
with:
int argc = 0;
char ** argv = NULL;
So QCoreApplication::arguments()
gets invalid strings.
Find out why:
QApplication
takes int& argc
as a reference, so it should not be a local variable.
Change int argc
to a static or global variable solves this problem.
Trying out chimera today, and I'm getting the Seg Fault: 11 error others have reported. I used
npm install chimera
just a few minutes ago. I tried doinggdb node
to run my script, and this is the result:Looks like there are some hardcoded paths for libraries preventing chimera from running (my user is not catch23)?