in an Objective-C++ object deallocation stack in thread
Queue: com.google.firebase.firestore (serial)
where it is, er, "releasing its reference" to a Swift closure I passed it. Inside the Swift closure is a reference* to a Kotlin lambda that was passed into my Swift code from my Kotlin code. when I refactor the code to not pass the Kotlin lambda into Swift, the crash (seems to**) go away. Am I missing something obvious? Should I
.freeze()
that lambda?
*The Kotlin lambda does not need to be called for the crash to occur.
**The crash is known to both occur and not occur without any code changes, but I seem to have found a configuration where it reliably happened 100% of the time, then refactoring out the lambda made it go away.. could theoretically still be a red herring.
s
svyatoslav.scherbina
05/21/2019, 9:23 AM
in thread
Queue: com.google.firebase.firestore (serial)
where it is, er, “releasing its reference” to a Swift closure I passed it. Inside the Swift closure is a reference* to a Kotlin lambda
Known issue. You have incorrect object sharing.
Should I
.freeze()
that lambda?
This should help.
d
David Stolarsky
05/21/2019, 9:57 AM
help?
David Stolarsky
05/21/2019, 9:58 AM
what do you mean?
David Stolarsky
05/21/2019, 9:58 AM
is the known issue documented somewhere?
s
svyatoslav.scherbina
05/21/2019, 11:08 AM
what do you mean?
I mean that freezing lambda will likely fix the issue.