Skip to content

Commit 1793ca8

Browse files
authored
Firestore: Add a test and readme about the android global refs crash (#781)
* Add a test and readme about the android global refs crash * add missing ')'
1 parent 21a8b48 commit 1793ca8

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

docs/readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ Support
7171

7272
Release Notes
7373
-------------
74+
### Upcoming Release
75+
- Changes
76+
- Firestore (Android) Fix the intermittent global references exhaustion
77+
crash when working with documents with a large number of keys and/or large
78+
map and/or array fields.
79+
([#1364](https://github.com/firebase/firebase-cpp-sdk/pull/1364)).
80+
7481
### 11.2.0
7582
- Changes
7683
- General: Update to Firebase C++ SDK version 11.2.0.

firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4317,6 +4317,19 @@ Task TestFirestoreGetInstance() {
43174317
});
43184318
}
43194319

4320+
// Regression test for https://github.com/firebase/firebase-unity-sdk/issues/569
4321+
// As long as this test doesn't crash, then it passes.
4322+
Task TestAndroidGlobalRefsExhaustionBugFix() {
4323+
return Async(() => {
4324+
DocumentReference doc = db.Collection("col").Document();
4325+
var numbers = new List<object>();
4326+
for (int i = 0; i < 60000; i++) {
4327+
numbers.Add(i);
4328+
}
4329+
Await(doc.SetAsync(new Dictionary<string, object>{{"foo", numbers}}));
4330+
});
4331+
}
4332+
43204333
private void RoundtripValue(DocumentReference doc, object input, out object nativeOutput, out object convertedOutput) {
43214334
SerializeToDoc(doc, input);
43224335

@@ -4545,4 +4558,4 @@ public void Add(T element) {
45454558
}
45464559
}
45474560
}
4548-
}
4561+
}

0 commit comments

Comments
 (0)