Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Debugging Problem with PyDev 1.3.8

2007-07-26
2013-03-15
  • Hi,

    I'm trying to debug the simple Hellow World app from the tutorial.  Clicking Run, "Hellow World" is successfully printed to the console.  If I try to debug, however, I get an "Unexpected error trying to set up the debugger" with the following stack:
    java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
        at java.net.ServerSocket.implAccept(ServerSocket.java:450)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.python.pydev.debug.model.remote.ListenConnector.run(ListenConnector.java:40)
        at java.lang.Thread.run(Thread.java:595)

    This is on Java 1.5 platform (Sun HotSpot JRE 1.5.0_07) with Python 2.4.1 on an x86_64 machine.

    Another problem I've seen is, when viewing the Preferences -> PyDev ->Scripting PyDev dialog, I get:
    "Unable to create selected Preference Page"
    "An error occurred while automatically activating bundle org.python.pydev.jython (1586)"

    PyDev was installed from the feature zip downloaded from Sourceforge, and the Configuration dialog in Eclipse doesn't show any errors.

    Does anyone have any idea on what might be going wrong?

    Many thanks,

    James

     
    • Hmmm.. Just exited and reopened eclipse, and this error has appeared in the console:

      java.lang.RuntimeException: Error connecting to python process (/tools/oss/packages/x86_64-rhel3/python/2.4.1/bin/python /projects/firepath/tools/releases/eclipse/3.3.0-snap/plugins/org.python.pydev_1.3.8/PySrc/pycompletionserver.py 51605 57177)  - the process in still alive (killing it now)-  the output of the process is: Std output:
      Err output:
      at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:440)
      at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:312)
      at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:234)
      at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:192)
      at org.python.pydev.editor.PyEdit$1.run(PyEdit.java:371)

      But debugging now works! How very strange!

       
    • Fabio Zadrozny
      Fabio Zadrozny
      2007-07-26

      What do you have in your error log? See http://pydev.sourceforge.net/faq.html#ref_0 for details on how to get to it...

      Cheers,

      Fabio

       
    • Ug. The errors were copied from the error view, but unfortunately not from the log which has since disappeared due to it being run as a temporary configuration.

      I do have yet another error though :)

      Just stepping through the helloworld to 'def _run_exitfuncs():' at the end of my code gives me an error when it tries to parse the stack:

      !SESSION 2007-07-26 15:02:14.033 -----------------------------------------------
      eclipse.buildId=I20070625-1500
      java.version=1.5.0_07
      java.vendor=Sun Microsystems Inc.
      BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
      Framework arguments:  -Dosgi.sharedConfiguration.area=/projects/firepath/tools/releases/eclipse/3.3.0-1/configuration -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true
      Command-line arguments:  -os linux -ws gtk -arch x86_64 -data /home/jamesb/jamesb-work/runtime-EclipseApplication -Dosgi.sharedConfiguration.area=/projects/firepath/tools/releases/eclipse/3.3.0-1/configuration -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true

      !ENTRY org.python.pydev.debug 4 4 2007-07-26 15:02:49.307
      !MESSAGE Error reading ThreadSuspended
      !STACK 1
      org.eclipse.core.runtime.CoreException: Unexpected XML error reading:<xml><thread id="1076664268" stop_reason="107"><frame id="136087164" name="_run_exitfuncs" file="/tools/oss/packages/i686-rhel3/python/2.4.1/lib/python2.4/atexit.py" line="21">"</frame></thread></xml>
          at org.python.pydev.debug.model.XMLUtils.XMLToStack(XMLUtils.java:234)
          at org.python.pydev.debug.model.AbstractDebugTarget.processThreadSuspended(AbstractDebugTarget.java:335)
          at org.python.pydev.debug.model.AbstractDebugTarget.processCommand(AbstractDebugTarget.java:215)
          at org.python.pydev.debug.model.remote.DebuggerReader.processCommand(DebuggerReader.java:96)
          at org.python.pydev.debug.model.remote.DebuggerReader.run(DebuggerReader.java:120)
          at java.lang.Thread.run(Thread.java:595)
      org.eclipse.core.runtime.CoreException[4]: org.xml.sax.SAXException: Thread not found (1076664268)
          at org.python.pydev.debug.model.XMLUtils$XMLToStackInfo.startThread(XMLUtils.java:146)
          at org.python.pydev.debug.model.XMLUtils$XMLToStackInfo.startElement(XMLUtils.java:201)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
          at org.python.pydev.debug.model.XMLUtils.XMLToStack(XMLUtils.java:224)
          at org.python.pydev.debug.model.AbstractDebugTarget.processThreadSuspended(AbstractDebugTarget.java:335)
          at org.python.pydev.debug.model.AbstractDebugTarget.processCommand(AbstractDebugTarget.java:215)
          at org.python.pydev.debug.model.remote.DebuggerReader.processCommand(DebuggerReader.java:96)
          at org.python.pydev.debug.model.remote.DebuggerReader.run(DebuggerReader.java:120)
          at java.lang.Thread.run(Thread.java:595)
      !SUBENTRY 1 org.python.pydev.debug 4 4 2007-07-26 15:02:49.307
      !MESSAGE Unexpected XML error reading:<xml><thread id="1076664268" stop_reason="107"><frame id="136087164" name="_run_exitfuncs" file="/tools/oss/packages/i686-rhel3/python/2.4.1/lib/python2.4/atexit.py" line="21">"</frame></thread></xml>
      !STACK 0
      org.xml.sax.SAXException: Thread not found (1076664268)
          at org.python.pydev.debug.model.XMLUtils$XMLToStackInfo.startThread(XMLUtils.java:146)
          at org.python.pydev.debug.model.XMLUtils$XMLToStackInfo.startElement(XMLUtils.java:201)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
          at org.python.pydev.debug.model.XMLUtils.XMLToStack(XMLUtils.java:224)
          at org.python.pydev.debug.model.AbstractDebugTarget.processThreadSuspended(AbstractDebugTarget.java:335)
          at org.python.pydev.debug.model.AbstractDebugTarget.processCommand(AbstractDebugTarget.java:215)
          at org.python.pydev.debug.model.remote.DebuggerReader.processCommand(DebuggerReader.java:96)
          at org.python.pydev.debug.model.remote.DebuggerReader.run(DebuggerReader.java:120)
          at java.lang.Thread.run(Thread.java:595)

      Cheers,

      James