You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
GetServiceAsync crashes with the following exception, it appears that the collection is being modified at the same time that it is trying to enumerate the services. The exception happens when this line is called
var s = device.Services.First (x => x.ID == id);
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException (ExceptionResource resource) [0x0000b] in :0
at System.Collections.Generic.List1+Enumerator[Robotics.Mobile.Core.Bluetooth.LE.IService].MoveNextRare () [0x00016] in <filename unknown>:0 at System.Collections.Generic.List1+Enumerator[Robotics.Mobile.Core.Bluetooth.LE.IService].MoveNext () [0x00050] in :0
at System.Linq.Enumerable.First[IService](IEnumerable1 source, System.Func2 predicate, Fallback fallback) [0x00026] in :0
at System.Linq.Enumerable.First[IService](IEnumerable1 source, System.Func2 predicate) [0x00007] in :0
at Robotics.Mobile.Core.Bluetooth.LE.Extensions+c__AnonStorey1.<>m__1 (System.Object sender, System.EventArgs e) [0x0002a] in /Users/cprice1/Projects/Monkey.Robotics/Source/Platform Stacks/Robotics.Mobile.Core/Bluetooth/LE/Extensions.cs:78
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in :0
at System.Runtime.CompilerServices.TaskAwaiter`1[Robotics.Mobile.Core.Bluetooth.LE.IService].GetResult () [0x00000] in :0
at IDS.BluetoothAdapter+c__async0.MoveNext () [0x000a4] in /Users/cprice1/Projects/Control/Control/IDS/IDS.BluetoothAdapter.cs:175
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in :0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__1 (System.Object state) [0x00000] in :0
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
GetServiceAsync crashes with the following exception, it appears that the collection is being modified at the same time that it is trying to enumerate the services. The exception happens when this line is called
var s = device.Services.First (x => x.ID == id);
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException (ExceptionResource resource) [0x0000b] in :0
at System.Collections.Generic.List
1+Enumerator[Robotics.Mobile.Core.Bluetooth.LE.IService].MoveNextRare () [0x00016] in <filename unknown>:0 at System.Collections.Generic.List
1+Enumerator[Robotics.Mobile.Core.Bluetooth.LE.IService].MoveNext () [0x00050] in :0at System.Linq.Enumerable.First[IService](IEnumerable
1 source, System.Func
2 predicate, Fallback fallback) [0x00026] in :0at System.Linq.Enumerable.First[IService](IEnumerable
1 source, System.Func
2 predicate) [0x00007] in :0at Robotics.Mobile.Core.Bluetooth.LE.Extensions+c__AnonStorey1.<>m__1 (System.Object sender, System.EventArgs e) [0x0002a] in /Users/cprice1/Projects/Monkey.Robotics/Source/Platform Stacks/Robotics.Mobile.Core/Bluetooth/LE/Extensions.cs:78
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in :0
at System.Runtime.CompilerServices.TaskAwaiter`1[Robotics.Mobile.Core.Bluetooth.LE.IService].GetResult () [0x00000] in :0
at IDS.BluetoothAdapter+c__async0.MoveNext () [0x000a4] in /Users/cprice1/Projects/Control/Control/IDS/IDS.BluetoothAdapter.cs:175
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in :0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__1 (System.Object state) [0x00000] in :0
The text was updated successfully, but these errors were encountered: