Menu

Eclipse frezes on code completion

2011-02-14
2013-03-15
  • Glen Seested

    Glen Seested - 2011-02-14

    Hi,
    When programming in Pydev in Eclipse, it keeps freezing every time it tries to auto complete some code

    Forexample when i type:

    newString = "abc"

    newString.something (newString"DOT"something)

    And then it frezes. And after a minute, if I am lucky it says "error connecting to python process"

    I get the following error from the eclipse error log:

    !ENTRY org.python.pydev 4 4 2011-02-14 20:17:43.640
    !MESSAGE Error connecting to python process (Name:python:EndName:Version2.7Executable:C:\Python27\python.exe|C:\Python27|C:\Python27\DLLs|C:\Python27\lib|C:\Python27\lib\lib-tk|C:\Python27\lib\plat-win|C:\Python27\lib\site-packages|C:\Python27\lib\site-packages\Pythonwin|C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info|C:\Python27\lib\site-packages\win32|C:\Python27\lib\site-packages\win32\lib@$|Image|OpenGL|__builtin__|__main__|_ast|_bisect|_bytesio|_codecs|_codecs_cn|_codecs_hk|_codecs_iso2022|_codecs_jp|_codecs_kr|_codecs_tw|_collections|_csv|_fileio|_functools|_heapq|_hotshot|_io|_json|_locale|_lsprof|_md5|_multibytecodec|_random|_sha|_sha256|_sha512|_sre|_struct|_subprocess|_symtable|_warnings|_weakref|_winreg|array|audioop|binascii|cPickle|cStringIO|cmath|datetime|email|errno|exceptions|future_builtins|gc|hashlib|imageop|imp|itertools|marshal|math|mmap|msvcrt|nt|numpy|operator|os|os.path|parser|signal|socket|strop|sys|thread|time|wx|wxPython|xxsubtype|zipimport|zlib "C:\eclipse\dropins\plugins\org.python.pydev_1.6.5.2011020317\PySrc\pycompletionserver.py" 1266 1265)  - the process in still alive (killing it now)-  the output of the process is: Std output:
    pycompletionserver will start
    pycompletionserver creating socket
    pycompletionserver waiting for connection

    Err output:

    !STACK 0
    java.lang.RuntimeException: Error connecting to python process (Name:python:EndName:Version2.7Executable:C:\Python27\python.exe|C:\Python27|C:\Python27\DLLs|C:\Python27\lib|C:\Python27\lib\lib-tk|C:\Python27\lib\plat-win|C:\Python27\lib\site-packages|C:\Python27\lib\site-packages\Pythonwin|C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info|C:\Python27\lib\site-packages\win32|C:\Python27\lib\site-packages\win32\lib@$|Image|OpenGL|__builtin__|__main__|_ast|_bisect|_bytesio|_codecs|_codecs_cn|_codecs_hk|_codecs_iso2022|_codecs_jp|_codecs_kr|_codecs_tw|_collections|_csv|_fileio|_functools|_heapq|_hotshot|_io|_json|_locale|_lsprof|_md5|_multibytecodec|_random|_sha|_sha256|_sha512|_sre|_struct|_subprocess|_symtable|_warnings|_weakref|_winreg|array|audioop|binascii|cPickle|cStringIO|cmath|datetime|email|errno|exceptions|future_builtins|gc|hashlib|imageop|imp|itertools|marshal|math|mmap|msvcrt|nt|numpy|operator|os|os.path|parser|signal|socket|strop|sys|thread|time|wx|wxPython|xxsubtype|zipimport|zlib "C:\eclipse\dropins\plugins\org.python.pydev_1.6.5.2011020317\PySrc\pycompletionserver.py" 1266 1265)  - the process in still alive (killing it now)-  the output of the process is: Std output:
    pycompletionserver will start
    pycompletionserver creating socket
    pycompletionserver waiting for connection

    Err output:

    at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:540)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:321)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:257)
    at org.python.pydev.editor.codecompletion.PyCodeCompletion.lazyStartShell(PyCodeCompletion.java:407)
    at org.python.pydev.editor.codecompletion.PyCodeCompletion.getCodeCompletionProposals(PyCodeCompletion.java:118)
    at org.python.pydev.editor.codecompletion.PythonCompletionProcessor.getPythonProposals(PythonCompletionProcessor.java:234)
    at org.python.pydev.editor.codecompletion.PythonCompletionProcessor.computeCompletionProposals(PythonCompletionProcessor.java:158)
    at org.python.pydev.editor.simpleassist.SimpleAssistProcessor.computeCompletionProposals(SimpleAssistProcessor.java:204)
    at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1834)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:556)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:553)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:488)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:482)
    at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:376)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

    I have tried to reinstall both eclipse and pydev and tried to create a new workspace. I read in a topic that it migh be the firewall, but  I have tried to disable my firewall, and it still doesn't work.

    I am fully capable of executing python programs, and when I disable auto completion in eclipse under window->preferences->pydev->editor->code completion it works fine. But then I am missing the code completion ability, which i think is a nice feature :-)

    I hope you guys can help me :)

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-02-15

    It does look like you have a firewall enabled (sometimes some anti-virus can have firewalls builtin). Aside from that it could be some other connection issue (such as not having ipv4 properly configured), but that would be something more exoteric ;-)

    So, is there any chance you do have some other firewall running? (Maybe by having some anti-virus program?)

    Cheers,

    Fabio

     
  • Glen Seested

    Glen Seested - 2011-02-15

    I have had another firewall before, but it is uninstalled. And there is no other proces running under Windows Task Manager which could be a firewall or anti-virus application. The only firewall + anti-virus I have is AVG Internet Security, which was the one I have tried to disable for a while, which didn't work.

    furthermore I have tried with python 2.6 and 2.7, and I have also tried to uninstall the Java JDK and installed it again.

     
  • Glen Seested

    Glen Seested - 2011-02-15

    It is not only eclipse where I have the problem. The problem does also appear when I try to open IDLE.
    Here I get two errors:
    Socket Error: No connection could be made because the target machine actively refused it

    and

    Idle's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection.

    I have also been in: Control Panel\System and Security\Action Center

    Here it says I have two firewalls installed but only AVG firewall is ON and Windows firewall is OFF.

    So I should only have AVG firewall, but it does still not work when I switch AVG firewall off.

     
  • Glen Seested

    Glen Seested - 2011-02-15

    BTW, I am able to open IDLE if i open it from the command prompt with: "idle -n"

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-02-16

    Hi there,

    If connections are being refused,  the most common thing is a firewall, now, if you're 100% sure it's not, take a look at: http://www.smartftp.com/support/kb/connection-refused-f58.html and try to identify what else could be wrong there (the only other case I saw where it was not the firewall was with a misconfigured network card under linux, but in that case even ping 127.0.0.1 would fail).

    Cheers,

    Fabio

     
  • Luiz Garrido

    Luiz Garrido - 2011-09-27

    Hi, I know that this post has no activity for a long time but…
    I was having a problem that my Eclipse PyDev autocomplete was not working and find out that my "C:\Windows\System32\drivers\etc\hosts" was the problem. So if anyone tried everything like me, I had to remove a line that I was using there to solve the problem. The line was pointing the localhost address to another place on my network (10.0.1.31 localhost). Removing that line, made localhost work like it should and the problem with PyDev Autocomplete was fixed.

    Thanks!
    Luiz Garrido

     
  • Bruno P. Kinoshita

    Thanks Luiz! That worked for me!

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.