crash in wx.TreeListCtrl SelectItem()

J

Johannes Lochmann

Hello list,

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?

Thank you in advance for your time!

Johannes
 
J

jean-michel bain-cornu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top