Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
This error pops up randomly when I am recursively opening a new page using casperJS. It's not all that random, it shows up after a couple of iterations (maybe around 50).
I don't think it's a memory leak, because I am monitoring the memory usage while running the script, and have closed all the heavy memory applications.
I've seen people reporting this issue on github, but I don't think it has a fix yet.
Is there a way I can let my machine to rerun Casper script after it detects a crash? (i.e. auto run $casperjs run.js after it detects the crash)
I was thinking to use shell script to do this, but not sure exactly how to detect the crash.
Of course, any ideas on fixing this crash would be good too.
Not sure if this helps, but I am putting my Casper code here too:
var runCasper = function(){
casper.start('https://www.example.com', function() {
// Do something
});
casper.then(function() {
// Do something
runCasper();
});
casper.run();
}