<div dir="ltr"><pre><span style="font-family:arial">We embedded IronPython 2.7. to our .Net application (.net version is 4.0).</span><br></pre><pre>There is one abstract base class (Application) and derived class from it (DApplication).</pre>
<pre>class Application(object):
    __metaclass__ = abc.ABCMeta

    app = None

    def __init__(self, app):
        self.app = app</pre><pre>class DApllication(Application):
    def __init__(self):
        super(<span style="font-family:arial">DApllication</span><span style="font-family:arial">, self).__init__(app='some_string')</span><br></pre><pre><font face="arial">After this:</font></pre><pre><font face="arial">d = </font><span style="font-family:arial">DApllication</span><span style="font-family:arial">()</span></pre>
<pre><span style="font-family:arial">exception is thrown:</span></pre><pre>Traceback (most recent call last):
  File "C:\Program Files\SmartTest\lib\python\StdLib\abc.py", line 132, in __instancecheck__
  File "C:\Program Files\SmartTest\lib\python\StdLib\_weakrefset.py", line 73, in __contains__
SystemError: Handle is not initialized.</pre><pre><br></pre><pre>This happened only once, and we couldn't reproduce this anymore.</pre><pre>We think that GC collect some objects, with weak ref, and when we try to use it, exception is raised.</pre>
<pre>Does anyone had this problem or know for this issue?</pre><pre>Thank you.</pre></div>