-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Fix crash in listview if labels are changed before calling __setitem__ #1825
Conversation
item = self.listBox.item(i) | ||
try: | ||
item = self.listBox.item(i) | ||
except RunTimeError: # Underlying C/C++ object has been deleted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably hard to test, since we don't know how to reproduce the error, right?
I am guessing RunTimeError
is a typo of RuntimeError
.
2ba2845
to
44565e3
Compare
I changed I tried to reproduce the error with a test, but haven't gotten anywhere, so --- no tests. This happens in |
Current coverage is 89.20% (diff: 100%)@@ master #1825 diff @@
==========================================
Files 86 86
Lines 9077 9077
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 8097 8097
Misses 980 980
Partials 0 0
|
[FIX] Fix crash in listview if labels are changed before calling __setitem__
[FIX] Fix crash in listview if labels are changed before calling __setitem__
[FIX] Fix crash in listview if labels are changed before calling __setitem__
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
Issue
Confusion matrix, and possibly other widgets, may change the items in the listview before triggering
ControlledList.__setitem__
.__setitem__
already took care about this by checking whetherself.listbox(item)
returnedNone
. This apparently doesn't always work since one user gotDescription of changes
Besides checking for
None
, the method now also catches the exception.Includes