Seg fault with 0.85cvs on ubuntu Breezy

Here you go Ken. Thanks again. Let me know if I can do or try anything else:

I'm sorry it's taken so long to me to get back to you. I finally had some time to look into things this morning, and I must confess I'm stumped...

The stack trace you sent me indicates that the segfault occurs when _wxagg.cpp is trying to call wxPyConstructObject():

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210517280 (LWP 10694)]
0xb4fa3411 in _wxagg_module::convert_agg_to_wx_bitmap (this=0x81d8108,
    args=@0xbff1ccb0) at src/_wxagg.cpp:129
129 PyObject *pyWxBitmap = wxPyConstructObject(bitmap,
_T("wxBitmap"), 1---Type <return> to continue, or q <return> to
quit---
);
Current language: auto; currently c++
(gdb) bt
#0 0xb4fa3411 in _wxagg_module::convert_agg_to_wx_bitmap (this=0x81d8108,
    args=@0xbff1ccb0) at src/_wxagg.cpp:129

This didn't make a whole lot of sense to me at first, so I did some digging. It turns out that wxPyConstructObject() is actually a macro that invokes the function pointer wxPyCoreAPIPtr->p_wxPyConstructObject(). This is a pretty common idiom in Python for exposing extension module APIs to other extension modules... Numeric and numarray both use it, for example.

So, it appears that dereferencing the either the pointer to the wxPyCoreAPIPtr structure itself or the p_wxPyConstructObject function pointer within that structure causes the segmentation fault. I've reviewed the code involved and I can't come up with a plausible cause for this behavior. I think this could be caused by a mismatch between the wxPython headers and the wxPython extension itself, but I'm not even sure that would do it.

Could you try reinstalling the headers from the Ubuntu source package one more time and rebuilding, just to make sure that isn't the problem? I haven't been able to reproduce this problem under Debian, so I guess I'll need to get Ubuntu installed somewhere and hope that I can reproduce it myself.

If anyone else has experienced similar problems while using the WxAgg accelerator extension, has been able to reproduce this particular problem, or has any idea what might be going on, please let me know! Thanks.

Ken

···

On 10/29/05 09:41, Ryan Krauss wrote: