Closed enricoangelon closed 1 year ago
@HerryYT I suspect the issue is that when we use console.log
to print out the node, the native API attempts to convert the entire heap's ArrayBuffer to a string, which can be quite large and causes an error in the node.js runtime. To confirm the theory, could you please try using the following code instead and see if it gets the same error?
const heap = await takeNodeMinimalHeap();
console.log(heap.getAnyObjectWithClassName('Player').name);
I can confirm your theory.
parsing C:\Users\xxxx\AppData\Local\Temp\memlab-10864-1674325743401-1\nodejs-7124678321121458.heapsnapshot ...
calculating basic meta info...
building reference index...
building referrers index...
propagating detachedness state...
building node index...
building location index...
building extra meta info...
identifying snapshot engine...
Player
Sample code I am using:
Stack trace:
calculating basic meta info... building reference index... building referrers index... propagating detachedness state... building node index... building location index... building extra meta info... identifying snapshot engine...