ConcurrentDictionary.TryGetValue crashes with System.IndexOutOfRangeException: Arg_IndexOutOfRangeException #102545
Labels
area-System.Collections
needs-author-action
An issue or pull request that requires more info or actions from the author.
no-recent-activity
Description
Since updating from Xamarin to .NET 8 we are getting next crashes in ConcurrentDictionary.
00:49:25:118|FATAL| 6|AndroidRestCrashHandler|-Core-|AndroidEnvironment.UnhandledExceptionRaiser. UtcNow is 2024-04-09T19:19:25. --> System.IndexOutOfRangeException: Arg_IndexOutOfRangeException
at System.Collections.Concurrent.ConcurrentDictionary`2[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[BB.Features.Resources.Remote.Models.RemoteResourcePackage, BB.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryGetValue(String key, RemoteResourcePackage& value)
For me it looks like strange to have such crashes for ConcurrentDictionary.
Original issue link with detailed information - dotnet/android#8866.
Reproduction Steps
Unfortuantle, i do not have repro(I tried but didn't succeed), but on Production we see such crashes.
Expected behavior
No any crashes
Actual behavior
00:49:25:118|FATAL| 6|AndroidRestCrashHandler|-Core-|AndroidEnvironment.UnhandledExceptionRaiser. UtcNow is 2024-04-09T19:19:25. --> System.IndexOutOfRangeException: Arg_IndexOutOfRangeException
at System.Collections.Concurrent.ConcurrentDictionary`2[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[BB.Features.Resources.Remote.Models.RemoteResourcePackage, BB.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryGetValue(String key, RemoteResourcePackage& value)
Regression?
No response
Known Workarounds
No response
Configuration
List of crashed devices:
Other information
No response
The text was updated successfully, but these errors were encountered: