【发布时间】:2016-02-27 02:52:25
【问题描述】:
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.
当我使用 casperJS 递归打开新页面时,随机弹出此错误。这并不是随机的,它会在几次迭代后出现(可能是 50 次左右)。
我不认为这是内存泄漏,因为我在运行脚本时正在监视内存使用情况,并且已经关闭了所有繁重的内存应用程序。
我看到有人在 github 上报告这个问题,但我认为它还没有修复。
有没有办法让我的机器在检测到崩溃后重新运行 Casper 脚本? (即检测到崩溃后自动运行 $casperjs run.js)
我正在考虑使用 shell 脚本来执行此操作,但不确定如何检测崩溃。
当然,任何关于修复此崩溃的想法也很好。
不确定这是否有帮助,但我也将我的 Casper 代码放在这里:
var runCasper = function(){
casper.start('https://www.example.com', function() {
// Do something
});
casper.then(function() {
// Do something
runCasper();
});
casper.run();
}
【问题讨论】:
标签: javascript phantomjs casperjs