wX + Panda... Crashing on wx Events

I’m doing to standard wx + panda setup which I’ve seen examples of all over the forums, and in the manual.

Everything seems to look fine, except my program crashes whenever a wx event kicks off, like clicking on a menu or a button.

Am I missing something obvious? Is it an issue without how I have my loop setup?

I’m using Panda’s main loop to manage the wx loop. I’ve seen others do the opposite. Here’s loop:

    
self.evtloop = wx.EventLoop() 

...

def wx(self, task): 
        while self.evtloop.Pending(): 
            self.evtloop.Dispatch() 
         
        return task.cont 

In what way is it crashing? Does it generate a python stack trace, or a hard C++ crash? Maybe there’s some version incompatibility with the particular wx libs you are using?

I don’t see anything obviously wrong in your loop. Note that nowadays, Panda comes with its own wx loop built-in, which you can activate by calling base.startWx(). But this loop does the same thing that yours does.

David

Hard crash, no python stack trace. I’ll try the built in loop (good to know).

I’m running Ubuntu 10.10 using the wxPython install from the default repositories, so maybe they are behind.

I’ll look into it.

thanks,

I checked, and I’m using the latest version of the wxPython library, so I’m not sure what’s going on there.