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

Bug: Out of memory exception when reading old files #15

Closed
mnowak98 opened this issue Mar 25, 2022 · 5 comments
Closed

Bug: Out of memory exception when reading old files #15

mnowak98 opened this issue Mar 25, 2022 · 5 comments

Comments

@mnowak98
Copy link
Contributor

There seems to be an issue when updating the app, and then reading a save file created in the old version.

Steps to reproduce:
1 Checkout version 3.0.0
2 Add a couple of entries
3 Checkout the newest version => update the app => start the app => app crashes with this error:

java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available

Re-installing the app fixes this bug but also gets rid of previous entries.

@mnowak98
Copy link
Contributor Author

I spotted a potential cause:

readCache(cache.inputStream())

you probably didn't intend to recursively call readCache again, but to call readLegacyCache instead?

@KiARC
Copy link
Owner

KiARC commented Mar 25, 2022

Ah darn, I know what caused that too. My autoformatter likes to replace deprecated calls with non-deprecated ones and that's meant to be the call to readCacheLegacy

@mnowak98
Copy link
Contributor Author

mnowak98 commented Mar 25, 2022

I only spotted it via the little "recursive call" indicator, that Android Studio put next to its line number
grafik

@KiARC
Copy link
Owner

KiARC commented Mar 25, 2022

Oh that's what that is ahaha

@KiARC
Copy link
Owner

KiARC commented Mar 30, 2022

Alright, I've fixed this. The fix will be out in the next patch.

@KiARC KiARC closed this as completed Mar 30, 2022
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

No branches or pull requests

2 participants