本文是小编为大家收集整理的关于phantomjs exit()没有终止进程。的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
我已经在Windows 7上使用了Phantom.js已有一段时间了(我认为v1.4.0是我使用的第一个版本),一切总是很好.但是由于某种原因,当调用phantom.exit()时,该过程不再正确终止,我绝对不知道为什么.
问题开始发生在v1.7.0中,从一天到另一天.一切曾经在1.7.0中效果很好,但不再这样做.即使升级到1.8.0,现在1.9.0仍然无法正常工作.控制台悬挂.我不能输入任何内容,phantomjs.exe仍然列在任务管理器中的进程列表中,即使Ctrl+C也没有任何作用.整个事情只是冻结了.
控制台中的下划线闪烁,好像它期望更多的输入,但我不能输入任何内容.我唯一的机会是使用[X]按钮关闭CMD窗口,这完全是自动测试的愚蠢的.
我使用我从 http://phantomjs.org/和正如我所说的,正如我所说的:从一天到另一天停止工作.我什至将其重新安装了几次,甚至是其他文件夹,但是该过程不再终止.有人知道问题可能是什么?
推荐答案
当您有两张卡时,这是NVIDIA驱动程序的已知问题. 要解决此问题,您需要在NVIDIA控制面板(NVIDIA控制面板>管理3D设置>全局设置)中选择"高性能NVIDIA处理器".
在此处阅读更多信息:/a>
问题描述
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?
推荐答案
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