When using ge.createTimeStamp(id) and createTimeSpan(id), id must be a
unique identifier and must always be different each time you call the
function. If you fail to do this, you will get (at least) an NPObject
error. I just give it a current UNIX timestamp, but that may not work
in some situations.
var d = new Date();
var tspan = ge.createTimeStamp(d.getTime().toString());
The same issue annoyed me for quite a while.