I have created an issue before at #158. There you fixed one of the problems, but it seems that it is not fixed completely. As also mentioned on the previous issue i had problems on Travis-CI too.
Now i took the moment to run specs on my vagrant VM and reproduce them.
The following specs are crashing PhantomJS intermittently (not always and not when running only failing spec):
Steps to reproduce:
1) Install Vagrant
2) Install and start Vagrant box:
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
vagrant init lucid32
3) SSH into vagrant box:
4) Run the following commands inside of the vagrant VM:
sudo apt-get update
sudo apt-get install -y build-essential chrpath git-core libssl-dev libfontconfig1-dev curl libxslt1-dev libxml2-dev
curl -L -O "https://dl.dropbox.com/u/2731643/phantomjs/phantomjs-latest.tar.bz2"
tar -xvjf phantomjs-latest.tar.bz2 -C phantomjs
chmod +x phantomjs/phantomjs
git clone git://github.com/jarmo/watir-webdriver.git
git submodule update --init
\curl -L https://get.rvm.io | bash -s stable --ruby
echo "\$DEBUG=true" >> spec/spec_helper.rb
5) Run file field specs inside of VM:
bundle exec rspec spec/watirspec/filefield_spec.rb
You may also run specific spec by appending a line number like so:
bundle exec rspec spec/watirspec/filefield_spec.rb:127
As mentioned above, running only crashing test would not crash PhantomJS - there is some state retained in PhantomJS between the specs.
Running these specs will crash PhantomJS almost always and you will see a message similar to this:
PhantomJS has crashed. Please read the crash reporting guide at https://github.com/ariya/phantomjs/wiki/Crash-Reporting and file a bug report at https://code.google.com/p/phantomjs/issues/entry with the crash dump file attached: /tmp/3e1184fb-b0de-1a80-23ae5b12-49abfbd6.dmp
Please note that $DEBUG=true inside of spec/spec_helper.rb will output a lot of debug information.
I initially thought I could investigate this (and hopefully solve it) for 1.0.4 but I can't: you have done a great job at documenting how to reproduce it, I need to give it the proper time and dedication.
Also, from the error message you have reported at the end, it seems related to the intermittent crashes that PhantomJS has (a known issue): if that is the case, I know already I don't have a solution for that yet.
Anyway, I'll remove this work from 1.0.4 and dedicate proper time to it after that.
Too many people's fixes are already in 1.0.4 to delay it any longer.
And thanks for the detailed instructions.
This issue still exists. Any updates on this?