pyclewn version: 1.6
tracker id: 3371178
mercurial changeset: 64132057bb70

Description:

    Python 3.2
    Debugger: pdb

    The following exception is raised and ignored on termination of
    the program debugged by ``pdb``:

        AttributeError("'NoneType' object has no attribute 'Pdb'",) in
        function _removeHandlerRef


Solution:

    This bug exists with Python 3.2, where the ``logging`` standard
    module introduced the use of ``weakref`` variables.

    Fix:
    The ``Clewn-thread`` handling the netbeans communication with Vim,
    is a daemon thread. The main thread that runs the program being
    debbuged by ``pdb`` must signal the ``Clewn-thread`` that it is
    about to exit and join this thread so that the daemon can stop the
    debugging session and terminate before Python starts cleaning up.
    See http://bugs.python.org/issue1722344 about Python termination
    and module teardown, excerpts::

        When Python begins to shutdown it takes each module and sets
        each variable in the global namespace to None. If a thread has
        not terminated before the interpreter terminates then the
        thread tries to use a global variable which has been set to
        None.
        This is not about to change since this occurs because of
        coding "errors". You must make sure that either your thread is
        as safe as a __del__ method (which means no global namespace
        access) or you can't let the app exit until you are positive
        all of your threads have terminated, not just asked them to
        shutdown since this is all asynchronous.


Files:

    vim.py pydb.py

------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
Pyclewn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyclewn-general

Reply via email to