Skip to content
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

fix(IoT): Fixing a intermittent crash when deallocating AWSIoTStreamThread #5269

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

sebaland
Copy link
Member

@sebaland sebaland commented Mar 27, 2024

Issue #, if available:

Description of changes:
We're currently calling [self cleanUp] on dealloc, which basically invalidates the timer and checks if it should close the streams and invoke a callback.

Generally, it's not recommended to rely on the dealloc method to perform expensive operations. cleanUp is already always being called when the thread is cancelled, so calling it again when the thread is deallocated is not only redundant, but might be the cause of the linked crash due to attempting to access other near-deallocated objects and/or properties.

Check points:

  • Added new tests to cover change, if needed
  • All unit tests pass
  • All integration tests pass
  • Updated CHANGELOG.md
  • Documentation update for the change if required
  • PR title conforms to conventional commit style

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sebaland sebaland requested review from awsmobilesdk and a team as code owners March 27, 2024 17:39
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:39 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland temporarily deployed to IntegrationTest March 27, 2024 17:40 — with GitHub Actions Inactive
@sebaland sebaland merged commit 0f5d139 into main Mar 28, 2024
67 checks passed
@sebaland sebaland deleted the ruisebas/fixing-crash-iot branch March 28, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants