Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

viewportSize causes crash - 2.0 & Master #13201

Closed
BenjaminLeeMiller opened this issue May 4, 2015 · 1 comment
Closed

viewportSize causes crash - 2.0 & Master #13201

BenjaminLeeMiller opened this issue May 4, 2015 · 1 comment

Comments

@BenjaminLeeMiller
Copy link

I am just learning phantomJS so it is possible I am missing something and this isn't a real bug, but it seems to be.

I am following the instructions for taking a screenshot and wanted to change the viewportSize so that I could get the a screenshot that was more representative of the actual page as a user sees it. Here is the code I am using:

var page = require('webpage').create();
page.viewportSize = {width: 800, height: 800};
page.open('https://www.ruby-lang.org/en/documentation', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('ruby.png');
}
phantom.exit();
});

When I execute this script, i get:

Status: success
Assertion failed: (_consumed <= scratch_size), function _hb_coretext_shape, file src/hb-coretext.cc, line 764.
Abort trap: 6

I have tried building 2.0 from source, master from source, and brew installing PhantomJS. All produce the same result.

One interesting fact, if I drop the viewportSize to 400 x 400 or remove it, I instead get

libpng error: Read Error

Additionally, if I change the url to "https://www.ruby-lang.org/", the code runs without error, but no image gets generated.

This same code works fine if I switch the url to some other site such as http://www.askart.com/AskART/artists/search/Search_Repeat.aspx?searchtype=AUCTION_RECORDS&artist=111780

@vitallium
Copy link
Collaborator

Duplicate of #12918.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants