Skip to content
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

Crash when sorting #15

Closed
franc6 opened this issue Feb 8, 2019 · 2 comments
Closed

Crash when sorting #15

franc6 opened this issue Feb 8, 2019 · 2 comments
Assignees
Labels
fixed A fix is in git; fix needs to be reviewed before the issue can be closed

Comments

@franc6
Copy link
Owner

franc6 commented Feb 8, 2019

This seems to happen all the time after initially clicking a column header to sort.

This appears to be a bug in mono? I see an IndexOutOfRangeException from a method called at line 1559. If I simply catch and ignore that exception, I get the same exception at line 1555 on the next iteration of the loop. The stack trace is similar in each case, and appears to be related to actually adding items to the ListView.

Needs more research...

@franc6 franc6 self-assigned this Feb 8, 2019
@franc6 franc6 modified the milestone: 1.0 Feb 8, 2019
@franc6 franc6 removed their assignment Feb 8, 2019
@franc6
Copy link
Owner Author

franc6 commented Sep 28, 2020

There have been a lot of changes from the original author of ObjectListView since the version in Ketarin (1.13, latest is 2.9.1 as of Sep 28 2020). Some of those changes address sorting and groups. The error is caused when updating the view after sorting. It still looks like a bug in Mono to me. If I change the code to add each item one at a time, instead of several at a time, it works. This makes the application a little slower, but I figure slow is better than crashing.

franc6 pushed a commit that referenced this issue Sep 28, 2020
Updated ObjectListView.cs with changes from a more recent version from
the original author.  These changes protected against the specific crash
that was reported and protected against some other potential crashes,
but still left a similar crash.  The similar crash was fixed by changing
AddRange() to Add() for individual items.  This makes the program
slower, possibly noticeably slower.

Also removed #if MONO code, since the updates from the newer
ObjectListView eliminate the need.
@franc6 franc6 assigned franc6 and JimH44 and unassigned franc6 Sep 28, 2020
@franc6 franc6 added the fixed A fix is in git; fix needs to be reviewed before the issue can be closed label Sep 28, 2020
@JimH44
Copy link
Collaborator

JimH44 commented Oct 15, 2020

Sorting columns works nicely without any crashes, and doesn't seem slow to me. :-)

@JimH44 JimH44 closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed A fix is in git; fix needs to be reviewed before the issue can be closed
Projects
None yet
Development

No branches or pull requests

2 participants