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

Close

#896 SWIG 1.3.33 does not support multiple Python interpreters

closed-duplicate
nobody
python (259)
5
2008-02-22
2008-02-22
No

As discussed on the mailing list: SWIG does not generate modules compatible with multiple python interpreters.

Bug #1: Infinite loop in the initialization function

Bug #2: There was some issue with the delete function

Bug #3: Each swig module loaded per interpreter leaks memory (horribly if your module is big)

Bug #4: If you start two interpreters and import swig modules in each (simultaneously), after ending the first interpreter, the second interpreter sometimes has cleaned up all of its swig objects, with tragic results

(Start 1
import swiga
(Start 2
import swiga
PyEndInterpreter 1,
interpreter2's swiga may be corrupted.

Bug #4: The static objects created in the object_swigregister functions are shared between interpreters, which allows them to get deleted by one interpreter and have that cross over into the other interpreter.

etc.

Discussion

  • Mostly working example (hacked SWIG interface) that demonstrates some issues

     
    Attachments
    • status: open --> open-duplicate
     
  • John Lenz
    John Lenz
    2008-02-22

    Logged In: YES
    user_id=153408
    Originator: NO

    Closing this as a duplicate of 1899273

     
  • John Lenz
    John Lenz
    2008-02-22

    • status: open-duplicate --> closed-duplicate