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

Android/LineageOS: Jamulus settings don't get saved on closing app #2395

Closed
ann0see opened this issue Feb 16, 2022 · 15 comments · Fixed by #3144
Closed

Android/LineageOS: Jamulus settings don't get saved on closing app #2395

ann0see opened this issue Feb 16, 2022 · 15 comments · Fixed by #3144
Assignees
Labels
bug Something isn't working

Comments

@ann0see
Copy link
Member

ann0see commented Feb 16, 2022

Describe the bug
If you change settings in the Jamulus App and close it via the app switcher. On LineageOs it seems as if settings don't persist. Closing via File>Close does save the settings. Probably the .ini file doesn't get written if you close the app via app switcher.

To Reproduce

  • Install Jamulus 3.8.2rc1 on Android 9 (?)
  • Make changes to your profile
  • Close the app via App Switcher
  • Re-open Jamulus and see that the profile settings are reset

Expected behavior
The profile settings are saved (i.e. the ini file gets written on closing the app).

Screenshots

Operating system
Android/LineageOS 16.0

Version of Jamulus
3.8.2rc1

Additional context
This bug seems to be found some time ago by @ngocdh #1382
Maybe not all versions of Android/LineageOS are affected. Therefore someone else with another device should verify.

@ann0see ann0see added the bug Something isn't working label Feb 16, 2022
@pljones
Copy link
Collaborator

pljones commented Feb 16, 2022

Moto G9 Power, Android 11 ("Stock" Motorola release). Freshly installed Jamulus 3.8.2rc1. Same behavour: change a setting (Fancy -> Compact), close the app normally, it's saved; change a setting (Compact -> Fancy), close the app with a swipe to clear, it's not saved.

At a guess, there will be some signal sent to the app, either a *nix SIGxxx or a Qt-level one, that we can catch and process, so I'd hope it's an easy fix if someone can find the appropriate Qt/Android tech docs.

@pljones
Copy link
Collaborator

pljones commented May 21, 2023

Further, my partner reports that simply switching off the screen can cause the app to "time out" and it closes without saving then.

@pljones
Copy link
Collaborator

pljones commented May 23, 2023

Looks like we need to catch changes to state:
https://doc.qt.io/qt-5/qt.html#ApplicationState-enum
https://doc.qt.io/qt-5/qguiapplication.html#applicationStateChanged

(Same in 6.5: https://doc.qt.io/qt-6/qguiapplication.html#applicationStateChanged)

Also this looks interesting - I guess we should honour the request:
https://doc.qt.io/qt-5/qguiapplication.html#saveStateRequest
https://doc.qt.io/qt-6/qguiapplication.html#saveStateRequest

@ann0see
Copy link
Member Author

ann0see commented May 23, 2023

It's a nasty bug. I can only test on a VM as I don't have access to an up to date Android device at the moment.

@pljones
Copy link
Collaborator

pljones commented May 25, 2023

If there were a way of just running the Android build (and, ideally, limiting it to one architecture), I guess I could use github to produce the APK and then install that... Currently, Windows is refusing to build it and my Linux box has no access to an Android device. If I could build the APK at all, using Qt Creator, it would help...

@ann0see
Copy link
Member Author

ann0see commented May 25, 2023

I mean you could probably install Qt with Android support and then set the respective configuration?

@pljones
Copy link
Collaborator

pljones commented May 25, 2023

Yes, that's what I did - following the Qt for Android guide. It gets as far as the deploy step and errors out with

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

@ann0see
Copy link
Member Author

ann0see commented May 25, 2023

Maybe the Java version isn't compatible (related to your issue here: #2767)

Funny what pops up on searching for that (I believe that's quite low effort: https://www.youtube.com/watch?v=izHfFiEK9Jw)
I'd rather look at:
https://stackoverflow.com/questions/61289461/java-lang-noclassdeffounderror-could-not-initialize-class-org-codehaus-groovy-v directly

@pljones
Copy link
Collaborator

pljones commented May 26, 2023

https://docs.gradle.org/current/userguide/compatibility.html
https://gradle.org/releases/
gradle compatibility
https://groovy.apache.org/download.html#requirements groovy compatibilty
(which doesn't have any mention of what version of JDK have been tested against)

Now to find out where the tooling is setting the gradle version... hmmm...

@ann0see
Copy link
Member Author

ann0see commented May 28, 2023

I'd assume it's in .github/autobuild/android.sh ?

@pljones
Copy link
Collaborator

pljones commented May 30, 2023

I don't see specific mention of gradle and it's a linux-based build, too, whereas I'm trying to work on Windows. (It's also using Java 8 and I'm trying to use Java 17... My Windows box has 8, 11 and 17 on but my linux box only 17, currently.)

@ann0see
Copy link
Member Author

ann0see commented May 30, 2023

2023-05-28T14:55:32.7595676Z Unzipping /home/runner/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux/gradle-5.6.4-bin.zip to /home/runner/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux

From https://github.com/jamulussoftware/jamulus/actions/runs/5104913232/jobs/9176149075 lets me believe that it's gradle 5.6.4

@pljones
Copy link
Collaborator

pljones commented May 31, 2023

https://github.com/jamulussoftware/jamulus/actions/runs/5104913232/jobs/9176149075#step:10:1502 indeed.

Unzipping /home/runner/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux/gradle-5.6.4-bin.zip to /home/runner/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux
Set executable permissions for: /home/runner/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux/gradle-5.6.4/bin/gradle

I guess I need that as a dependency to build, then. I'd have expected Qt Creator to get it right, though.

@pljones pljones added this to the Release 3.11.0 milestone Aug 12, 2023
@pljones pljones self-assigned this Aug 12, 2023
@pljones
Copy link
Collaborator

pljones commented Aug 12, 2023

I'm keen to get this one closed for 3.11.0.

pljones added a commit to pljones/jamulus that referenced this issue Aug 12, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 12, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 12, 2023
@ann0see
Copy link
Member Author

ann0see commented Aug 12, 2023

Yes! Please note that I can only test in a VM as I don't have access to a (modern) Android device.

pljones added a commit to pljones/jamulus that referenced this issue Aug 15, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 23, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 25, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 28, 2023
pljones added a commit to pljones/jamulus that referenced this issue Aug 28, 2023
pljones added a commit to pljones/jamulus that referenced this issue Sep 5, 2023
pljones added a commit to pljones/jamulus that referenced this issue Sep 12, 2023
pljones added a commit to pljones/jamulus that referenced this issue Sep 18, 2023
pljones added a commit to pljones/jamulus that referenced this issue Sep 27, 2023
pljones added a commit to pljones/jamulus that referenced this issue Oct 2, 2023
pljones added a commit to pljones/jamulus that referenced this issue Oct 5, 2023
pljones added a commit to pljones/jamulus that referenced this issue Oct 15, 2023
pljones added a commit to pljones/jamulus that referenced this issue Nov 2, 2023
pljones added a commit to pljones/jamulus that referenced this issue Dec 9, 2023
pljones added a commit to pljones/jamulus that referenced this issue Dec 14, 2023
pljones added a commit to pljones/jamulus that referenced this issue Jan 14, 2024
pljones added a commit to pljones/jamulus that referenced this issue Feb 12, 2024
pljones added a commit to pljones/jamulus that referenced this issue Feb 18, 2024
pljones added a commit to pljones/jamulus that referenced this issue Mar 5, 2024
pljones added a commit to pljones/jamulus that referenced this issue Mar 15, 2024
pljones added a commit to pljones/jamulus that referenced this issue Mar 26, 2024
pljones added a commit to pljones/jamulus that referenced this issue Mar 26, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants