-
Notifications
You must be signed in to change notification settings - Fork 256
Description
versions
- SlimerJS: MarkR42/slimerjs#firefox60
- Firefox: 60
- Operating system: macOS
Steps to reproduce the issue
loop over list of urls
via child_process.spawn, start (max 6 simultaneous) slimerjs processes at a time.
1 in about 20 of these processes goes into error state segmentation fault.
Actual results:
.../node_modules/slimerjs/src/slimerjs: line 167: 30422 Segmentation fault: 11 "$SLIMERJSLAUNCHER" -app "$SLIMERDIR/application.ini"
Expected results:
each child process should exit with exit code 0
Code to loop over urls:
setInterval(function () { // loop over urls (about 1000 urls)
nrprocs = Number(childProcess.execSync(psCommand));
if (nrprocs < maxnrprocs) { // maxnrprocs = 6
var proc = childProcess.spawn(slimerCommand, ["singleshot.js",url,"--headless"]);
proc.on('error', (error) => {
console.error(${error});
Slimer code:
webpage.open(url);
webpage.onLoadFinished = function(status, url) {
if (status !== "success") {
console.log(${status} ${url});
} else {
setTimeout(function () { renderPage(); }, 500);
}
};
async function renderPage() {
webpage.clipRect = { top: 0, left: 0, width: halfwidth, height: height };
await appPage.render(filename, { format: "jpg", quality: 60 });
slimer.exit(0);
};