http://www.msn.com works
https://www.msn.com doesn't work
var page = require('webpage').create();
page.open('https://www.msn.com', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('example.png');
}
phantom.exit();
});
Also, the bug reporting link ironically 404s.
http://phantomjs.org/bug-reporting.html
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.
OS?
Windows 10 Enterprise. Version 1511 (OS Build 10586.104)
I too have this same issue. I can reproduce this with the version example script. I can also reproduce it with just the phantom.exit();
line.
Tested with PhantomJS v2.1.1 on Win7 Enterprise, SP1, x64.
I was unable to reproduce it. Let me think what we can do to solve this.
I'm facing this issue too. Win7 Enterprise SP1 x64
+1
Same platform: Windows 7 Enterprise, SP1 x64
npm install -g phantomjs-prebuilt
phantomjs --version
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.
If there is anything I can do to assist in fixing this problem?
I can reproduce it without a script like @perrydillard too. Even --Help
has the error at the end. Entering phantom.exit()
from within the REPL also does it.
+1
i am facing this issue with simple version check as well
below is the copy past
phantomjs --version
2.1.1
Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide athttp://phantomjs.org/bug-reporting.html and file a bug report.
I am also seeing this error on Win7 Enterprise 64 SP1, even when I just run --help or --version.
According to MSDN, error code C0000005 means that the program accessed memory in some way it's not allowed to; basically the Windows equivalent of "segmentation fault". We should probably look into printing a friendlier error message, but that's not important right now.
A crash on startup, which is unreproducible on the machine used to build the software, smells to me like some sort of library compatibility problem. Anyone experiencing the problem -- is it possible for you to rebuild PhantomJS from source on the exact computer you mean to run it on, and see if that works? Follow the instructions here. It would also be interesting to know whether _installing MSVC_ on that computer makes the problem disappear.
I am seeing the issue, when I use page.onCallback for do screenshot. Win7 Enterprise 64 SP1
I solved this issue by removing phantomjs in NPM, after that i downloaded phantomjs 2.0.0 from the official website and added the bin folder to the PATH in windows.
We have the same issue on one of developers PCs. Strange that it works on my pc with nearly the same configuration (windows 7 professional 64bit SP1). Only rollback to 2.0.0 helps. 2.1.1 fails on any activity: javascript, opening url anything. The most sad thing is that no more info (windows event log etc) except:
"PhantomJS exit code -1073741819: 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."
Update:
Finally cloned repository, installed everything for build, build locally (on my pc on which haven't problems before). Provide result to colleauge who had problems - now everything works. Strange thing that
python build.py (which as far as I could see generate release version) on my pc produce 48Mb file.
Which is almost 3 times more than 2.1.1 distributed package, but almost in sync wirth previous 2.0 binaries (47mb)
This is a really serious bug. I was using casperjs, and it was closing without any msg. Then I had to restart the script.
Finally got a traceback on my 100+th attempt that said 00x000000005 or something. Searched it, and after trying for 30+ hours to find out why it happens, I suddenly found this page and feeling very stupid.
Btw, it happened in a digital ocean droplet, while my Windows 8.1 x64 was running the same script without any problem.
Got the problem on Ubuntu 14.04 x64 droplet
Tried Phantomjs 2.0.0 , Phantomjs 2.1.0
Even though I think the problem might be related to my code, I don't think I can do anything without further information.
I have the same crash.
It seems to work fine when I comment out the phantom.exit() .
In fact calling phantom.exit() any time after loading a page, causes phantom to crash.
I am running from Windows7.
Crash on Windows 7 Professional 64Bit SP1 using PhantomJS 2.1.1 on call to phantom.exit();
crash on both windows 8 & windows 8.1 using phantomjs 2.1.1 in the middle of running test
+1
Windows 7 Enterprise, this happens when running Phantomjs through Visual Studio (via Resharper and Chutzpah, they both throw errors at the end of a run).
Windows 7 x64 crashes after every run using
npm 3.8.6
"karma": "0.13.19",
"phantomjs-prebuilt": "2.1.7",
"phantomjs-polyfill": "0.0.2",
captureTimeout: 10000,
browserDisconnectTimeout : 30000,
browserDisconnectTolerance : 10,
browserNoActivityTimeout : 30000,
I checked the Application section of the Windows event logs and found the details:
Faulting application name: _uninstall5320, version: 5.1.0.26, time stamp: 0x4e981d6f
Faulting module name: nvinit.dll_unloaded, version: 0.0.0.0, time stamp: 0x506b31f3
Exception code: 0xc0000005
Fault offset: 0x73aace39
Faulting process id: 0x284c.
nvinit.dll is an Nvidia D3D shim driver. I tried running PhantomJS over remote desktop, and it didn't error out! So at least in my case, it has something to do with the GPU drivers.
I went into the device manager and rolled back the NVIDIA GeForce GT 630M drivers. After a reboot PhantomJS ran without error.
If you're running in to this issue, you may want to check your event viewer logs to get more details.
I am facing the same issue, but only in the case I am trying to access an iframe in my tests.
Platform: Windows 10 Enterprise, on Intel Xeon E3-1270v5
Tried all of the above resolutions, still facing the issue:
Is there anything else that someone tried and succeeded, in working around this issue?
The problem can be solved building phantomjs as a native X64 Windows application.
Has any managed to do that? I'm assuming phantomjs does not yet offer this library, if not, do you know of any futures plans?
I also got this:
02 08 2016 16:12:03.415:ERROR [phantomjs.launcher]: Fatal Windows exception, code 0xc0000005.
I'm using 64bit Windows 7.
The problem is usually related to the memory limit associated to 32bit processes on Windows.
When phantomjs reaches that limit throws that exception.
This is why a 64bit build for Windows would solve the issue.
phantomjs --version
2.1.1
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.
/c/Users/.../AppData/Roaming/npm/phantomjs: line 14: 9772 Segmentation fault node "$basedir/node_modules/phantomjs/bin/phantomjs" "$@"
Fatal Windows exception, code 0xc0000005 on phantomjs 2.1.1, and then tried on 2.0.0, still no good.
I'm using windows 10(64 bit).
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.
Segmentation fault
How to solve this bug? windows server 2008 r2 standard
I'm also getting this. I have no problem on 1.9.6
, so I am using this for now.
$ phantomjs script.js
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.
Segmentation fault
Using either phantomjs from npm or from phantomjs.org both give the same error. Any news?
I had the same problem, and found the solution by looking in the event logs. I think every time there's a Fatal Windows Exception it should get logged there, but the cause may not say "PhantomJS". Maybe you could try running phantomjs 10 times in a row, then look for a string of errors in the event viewer.
In my case it was my NVidia driver, you get much more information from the event logs.
in my case it was lack of memory, I made more space on hard drive and it's works
We also get this error in our Unit-Tests, on some developer machines:
Fatal Windows exception, code 0xc0000005.
I could figure out, that it only appears when using the "karma-coverage" Plugin. When I remove it, it dosn't happen, and the Unit Tests pass through without a problem.
My machine: Windows 7 Enterprise x64
PhantomJS: 2.1.1 from the "phantomjs-prebuilt" Package 2.1.12
Karma: 1.3.0
karma-coverage: 1.1.1
Edit 20.10.2016:
Okay, it dosn't seems to have to do something with karma-coverage.
The crash appears now even without it :(
Same issue here on Windows 10, and it also occasionally happens on our CircleCI instance.
I moved to nightmareJS and Electron since no one in phantomjs is really trying to do much regarding this issue even after 1 year. The only thing I found out was the memory leak was hogging the RAM and there was this error.
Same error on Windows 7 Enterprise. The saddest thing is still no additional information why it crashes.
how to fix the issue??
I am also having this issue. Any solution?
Although we locally had some success on x64 platform, we eventually moved to Headless Chrome
@WilliamHolmes
I think Headless Chrome is not supported by CasperJS which we are using :( Thanks for feedback though!
@MateuszChilinski The only way to solve this issue right now is to give up and move on to other automation tool or actively develop PhantomJS itself.
Such a shame :( Know anything similar in syntax to CasperJS, so the migration would be not that painful? :)
The other option is to create a x64 phantom build. This would address most memory issues.
Hmm, I'll try that then. Thanks for the help William! :)
@MateuszChilinski, I switched to nightmareJS when this problem persisted, but now chromeless and puppetter came, which means we can do more.
I had the same error message. I spent almost a day looking for a solution and then realized that the issue was a memory problem due to setting loadimages to false. I switched to true and no more problem. Hope this will help someone in the same situation.
@Nzha I am afraid that it might not be the root cause for other cases, I used your solution and the problem still exists, also I have had by default loadimages to true(as I used screenshots and it was useful).
@MateuszChilinski Sorry this solution didn't work for you. Have you tried using the 2.5 beta? You can find it here: https://bitbucket.org/ariya/phantomjs/downloads/
@Nzha 2.5 beta indeed eliminated problems with this error, but the code stopped working as it should be :P Some problems with clicking buttons in my case, I couldn't resolve it for now. And beta2 does not work at all :(
In case you are testing some UI components and have an empty src attribute in your html template, it can crash your phantomJS instance. yes it can.
<img src ="" class="foo">
My error log:
07 09 2017 03:31:03.948:WARN [web-server]: 404: /xxxHTMLLINKxxx0.015839164328435240.7940623242762179xxx
PhantomJS 2.1.1 (Windows 8 0.0.0): Executed 1 of 39 SUCCESS (0 secs / 0.265 secs)
07 09 2017 03:31:04.014:ERROR [launcher]: PhantomJS crashed.
07 09 2017 03:31:04.017:ERROR [launcher]: PhantomJS stdout:
07 09 2017 03:31:04.018:ERROR [launcher]: PhantomJS stderr:
sometimes it showed fatal Windows exception 0xc0000005 along the crash.
changing the empty img tag to span worked.
The same issue. How to fix it?
Well, if you read the topic, you will know the answer - there are a few fixes for that and each of them has its cost.
Guys, maybe you could try SlimerJS, it worked fine for me.
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
Most helpful comment
Same error on Windows 7 Enterprise. The saddest thing is still no additional information why it crashes.