Skip to content
New issue

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

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

Already on GitHub? # to your account

segmentation fault errors #705

Open
marijndaniels opened this issue Jul 23, 2018 · 0 comments
Open

segmentation fault errors #705

marijndaniels opened this issue Jul 23, 2018 · 0 comments

Comments

@marijndaniels
Copy link

marijndaniels commented Jul 23, 2018

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" P R O F I L E n o r e m o t e " @" 2> /dev/null

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);
};

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant