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

Uncatchable crash when storing a string set that contains a null item #46

Closed
pablobaxter opened this issue Sep 16, 2022 · 0 comments · Fixed by #47
Closed

Uncatchable crash when storing a string set that contains a null item #46

pablobaxter opened this issue Sep 16, 2022 · 0 comments · Fixed by #47

Comments

@pablobaxter
Copy link
Owner

A string set that contains a null item causes HarmonyTransaction to crash, due to it not handling null values in string sets. This only occurs when using apply due to the transactional nature of Harmony updates that allow it to do quick reloads. Example code below:

val prefs = context.getHarmonySharedPreferences("prefs")
val testHashSet = hashSetOf<String?>(null)
prefs.edit().putStringSet("test", testHashSet).apply()

This causes a crash in an internal background thread.

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 a pull request may close this issue.

1 participant