phantomjs exit()没有终止进程。[英] phantomjs exit() doesn't terminate the process

本文是小编为大家收集整理的关于phantomjs exit()没有终止进程。的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。


我已经在Windows 7上使用了Phantom.js已有一段时间了(我认为v1.4.0是我使用的第一个版本),一切总是很好.但是由于某种原因,当调用phantom.exit()时,该过程不再正确终止,我绝对不知道为什么.




 phantom screenshot致电phantom.exit()


当您有两张卡时,这是NVIDIA驱动程序的已知问题. 要解决此问题,您需要在NVIDIA控制面板(NVIDIA控制面板>管理3D设置>全局设置)中选择"高性能NVIDIA处理器".




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 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()


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: