Blew my node #1

Open
metamindxx opened this Issue Dec 1, 2010 · 1 comment

Projects

None yet

2 participants

@metamindxx

HI,

Eyes blew my node (FATAL ERROR: Allocation failed - process out of memory) when I pointed it at a large object with circular refs.

I guess it doesn't check for circular refs? Or maybe it should stop iterating when it reaches its max string length?

It would be great to have a "max depth" option as well 8-)

@assaf
assaf commented Dec 17, 2011

I have the same problem. We 're using Vows which uses Eyes to inspect objects when assertions fail. For smaller objects this is wonderful, it's easy to spot an error in the wonderful Eyes output.

For medium sized objects, it just takes over the terminal buffer. For large objects, it starts eating up CPU, gets the fan all excited and busy, and then crashes Node.

Aa far as I could tell, this is not caused by circular references: I added trace statements and the stack level never got deeper than 50. I suspect the issue is in converting a large object into an even larger string. Perhaps a size limit of Node.js strings.

At any rate, even before we get to the "inspect of death", I never found dumping large objects in full that useful, but would still like to keep using Eyes. What about a global option to limit by depth or number of lines?

I would prefer to set the limit by number of lines, so deep by small objects can print in full, while large and shallow objects don't take up the entire terminal buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment