Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blew my node #1

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

Blew my node #1

metamindxx opened this issue Dec 1, 2010 · 1 comment

Comments

@metamindxx
Copy link

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants