crash in wx.TreeListCtrl SelectItem()

jean-michel bain-cornu pythonnews at nospam.jmbc.fr
Fri Aug 18 11:04:30 EDT 2006


Hi,
> I have a strange crash (segfault on FreeBSD) that I can not reliably reproduce 
> and therefore unfortunately can not provide a self contained test case at the 
> moment.
> 
> Here is what I do (and what works almost always, but sometimes crashes):
> 
> 1) find an item in a wx.TreeListCtrl by its pydata (code posted to this list)
> 2) if the item is found:
>         a) call EnsureVisible(foundItem)
>         b) call SelectItem(foundItem)
> 
> The call to EnsureVisible() always returns, but SelectItem() crashes python 
> sometimes.
> 
> foundItem on a crash is something like this:
> <wx._controls.TreeItemId; proxy of C++ wxTreeItemId instance at 
> _a0d0c708_p_wxTreeItemId>
> 
> calling GetPyData(foundItem) returns the correct pydate.
> 
> Any ideas what could be happening or how to further debug this?
Try anyway to reproduce with a sample. The only way I know in this case 
is to split the code and see if it happens again. If so, split again, 
and again, and so on...
It can be long, but the only way. Very often, you'll find yourself the 
buggy part.
Once time you'll have a sample, post it, I can try on linux and windows.
Also please give the versions of the softwares you use.
rgds
jm



More information about the Python-list mailing list