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

Inifinite loop in the DateTime resolvers. #463

Closed
glennawatson opened this issue Feb 18, 2019 · 5 comments · Fixed by #465
Closed

Inifinite loop in the DateTime resolvers. #463

glennawatson opened this issue Feb 18, 2019 · 5 comments · Fixed by #465
Labels

Comments

@glennawatson
Copy link
Contributor

glennawatson commented Feb 18, 2019

My pr introduced a bug showing an infinite loop of calls exhausting the stack:
edit: it's not my pr, it's your code lol :)
edit2: it's not my pr, it's not your code. It's when an existingContractResolver is non null and derives from DefaultContractResolver. Then it loops ...

Originally posted by @softlion in #459 (comment)

Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)```
@glennawatson
Copy link
Contributor Author

This is related to a issue that @softlion brought up in #459

@glennawatson
Copy link
Contributor Author

I think the easy solution is to check if the resolver is derived from the DefaultContractResolver to prevent the re-entry. I won't realistically get it to later this week so if you get a PR in before then I will merge as soon as I see it.

@softlion
Copy link
Contributor

should be resolved in #465

I can't reproduce the loop in unit tests. but i can in the real app (randomly -often enough- though).

@softlion
Copy link
Contributor

softlion commented Feb 19, 2019

Plz merge and post nuget as soon as you can, its very urgent ;)

@open-collective-bot
Copy link

open-collective-bot bot commented Feb 19, 2019

Hey 👋,

We saw you use our package. To keep our code as accessible as possible, we decided to open source it and are now helping others with their questions.

In a pursuit to continue our work, help us by donating to our collective! ❤️

https://opencollective.com/reactiveui

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

@lock lock bot added the outdated label Jun 24, 2019
@lock lock bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants