viewdy / phantomjs2

Automatically exported from code.google.com/p/phantomjs
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

phantomjs gets stuck loading some pages #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On Windows XP, some pages cause phantomjs to become "stuck", never terminating.

For example, this works:
phantomjs.exe examples\loadspeed.js http://www.yahoo.com/
but this doesn't:
phantomjs.exe examples\loadspeed.js http://www.give2gether.com/
nor this one:
phantomjs.exe examples\loadspeed.js http://www.bankhapoalim.co.il/

Original issue reported on code.google.com by ishi...@gmail.com on 27 Jan 2011 at 4:18

GoogleCodeExporter commented 9 years ago
Seems to work fine on Mac OS X.

Original comment by ariya.hi...@gmail.com on 29 Jan 2011 at 7:47

GoogleCodeExporter commented 9 years ago
I can confirm that the first link works and the last two hang (on Windows).

Original comment by alessandro.portale on 29 Jan 2011 at 7:06

GoogleCodeExporter commented 9 years ago
All three links work well if I use Qt in non-static build (one .exe and some Qt 
.dlls). I assume that the both last links redirect to or reference resources 
via https, and I am now pretty sure that the static phantomjs.exe Windows 
binary does not support https.

I think, I will provide a dynamic build next time. The download is bigger, but 
the issues are less.

Original comment by alessandro.portale on 29 Jan 2011 at 7:23

GoogleCodeExporter commented 9 years ago
Could you retry with the attached phantomjs-1.0.0-win32-dynamic.zip?

Original comment by alessandro.portale on 29 Jan 2011 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
The attached version simply crashes. See attached screenshot.

Original comment by ishi...@gmail.com on 30 Jan 2011 at 7:34

Attachments:

GoogleCodeExporter commented 9 years ago
Interesting, does not happen on my Vista machine. If you don't mind, could you 
rename the "imageformats\" folder and retry?

Original comment by alessandro.portale on 30 Jan 2011 at 10:50

GoogleCodeExporter commented 9 years ago
After renaming the imageformats folder it no longer crashes, and no longer gets 
stuck on the two websites above.

Original comment by ishi...@gmail.com on 30 Jan 2011 at 10:57

GoogleCodeExporter commented 9 years ago
Thanks a lot! So, the hanging was certainly due to the static build.
For the crashing, I have a suspicion: I used UPX to compress the binaries (had 
to, because the attachment upload limit here is 10MB). That may have broken the 
plugin loading for some reason (on XP). So, no UPX for the next release.

If you don't mind I'll come back to you before PhantomJS 1.1 release, to make a 
smoke test for the Windows package :)

Original comment by alessandro.portale on 30 Jan 2011 at 11:05

GoogleCodeExporter commented 9 years ago
No problem, glad to help.

Original comment by ishi...@gmail.com on 30 Jan 2011 at 11:07

GoogleCodeExporter commented 9 years ago
Alessandro, maybe the configuration of Qt for the static build needs to be 
tweaked, e.g. no SVG, graphics view, and many other unnecessary options? But 
then, you may have done it already :)

Original comment by ariya.hi...@gmail.com on 30 Jan 2011 at 6:44

GoogleCodeExporter commented 9 years ago
This was my configure line, this time: -static -release -no-exceptions -no-stl 
-no-xmlpatterns -no-phonon -no-qt3support -no-style-cde -no-style-cleanlooks 
-no-style-motif -no-style-plastique -no-sql-sqlite
When I was younger, I also ripped out features like graphicsview, etc., but 
many combinations of disabled features often lead to broken builds because Qt's 
feature system is(was) not exactly well maintained (who builds statically, 
anyways).
QtSvg code may not even be contained in phantomjs.exe, since QtSvg is a module, 
and msvc strips dead code pretty well. I'll need to try it out, though.

Original comment by alessandro.portale on 30 Jan 2011 at 7:31

GoogleCodeExporter commented 9 years ago
Removing SVG as an 'unnecessary' option is not an idea that makes me happy. One 
of my main uses for phantomJS is working with SVG files. Please keep SVG 
support. 

Original comment by vbcam....@gmail.com on 3 Feb 2011 at 4:46

GoogleCodeExporter commented 9 years ago
-no-svg removes the support for http://doc.qt.nokia.com/4.7/qtsvg.html, nothing 
to do with WebKit built-in SVG support.

Original comment by ariya.hi...@gmail.com on 3 Feb 2011 at 4:55

GoogleCodeExporter commented 9 years ago
@ishirav: could you test if the dynamically built package of PhantomJS 1.1 runs 
crash-free on your system? http://cl.ly/2b2F1g1D0R1B2A2x0A2s
No UPX, this time, therefore the binaries are much bigger.
Thanks in advance :)

Original comment by alessandro.portale on 23 Apr 2011 at 2:31

GoogleCodeExporter commented 9 years ago
Experiencing some issues as well under Linux (latest build from Git), when 
trying to rasterize some sites. PhantomJS will just get stuck and grow to 100% 
CPU usage.

For example :
phantomjs examples/rasterize.js http://nodebeginner.org output.png

No problems with the issues reported by @ishirav, working fine here.

Original comment by fcam...@gmail.com on 31 May 2011 at 2:34

GoogleCodeExporter commented 9 years ago
Then you may be experiencing 
http://code.google.com/p/phantomjs/issues/detail?id=54 instead (should be fixed 
in master branch since a few days). Can you test if this call also hangs for 
you?
   phantomjs examples/rasterize.js http://nodebeginner.org output.pdf

Original comment by alessandro.portale on 31 May 2011 at 3:49

GoogleCodeExporter commented 9 years ago
I downloaded and compiled the latest version from the master branch and it's 
working fine now. Seems to be fixed indeed. Thanks.

The PDF test call is not hanging neither, though in this case, it's producing a 
1929 bytes file with no content.

Original comment by fcam...@gmail.com on 2 Jun 2011 at 8:59

GoogleCodeExporter commented 9 years ago
The PDF output depends Qt's PDF engine, it's there but not perfect. Feel free 
to create a separate issue for that.

Closing this one.

Original comment by ariya.hi...@gmail.com on 2 Jun 2011 at 10:15

GoogleCodeExporter commented 9 years ago
I just ran into this issue. The loadspeed.js file would hang on some websites 
at the 'loading' phase and never finish. After reading this thread I switched 
from the Win32 1.10 Static to the Dynamic --- *presto chango* --- the problem 
was resolved.

Original comment by joenorto...@gmail.com on 21 Jun 2011 at 6:30

GoogleCodeExporter commented 9 years ago
This issue has been moved to GitHub: 
https://github.com/ariya/phantomjs/issues/10026

Original comment by james.m....@gmail.com on 16 Mar 2013 at 12:17