-
Type: Bug
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: ObjectStore
There are issues parsing Bson.
Currently identified from running Bson parsing roundtrip test from Java in https://github.com/realm/realm-java/commit/f54a11a0f65781581f5a268a0da221c2936bfdb4#diff-0e8117f1b819b513b5c085b992e0d4dcR52
2020-05-19 09:40:48.942 13312-13345/io.realm.test D/REALM: nativeTest input: {"value": {"foo":{"$numberInt": "5"}, "bar": {"$numberInt": "6"}}} 2020-05-19 09:40:48.942 13312-13345/io.realm.test D/REALM: nativeTest parsed bson: null
2020-05-19 09:49:36.140 13601-13634/io.realm.test D/REALM: nativeTest input: {"value": {"key0":{"$numberDouble": "1.4"}, "key1": "Realm", "key2": [\{"$numberInt": "1"}, "Realm", \{"KEY": {"$numberInt": "5"}}], "key3": {"$binary": {"base64": "SQb/vczpT1W+coX70VPgOQ==", "subType": "04"}}, "key4": {"$undefined": true}, "key5": {"$oid": "5ec38f90c309177d2477e67c"}, "key6": true, "key7": {"$date": {"$numberLong": "1589874576111"}}, "key8": null, "key9": {"$regularExpression": {"pattern": "Realm", "options": ""}}, "key10": {"$code": "Realm"}, "key11": {"$symbol": "Realm"}, "key12": {"$numberInt": "32"}, "key13": {"$timestamp": {"t": 1000, "i": 1000}}, "key14": {"$numberLong": "32"}, "key15": {"$numberDecimal": "32"}, "key16": {"$minKey": 1}, "key17": {"$maxKey": 1}}} 2020-05-19 09:49:36.141 13601-13634/io.realm.test D/REALM: nativeTest parsed bson: null
Parsing below hits an assertion:
{{2020-05-19 09:58:23.680 13753-13788/io.realm.test D/REALM: nativeTest input: {"value": [
, "Realm", [\{"$numberInt": "1"}, "Realm", \{"KEY": {"$numberInt": "5"}}], {"$binary": {"base64": "hIrJYS7xTH24iNf71/m5iQ==", "subType": "04"}},
{"$undefined": true},
{"$oid": "5ec3919ff351f6460675eb71"}, true, {"$date": {"$numberLong": "1589875103659"}}, null, {"$regularExpression": {"pattern": "Realm", "options": ""}},
{"$code": "Realm"},
{"$symbol": "Realm"},
{"$numberInt": "32"}, {"$timestamp": {"t": 1000, "i": 1000}},
{"$numberLong": "32"},
{"$numberDecimal": "32"},
{"$minKey": 1},
{"$maxKey": 1}]}}}
Only observed on CI-device, and not reproducible on local device with same ABI, seems to truncate long value:
{"value": [\{"$date": {"$numberLong": "9886464206"}}]} {"value": [\{"$date":{"$numberLong":"2147483647"}}]}
Identified, but apparently not supported yet:
2020-05-19 09:49:36.123 13601-13634/io.realm.test D/REALM: nativeTest input: {"value": {"$timestamp":{"t": 1000, "i": 1000}}} 2020-05-19 09:49:36.123 13601-13634/io.realm.test D/REALM: nativeTest parsed bson: {"$timestamp":{"t":1000,"i":1}}
2020-05-19 09:49:36.104 13601-13634/io.realm.test D/REALM: nativeTest input: {"value": {"$binary":{"base64": "SQb/vczpT1W+coX70VPgOQ==", "subType": "04"}}} 2020-05-19 09:49:36.105 13601-13634/io.realm.test D/REALM: nativeTest parsed bson: {"$binary":{"base64":"SQb/vczpT1W+coX70VPgOQ==","subType":"00"}}