-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clearing wx.dataview.TreeListCtrl via DeleteAllItems raises segmentation fault on GTK #679
Comments
Tried to manually delete all items. Seems to fail when trying to GetNextItem. For example: def OnButton1(self, event):
item = self.tree1.GetFirstItem()
while item.IsOk():
self.tree1.DeleteItem(item)
break # toggle this comment
item = self.tree1.GetNextItem(item) |
Not sure why it is crashing yet, but this works for a workaround: def OnButton1(self, event):
item = self.tree1.GetFirstItem()
while item:
self.tree1.DeleteItem(item)
item = self.tree1.GetFirstItem() When the first has been deleted, "next" is undefined, but we do know that it will now be the new "first". |
With gdb:
And full backtrace:
|
Superficially this seems like the same as this issue: http://trac.wxwidgets.org/ticket/12327, however it was fixed 7 years ago, and the code updated by the fix is still the same as that change. Also, while investigating I've had it crash for different reasons at different places so it would seem that something is getting trashed well before the crash actually happens and depending on the trash the crash behavior is different. Still looking... |
I was able to duplicate the problem in C++ so I've filed a new ticket: https://trac.wxwidgets.org/ticket/18045 |
Operating system: Xubuntu 16.04
wxPython version: 4.0.0a2.dev3038+953a2e5 (GTK3)
Python version: 3.5.2
Description of the problem:
Below is an example of multiple TreeListCtrl's and buttons to clear the respective list.
However, calling DeleteAllItems() from the first added TreeListCtrl crashes the app and "raise a segmentation fault (core dumped)"
But the other TreeListCtrl's seem to work fine.
The text was updated successfully, but these errors were encountered: