aws-amplify / aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
https://aws-amplify.github.io/docs
Other
1.68k stars 880 forks source link

Crash on [AWSMQTTSession publishDataAtLeastOnce:onTopic:retain:onMessageIdResolved:] function #5436

Open 09chen1998 opened 1 week ago

09chen1998 commented 1 week ago

Describe the bug Our app occasionally crashes, some of which occur after calling subscribeToTopic, some after calling publishData, and some during other operations.

To Reproduce Steps to reproduce the behavior: There is no fixed reproducibility procedure, and crashes occur at irregular intervals.

Code Snippet Please provide a snippet of the code causing the issue or how you are using the service that has the bug.

Unique Configuration If you are reporting an issue with a unique configuration or where configuration can make a difference in code execution (i.e. Cognito) please provide your configuration. Please make sure to obfuscate sensitive information from the configuration before posting.

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?

Screenshots image

Environment(please complete the following information):

Device Information (please complete the following information):

Logs image

``` ```

Could it be caused by multiple threads accessing the same resource?

vincetran commented 6 days ago

Thanks for your crash report, one of our team members will do some investigation on this as soon as possible

09chen1998 commented 3 days ago

@vincetran that's newest screenshot when app crash: image

phantumcode commented 2 days ago

@09chen1998 Instead of screenshots, can you provide a full crash log that includes the crashing thread along with all of the other running threads?

09chen1998 commented 13 hours ago

@phantumcode The complete crash log is the screenshot of the log I provided above. The latest screenshot I sent is not a crash in the production/test environment, so there is no complete log left. However, judging from the code execution sequence, it is caused by the same problem as the log under "Logs" I provided.