Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 23591 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
The processing for inside ListView.ItemControl.ItemsMouseDown() can sometimes allow ItemsMouseUp() to be called before ItemsMouseDown() has been completed. I'm attaching a stack trace that shows this happening. It's a complex enough situation (and somewhat nondeterministic) that I haven't tried to provide an example program. The Mono codebase in the stack trace is essentially Mono 3.4.0 with a few added lines of code to facilitate trapping the bug without stopping every time in ItemsMouseDown.
The critical bit is that the processing steps for the side-effects of setting "clicked_item.Selected = true" eventually result in Application.DoEvents() being called, which opens the door for the MouseUp event to be processed if the timing is just right. Our program may be the only that would have such a complex, convoluted process, but then again it might not be alone in this regard. (And this call does not occur directly in our code, but in third-party software that we are using.)
Created attachment 8299 [details]
ListView-Crash-Stacktrace.txt shows the complete stack (as recorded inside Monodevelop) where ItemsMouseUp() is called inside ItemsMouseDown().
A proposed fix has been posted as https://github.com/mono/mono/pull/1323.