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

ConcurrentDictionary.TryGetValue crashes with System.IndexOutOfRangeException: Arg_IndexOutOfRangeException #102545

Open
igor-sidorovich opened this issue May 22, 2024 · 2 comments
Labels
area-System.Collections untriaged New issue has not been triaged by the area owner

Comments

@igor-sidorovich
Copy link

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:

Device OS
realme 3 Android 10
Redmi 13C Android 14
A58 Android 13
Redmi 8 Android 10
V2027 Android 12
Galaxy S23 Ultra Android 14
HUAWEI P30 lite Android 10
moto g(30) Android 12
Alcatel 1SE Android 10
ZERO X Pro Android 11
Galaxy A22s 5G Android 13

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 22, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-collections
See info in area-owners.md if you want to be subscribed.

@igor-sidorovich
Copy link
Author

@jeffhandley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Collections untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant