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
Crash when parse very long negative values #339
Comments
I checked your issue a while ago already but didn't had the time to respond. However I do not see a solution in using the BitInteger type but checking for the value range exceeding the 64 bit of a long and use double in that case which allows a significantly higher value range and which is the type allowing users to put such high values into objects on a parse server using the .NET SDK. Although you are right BitInteger would allow such values as in your example, I'm not sure about the implications it would have on the SDK and would keep it in mind to extend the parsing of retrieved values to check for exceeding the double type value range and fallback on BitInteger. thus my assumption is that we lack the check for the value range and a conversion to double to support the value in your example (or larger values than long supports in general). |
Hi @abraaocaldas In my test project using the value you provided it works again and I need to add test cases for that later on but want to make sure I've targeted your issue correctly. |
Closing via #342 |
Hello,
Using Parse.Netstandard version 2.0.0
Parse server version 4.3.0
When you set a very long negative value Ex: -9223372036854776000 , the .Net SDK version is not able to retrieve the value and crash when it tries to deserealize the value.
I tested this way, Steps:
parseObject.put("badColumn", -9223372036854776000)
parseObject.save()
Object is saved on DB (I checked it at mongoDB)
Tried to retrieve the Object on .NET Parse SDK
ParseObject.findAsync().....
Got the exception:
I think C# don't support this kind of value, then instead of using a Int64 or long value it's best to use a BigInteger or something similar.
Best Regards
The text was updated successfully, but these errors were encountered: