Out of memory?

175 views
Skip to first unread message

Bill Hubbard

unread,
Jan 20, 2012, 4:51:09 PM1/20/12
to phantomjs
I have a script that collects a list of JavaScript applications
(written in ExtJS) and loads them one at a time to collect some
information about each one and save a screen shot (rendering). I had
a problem in version 1.3 where frequently, part way through, I would
get a dialog in the O.S. saying phantomjs.exe crashed. I had to run
the script several times, hoping it would eventually complete
successfully, and eventually it would.

I am now using 1.4.1 and cleaned up my script a bit to be more stable,
and now it runs consistently, but dies (at the same spot each time)
part way through. There are 74 apps that it cycles through, and it
dies on #54. No error message or anything - it just drops back to the
command prompt. I see memory piling up, so I have a memory leak
somewhere. I was just creating on WebPage and cycling through on
that, but it had trouble loading apps properly and would erratically
crash like before (only it would just hang), so now I have it create a
new WebPage for every app.

Is there any way to test if phantomjs.exe crashes (exit code return),
and are there any tips and tricks, bits of wisdom, for stepping
through multiple pages reliably in a phantomjs script? Right now I
have a state machine setup using onLoadFinished to process a page and
trigger the next page load.

Ariya Hidayat

unread,
Jan 20, 2012, 6:54:44 PM1/20/12
to phan...@googlegroups.com

Bill Hubbard

unread,
Feb 14, 2012, 7:19:28 PM2/14/12
to phantomjs
That did the trick! Thanks!
Reply all
Reply to author
Forward
0 new messages