Closed 5anniversary closed 6 months ago
Solution The issue was identified as a concurrent access problem. The function -[FBSDKAppEvents flushOnMainQueue:forReason:] was being called, causing a crash due to the dictionary being accessed simultaneously by the main thread and the thread where the crash occurred. Ensuring that the function is called on the main thread resolved the issue.
DispatchQueue.main.async {
AppEvents.shared.logEvent(
facebookEventName,
parameters: facebookEventParams
)
}
By making sure that the flushOnMainQueue function is executed on the main thread, we avoided the concurrent access issue and resolved the crash.
Closing the Issue The issue has been resolved by addressing the concurrent access problem. Ensuring that the function flushOnMainQueue is executed on the main thread prevented the crash. Thus, I am closing this issue.
Checklist before submitting a bug report
Xcode version
15.3.0
Facebook iOS SDK version
17.0.1
Dependency Manager
SPM
SDK Framework
Core
Goals
I aim to ensure that the SensitiveParamsManager.processParameters function in the Facebook SDK processes event parameters reliably and filters sensitive information without causing any crashes due to memory access violations.
Expected results
I expect that all event parameters passed to the function are correctly filtered to remove sensitive information, and the process should handle all inputs without resulting in any memory access errors or application crashes.
Actual results
When processing some event parameters, the application crashes with an EXC_BAD_ACCESS (SIGSEGV) error within the SensitiveParamsManager.processParameters function. This suggests an attempt to access an invalid or unallocated memory address during the parameter processing stage.
Steps to reproduce
No response
Code samples & details
we call in this code
and we encounter this crash log