[FIX] Fix crash in listview if labels are changed before calling __setitem__#1825
Merged
Merged
Conversation
lanzagar
requested changes
Dec 21, 2016
| item = self.listBox.item(i) | ||
| try: | ||
| item = self.listBox.item(i) | ||
| except RunTimeError: # Underlying C/C++ object has been deleted |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
|
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
|
lanzagar
approved these changes
Jan 3, 2017
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 4, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 4, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 4, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 6, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 10, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 11, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 13, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
astaric
pushed a commit
to astaric/orange3
that referenced
this pull request
Jan 18, 2017
[FIX] Fix crash in listview if labels are changed before calling __setitem__ (cherry picked from commit 3ca9708)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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