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 on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1+Enumerator[Mono.Debugging.Client.BreakEvent].VerifyState () [0x0003c] in /home/marek/git/mono/mcs/class/corlib/System.Collections.Generic/List.cs:790
at System.Collections.Generic.List`1+Enumerator[Mono.Debugging.Client.BreakEvent].MoveNext () [0x00000] in /home/marek/git/mono/mcs/class/corlib/System.Collections.Generic/List.cs:796
at Mono.Debugging.Client.BreakpointStore.GetBreakpointsAtFile (System.String filename) [0x0004f] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs:178
at MonoDevelop.SourceEditor.SourceEditorView.UpdateBreakpoints (Boolean forceUpdate) [0x001a5] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:983
at MonoDevelop.SourceEditor.SourceEditorView.<OnBreakpointStatusChanged>m__44 () [0x0000c] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:1061
at GLib.Timeout+TimeoutProxy.Handler () [0x0000c] in /home/marek/git/gtk-sharp/glib/Timeout.cs:70
Ugh, sounds like the BreakpointStore was modified from another thread?
Do you have a reproducible test case for this?
I think I might have a fix... I assume you were debugging when this happened?
Probably breakpoints were being resolved and thus line numbers being updated cause them to be removed and then re-added to the collection... meanwhile the editor had a queue'd UpdateBreakpoints() which fired and started iterating over the breakpoint collection to update their icons in the editor view.
commit 60537596d7de0dd200b0efe92300c26aeb741a1e should solve this particular race.