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 null ptr #545

Merged
merged 1 commit into from May 18, 2018
Merged

Fix null ptr #545

merged 1 commit into from May 18, 2018

Conversation

Nightsd01
Copy link
Contributor

@Nightsd01 Nightsd01 commented May 17, 2018

• Adds synchronization to all access methods & initializer for Shared Preferences for the SDK.
• This is intended to resolve #513 where, in extremely rare circumstances, the shared preferences object would be accessed before it was initialized, likely the result of a race condition between competing threads.


This change is Reviewable

@Nightsd01 Nightsd01 requested a review from jkasten2 May 17, 2018 19:49
@jkasten2
Copy link
Member

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

Fixes #513, where in very rare cases a concurrency issue could occur where shared preferences was accessed during a buffer flush before the object was actually initialized
• Fixed by adding synchronization to all accesses/initialization of this object
@jkasten2 jkasten2 merged commit 69f99c9 into master May 18, 2018
@jkasten2 jkasten2 deleted the fix_null_ptr branch May 18, 2018 01:41
@rostopira
Copy link

@Nightsd01 Thank you!

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.

NPE on flushBufferToDisk
3 participants