-
Notifications
You must be signed in to change notification settings - Fork 886
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
EXC_BAD_ACCESS AWSIoTMQTTClient.m:1326 #5453
Comments
Thanks for your insight, one of our team members will do some investigation on this as soon as possible |
Thanks @AndrKonovalov for the detailed analysis and your conclusions. Based on them, I've implemented a simple fix in the Thanks! |
Sure, will try |
Hey, your changes fixed it. Issue is gone. Thanks! |
The fix has been released in 2.38.1. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
App randomly crashes with error:
To Reproduce
Steps to reproduce the behavior:
N/A
Observed Behavior
App is crashing
Expected Behavior
I'm expecting to reconnect to the AWS client.
Stack Trace
Code Snippet
N/A
Unique Configuration
N/A
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
Screenshots
N/A
Environment(please complete the following information):
Device Information (please complete the following information):
Logs
EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x8.
0 CoreFoundation +0xa263c _CFRunLoopAddTimer
1 AWSIoT +0x4ddac -[AWSIoTMQTTClient scheduleReconnection] (AWSIoTMQTTClient.m:1326:9)
2 AWSIoT +0x4a928 __43-[AWSIoTMQTTClient initiateReconnectTimer:]_block_invoke (AWSIoTMQTTClient.m:780:9)
3 libdispatch.dylib +0x2138 __dispatch_call_block_and_release
4 libdispatch.dylib +0x3dd0 __dispatch_client_callout
5 libdispatch.dylib +0xb3fc __dispatch_lane_serial_drain
6 libdispatch.dylib +0xbf2c __dispatch_lane_invoke
7 libdispatch.dylib +0x16cb0 __dispatch_root_queue_drain_deferred_wlh
8 libdispatch.dylib +0x16524 __dispatch_workloop_worker_thread
9 libsystem_pthread.dylib +0x4930 __pthread_wqthread
call AWSIoTDataManager.m disconnect method
which is calling AWSIoTMQTTClient.m
disconnect has no synchronization it calls cleanupReconnectTimer
which is invalidates and removes reference to the reconnect timer on the correct thread to avoid creating a memory leak.
The code that then has issues is:
The text was updated successfully, but these errors were encountered: