Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phantomjs exit() doesn't terminate the process

Tags:

I've been using phantom.js on Windows 7 for quite some time now (I think v1.4.0 was the first version I used) and everything was always fine. But for some reason the process isn't properly terminated any longer when calling phantom.exit() and I absolutely don't know why.

The problem started to occur in v1.7.0, from one day to another. Everything once worked fine in 1.7.0 but then it did no more. Even after upgrading to 1.8.0 and now 1.9.0 it still doesnt work. The console just hangs. I can't type anything, phantomjs.exe is still listed in the list of processes in the taskmanager, even CTRL+C doesn't do anything. The whole thing is just frozen.

The underscore in the console blinks as if it expected more input but I can't type anything. The only chance I have is to close the cmd window using the [X] button which is totally dumb for automated testing.

I use the precompiled binaries I downloaded from http://phantomjs.org/ and as I said: it stopped working from one day to another. I even reinstalled it a few times, even to different folders but the process just doesn't get terminated any longer. Anyone who has an idea what the problem could be?

phantom screenshot after calling phantom.exit()

like image 912
Manuel Bieh Avatar asked Jun 03 '13 13:06

Manuel Bieh


1 Answers

This is a known issue with the Nvidia drivers when you have two cards. To resolve this issue you need to select "High-performance NVidia processor" in the NVidia control panel (NVidia Control Panel > Manage 3D Settings > Global Settings).

Read more here: https://github.com/ariya/phantomjs/issues/10845

like image 61
Vitaly Slobodin Avatar answered Nov 19 '22 19:11

Vitaly Slobodin