[wxPython] Thread crash

I saw that in the past the threading demo would fail and it still fails for
me.
Using Python 2 on Win2K. Here's some code that will produce some errors.

Fatal Python error: ceval: orphan tstate
Fatal Python error: ceval: tstate mix-up

#! /usr/bin/env python
from wxPython.wx import *
import time, threading

class RunTests(wxFrame):
    def __init__(self, parent, log):
        wxFrame.__init__(self, parent, -1, "", size=wxSize(10,10))
        def runTest():
            for x in xrange(100000):
                        pass
        th=threading.Thread(None, runTest, "")
        th.start()

class Frame1 (wxFrame):
    def __init__(self,parent,id,title):
        wxFrame.__init__(self,parent,id,title,wxDefaultPosition
,size=wxSize(100,100))
        EVT_IDLE(self,self.OnIdle)

    def OnIdle(self, event):
        self._runTests=RunTests(self, None)
        self._runTests.Show(true)

class myapp(wxApp):
    def OnInit(self):
        f=Frame1(NULL,-1,"")
        f.Show(true)
        self.SetTopWindow(f)
        return true

myapp(0).MainLoop()

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I saw that in the past the threading demo would fail and it still fails

for

me.
Using Python 2 on Win2K. Here's some code that will produce some errors.

I don't have things built for Python 2.0 right now, but on Python 1.5.2 your
program runs without crashing on my win2k system. It created several
thousand windows before I was able to get the task manager open and kill it,
but it didn't crash python. :wink:

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users