missing stack in uncaught exception?

63 views
Skip to first unread message

Stefano Pugnetti

unread,
Jan 13, 2015, 11:21:44 AM1/13/15
to nod...@googlegroups.com
Hi!

I am quite new to node.js; my program (basically an infinite loop to operate a hardware controller) halts in a way I can't reproduce deterministically, with just this on the console:

undefined:0


TypeError: undefined is not a function

No stack trace, no clue about the source.
On some occasions it even stopped with no error at all. I tried running node with a --trace-exception, no difference.
I tried some inspection setting process.on('uncaughtException',...) , but it looks like the "stack" property of the exception is just empty.
I also looked at v8.log, calling node with --log-all; and tried node-inspector (but it is of little help since I have no clue about what to inspect)
The node version I'm using: 0.10.33

Is there a way to get some more information?

Unfortunately I can't post a simple code snippet to reproduce the problem, I am using quite complex libraries (Clojurescript and core.async, with transducers) and I still have no idea about which of these tools might be involved.

Thanks!

Jimb Esser

unread,
Jan 16, 2015, 6:36:36 PM1/16/15
to nod...@googlegroups.com
This probably won't help much, but I seem to recall also getting this kind of error, and, though I'm not certain, I think it may have came from passing undefined as a callback to a native library function (hence no stack if the first JS function call on the stack is, in fact, undefined).

Darshit Shah

unread,
Jan 17, 2015, 1:16:32 AM1/17/15
to nod...@googlegroups.com
In my program also I have handled all uncaught exceptions using process.on('uncaughtException'). And I was unable to get any stack trace for exception got in this function. So to debug that problem, I need to comment out process.on portion of the code and then proper stack trace was printed on screen.

Hope that helps.

Stefano Pugnetti

unread,
Jan 19, 2015, 4:35:16 AM1/19/15
to nod...@googlegroups.com
Thanks Jimb!
In the meanwhile I've indeed found that the problem is with a node extension I wrote in C++, though I still don't know what's wrong exactly (it is not deterministic).

Stefano Pugnetti

unread,
Jan 19, 2015, 4:36:53 AM1/19/15
to nod...@googlegroups.com
Thanks Darshit!
In my program I am not catching uncaught exceptions with process.on, so this is not the point. I think Jimb's observation explains the empty stack.
Reply all
Reply to author
Forward
0 new messages