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
[Bug]: [OneSignal startNewSessionInternal] Crash #1369
Comments
Hi @tikidunpon, thank you for reporting.
These lines are very obscure and we have trouble knowing what methods are called to resolve this issue. The real classes and methods are being hidden. Are you able to take the crash report and symbolicate it? |
@nan-li Since this crash occurs infrequently, we suspect that the problem is due to concurrency or lack of memory, or both. |
I see, I have been investigating how to get more information than I haven't been able to get far with just this stacktrace since these could be a method in one of many classes 🤔. |
I read the code. I could not find a cause of the crash, but I did find potentially cause problems in concurrency. 1. Unsafe initialization of singleton instancesSingleton instances should be safely initialized only once using For example, the following code is potentially unsafe. (and all other singleton initialization points) OneSignal-iOS-SDK/iOS_SDK/OneSignalSDK/OneSignalOutcomes/OSOutcomes.m Lines 37 to 39 in 8f47b6f
2. Unsafe mutable state accessCritical sections should be exclusively controlled using dedicated Sirial Queues or other methods. For example, the following code is potentially unsafe. (and all other singleton mutable state access) OneSignal-iOS-SDK/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSSessionManager.m Line 105 in 8f47b6f
|
We decided to downgrade to v3 sdk due to many crashes when rolling out as is. looking forward to the improved stability of the v5 sdk. Thank you. |
Thanks for the feedback @tikidunpon, The callouts you made are on old code that also exist on v3 of the SDK. We haven't had crash reports from those, but it is still good to be aware and address the potential problems. They are in a different framework, so the crash you are seeing is coming from our
Can you share the crashes you experienced during your rollout? |
@nan-li We have only rolledout to a few percent of the total users yet. But other crashe have occurred. I will share those logs with you.
|
Hi @tikidunpon I have experienced the same two crashes in a new app that has less than 100 users, so this is concerning. I also have an app that has 3.0.0 which never had these crashes. Is there any update on this issue? |
Hi @guillecom what version of the OneSignal iOS SDK did the crashes occur on? |
Hi @tikidunpon and @guillecom, we have a few crash fixes since these reports. Please update to Release 5.1.6 or later, and let us know if the crashes are resolved, or what crashes still remain. |
What happened?
Crashes occur at a rate of about 1 in 7,000.
Steps to reproduce?
What did you expect to happen?
Crash should not happen.
OneSignal iOS SDK version
Release 5.1.0
iOS version
15
Specific iOS version
- iOS 17.3.1
Relevant log output
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Code of Conduct
The text was updated successfully, but these errors were encountered: