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

Crashing issue with Preference Change listener #41

Closed
pablobaxter opened this issue Mar 11, 2022 · 2 comments
Closed

Crashing issue with Preference Change listener #41

pablobaxter opened this issue Mar 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pablobaxter
Copy link
Owner

There seems to be some sort of crashing issue when calling toSet() on the keys of the WeakHashMap used for the OnSharedPrefernecesChangeListener. Investigation underway.

@pablobaxter pablobaxter added the bug Something isn't working label Mar 11, 2022
@pablobaxter pablobaxter self-assigned this Mar 11, 2022
@pablobaxter
Copy link
Owner Author

Example partial stacktrace:

Fatal Exception: java.util.NoSuchElementException
       at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:808)
       at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:839)
       at kotlin.collections.CollectionsKt___CollectionsKt.toSet(_Collections.kt:1345)
       at com.frybits.harmony.HarmonyImpl$HarmonyEditor.commitToMemory(Harmony.kt:841)
       at com.frybits.harmony.HarmonyImpl$HarmonyEditor.apply(Harmony.kt:817)

@pablobaxter
Copy link
Owner Author

It appears as if I am not the first person to see this type crashing issue: https://issuetracker.google.com/issues/181683711

Like that ticket states, this does appear to be a rare crash, but for some reason is spiking with Android 11/12 as of late. In an app with tens of thousands of users, I'm seeing ~1k daily crashes. Harmony has not changed in this app, and previous releases of the app do not show this crash. It's possible that there could be something app side, but doing due diligence investigation to figure out why this spike is occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant