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

crash when viewing Saved Presets after upgrading 0.2.7 -> 0.3.x #110

Closed
refola opened this issue Mar 27, 2020 · 6 comments · Fixed by #117
Closed

crash when viewing Saved Presets after upgrading 0.2.7 -> 0.3.x #110

refola opened this issue Mar 27, 2020 · 6 comments · Fixed by #117
Labels
bug Something isn't working

Comments

@refola
Copy link

refola commented Mar 27, 2020

Describe the bug

Noice crashes when I select "saved presets" after updating from version 0.2.7.

To Reproduce

Steps to reproduce the behavior:

  1. Downgrade to version 0.2.7 and reset Noice's app data.
  2. Start a track and save as a preset.
  3. Upgrade to version 0.3.x (tested with 0.3.1 and 0.3.3 on F-Droid).
  4. Go to "Saved Presets".
  5. Watch Noice crash immediately.

Expected behavior

I expected my saved presets to be saved and accessible after updating Noice.

Others

  • Device: OnePlus One
  • Android Version: Pie (Android 9.0, LineageOS 16.0, built on 2020-03-19.)
  • App version: F-Droid

Suspected cause: presets JSON format changes

Using the "Preferences Manager" app from F-Droid, I found a JSON-encoded "presets" setting. The schema seems to have changed between versions, as illustrated by these examples:

  • Noice 0.2.7 "presets": [{"a":"foo","b":[{"a":"birds","b":0.2,"c":60}]}]
  • Noice 0.3.1 "presets": [{"a":"foo","b":[{"b":4,"c":30,"e":"birds"}]}]

Note that I couldn't get this for Noice 0.3.3 because it crashes when I try to save a preset. I reset app data before each of theses tests to avoid conflicts. Noice 0.3.3 additionally crashes when trying to view saved presets from 0.3.1 (in addition to the crash when trying to view presets from 0.2.7), but not when viewing an empty list of presets.

I suspect that you'll want to change this bug to be more specifically about the JSON handling (which you seem to be aware of issues with due to PR #105) or split the different crash scenarios into different bugs. But this 0.2.7 -> 0.3.x upgrade crash is the one I personally ran into as a user.

@refola refola added the bug Something isn't working label Mar 27, 2020
@crogonint
Copy link

I can verify the behavior, haven't looked at the code.

@ashutoshgngwr
Copy link
Member

Thanks for bringing the issue in notice. I now realise that I've screwed up big time. Its gonna be hard to both preserve presets saved on 0.2.7 and fix this issue at the same time. I'll try to come up with a solution that works in both cases. :)

@crogonint
Copy link

Personally, I already had to delete my presets, and I've temporarily downgraded back to 2.7. I don't mind of the presets get lost, this once. Maybe add a feature to back them up?

@ashutoshgngwr
Copy link
Member

@crogonint I think Google backs up the app preferences by default. That is why I didn't take backups under consideration. I'll fix this ASAP.

@ashutoshgngwr
Copy link
Member

@refola These are not multiple issues but one. In #105 , I only addressed half the concern that I thought was breaking backward compatibility. The second half of the issue is Proguard obfuscation.

@ashutoshgngwr
Copy link
Member

ashutoshgngwr commented Mar 29, 2020

@refola @crogonint Created #117 with the fix. Will merge it after testing it for a while.

Edit: I am pushing the fix to beta program on Google Play. Should be available for download shorty after. Please re-open this if the issue persists.

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
3 participants