Open Gh0stWalk3r opened 3 years ago
Hi @Gh0stWalk3r,
I will try to reproduce your issue with the same package version this week and back as soon as possible with a solution :)
Hi, can you have a look with the new versions of the nuget packages.
Hi @AlexTeixeira, Thanks a lot for your support and great work. Unfortunately I can not verify the changes as I have moved to a different company. Please, feel free to close this issue. I hope you are doing well and wish you all the best 🙂
Hi @AlexTeixeira, first I want to thank you for this great library and I hope you are doing well.
Today I had a lot of invalid operation exceptions with the following message and stack trace: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
The application is an ASP.NET CORE 3.1 app with the library version 2.2.0-preview3. Although the library seems to be outdated, the part of the code where the issue arises is identical. I think the issue occurs due to a change of https://github.com/dotnet/runtime/issues/26868, where Hashsets are never thread safe for a write and any other operation (read or write) since release of .NET CORE 2.1.0. From this I assume the
IOptions<JsonLocalizationOptions> _localizationOptions
is beeing modified concurrently in Localizer/JsonStringLocalizerBase.cs#L100-L106 and therefore the InvalidOperationException is thrown.Kind regards, Greg