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

Unwrapping optionals fixed #413

Merged
merged 2 commits into from
Apr 29, 2021
Merged

Unwrapping optionals fixed #413

merged 2 commits into from
Apr 29, 2021

Conversation

philips77
Copy link
Member

@philips77 philips77 commented Apr 28, 2021

In multiple places in the library optional variables that should never be nil were force-unwrapped. However, never say newer. It has been reported multiple times, e.g. in #394 , #213, #381. This PR fixes all force-unwrapped variables and makes sure they do not happen again. However, the behavior after the fixes is unknown. My assumption is, that the crashes were causes by sudden disconnection, which caused the DFU service being destroyed in the middle of uploading, so there should be no memory leaks, as everything gets cleaned up. But it may also happen, that the DFU process is in some weird state, that I cannot think of right now, that the service is disposed, but DFU executor is not, which would end up in handing cycling reference causing some objects not being disposed properly. But the chances of this are super low.

@philips77 philips77 merged commit 02388c5 into develop Apr 29, 2021
@philips77 philips77 deleted the bugfix/unwrapping-optionals branch April 29, 2021 10:36
@philips77 philips77 mentioned this pull request Apr 29, 2021
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.

1 participant