-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
App crashed on data insert & delete in firestore #9965
Labels
Comments
I found a few problems with this issue:
|
sspogra
changed the title
Crashed: com.google.firebase.firestore EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000028034c90000
App crashed on data insert & delete in firestore
Jun 30, 2022
Sorry for the late reply, @sspogra. Is it possible for you to provide a sample runnable app that reproduces the issue? |
@rizafran I already added the sample code. Unable to provide sample application. |
ehsannas
added a commit
that referenced
this issue
Aug 12, 2022
See similar logic in [Android](https://cs.opensource.google/firebase-sdk/firebase-android-sdk/+/master:firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java;l=173-176?q=LocalDocumentsView.java&ss=firebase-sdk%2Ffirebase-android-sdk) and [Web](https://cs.opensource.google/firebase-sdk/firebase-js-sdk/+/master:packages/firestore/src/local/local_documents_view.ts;l=239-244?q=computeviews&ss=firebase-sdk%2Ffirebase-js-sdk). This is inserting into a map while its being iterated over. Note that SortedMap does not guarantee pointer stability. In fact, upon insertion, SortedMap may [switch](https://cs.opensource.google/firebase-sdk/firebase-ios-sdk/+/master:Firestore/core/src/immutable/sorted_map.h;l=186-197?q=sorted_map.h&ss=firebase-sdk%2Ffirebase-ios-sdk) to using a different underlying data structure (tree rather than array) which invalidates pointers. Fixes #9965.
ehsannas
added a commit
that referenced
this issue
Aug 12, 2022
See similar logic in [Android](https://cs.opensource.google/firebase-sdk/firebase-android-sdk/+/master:firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java;l=173-176?q=LocalDocumentsView.java&ss=firebase-sdk%2Ffirebase-android-sdk) and [Web](https://cs.opensource.google/firebase-sdk/firebase-js-sdk/+/master:packages/firestore/src/local/local_documents_view.ts;l=239-244?q=computeviews&ss=firebase-sdk%2Ffirebase-js-sdk). This is inserting into a map while its being iterated over. Note that SortedMap does not guarantee pointer stability. In fact, upon insertion, SortedMap may [switch](https://cs.opensource.google/firebase-sdk/firebase-ios-sdk/+/master:Firestore/core/src/immutable/sorted_map.h;l=186-197?q=sorted_map.h&ss=firebase-sdk%2Ffirebase-ios-sdk) to using a different underlying data structure (tree rather than array) which invalidates pointers. Fixes #9965.
ehsannas
added a commit
that referenced
this issue
Aug 15, 2022
See similar logic in [Android](https://cs.opensource.google/firebase-sdk/firebase-android-sdk/+/master:firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java;l=173-176?q=LocalDocumentsView.java&ss=firebase-sdk%2Ffirebase-android-sdk) and [Web](https://cs.opensource.google/firebase-sdk/firebase-js-sdk/+/master:packages/firestore/src/local/local_documents_view.ts;l=239-244?q=computeviews&ss=firebase-sdk%2Ffirebase-js-sdk). This is inserting into a map while its being iterated over. Note that SortedMap does not guarantee pointer stability. In fact, upon insertion, SortedMap may [switch](https://cs.opensource.google/firebase-sdk/firebase-ios-sdk/+/master:Firestore/core/src/immutable/sorted_map.h;l=186-197?q=sorted_map.h&ss=firebase-sdk%2Ffirebase-ios-sdk) to using a different underlying data structure (tree rather than array) which invalidates pointers. Fixes #9965.
FYI the fix is included in 9.5.0, released Aug 23, 2022. |
@dconeybe Thanks for the update |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[REQUIRED] Step 1: Describe your environment
CocoaPods
iOS
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
App crashed when data insert & delete at the same time on a firestore collection. data size approx 50 entries.
Relevant Code:
The text was updated successfully, but these errors were encountered: