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

App do not react and will be closed #4

Closed
acutus9 opened this issue Nov 3, 2021 · 8 comments
Closed

App do not react and will be closed #4

acutus9 opened this issue Nov 3, 2021 · 8 comments

Comments

@acutus9
Copy link

acutus9 commented Nov 3, 2021

Hello,
I play the game for quite a while (794282 points), because I love the App Design and gameplay
Unfortunately in the meantime the respond to the user interaction become slower and slower. Now I can not play anymore, because I get after 1 or 2 moves a message from the operating system that tells me the App do not react and close it.
The Android Settings tell me that the App uses 122MB Data. When I delete that data and start again, the App works fine. Looks for me the App save to much history.
I use a Huawei P30 pro, android 10, emui 11.0.0.159

@yvolk
Copy link
Member

yvolk commented Nov 4, 2021

Hello @acutus9. Thank you for your report.

Occupation of 122 MB data is not that much actually and shouldn't be a problem for a device.
I think that amount of data stored is not related to the slowness that you observed.

Next time you encounter the same slowness, please:

  1. Exit the game by navigating to the Home screen.
  2. Restart your device.
  3. After restart please continue playing the same game that played slowly before restart..
  4. Does the game works normally now?

Ps: I guess that an answer at the point 4 will be "yes". I suspect that slowness is caused by some other memory leak. I will start fixing it with an update of the game engine...

@mabalew
Copy link

mabalew commented Nov 7, 2021

I have the same problem. 546692 points and app is not working anymore. After initial logo, it shows the last game screen but even timer is not counting the time. After few seconds the game quits. Restarting of device doesn't help.
Device: Xiaomi POCO M3 Pro 5G.

@yvolk
Copy link
Member

yvolk commented Nov 8, 2021

@mabalew Thank you for the feedback. Looks like it's really not easy to remember so many moves :-)
Will review this and fix.

@yvolk
Copy link
Member

yvolk commented Nov 26, 2021

@acutus9 @mabalew I see that for a quick fix I need to limit maximum number of moves that the app stores it its memory.

Could you help me in testing and "Share game" with me the longest game that you could still open in the app,
e.g. via email andstatus@gmail.com or attaching the shared ".json" file here.
So I could use such long games during performance improvements.

I could get only about 42000 points :-)

@yvolk
Copy link
Member

yvolk commented Nov 26, 2021

Meanwhile I applied the quick fix limiting maximum number of stored moves, please test it after sharing your longest games (in order not to lose first moves of them...)
In addition, I updated Game engine library to the latest version, so maybe this will improve something also...

See #1

yvolk added a commit that referenced this issue Nov 26, 2021
@acutus9
Copy link
Author

acutus9 commented Nov 29, 2021

Hi,
I try your proposal some times. The phone restart procedure help for some moves. Now I am complete stucked. The app crash after I start the game.
2021-08-12-07-22_832440.game2048.zip

@yvolk
Copy link
Member

yvolk commented Nov 29, 2021

@acutus9 Thank you!
I could load your game on my PC (running as a JVM app, where I have much more memory than on Android...) and see the size and the great game :-)
I see that too much memory is needed during saving and loading a game. I will optimize this to allow playing and saving game history even for such long games.

game2048-832440

@yvolk
Copy link
Member

yvolk commented Dec 21, 2021

Dear @acutus9 and @mabalew
I just released v.1.11.0 of the 2048 app, in which the problem with tens of thousand moves is solved. This is achieved by:

  1. During the game saving game moves not in a single record, as before, but in pages (2500 moves per page).
  2. Similar approach for sharing and loading a game: I changed exchange format so that now shared game is loaded sequentially (concatenated JSON...). Old format is still supported, but you may still be unable to load a huge game stored using the old format ,i.e. by app v. before 1.11.

Please note that if you have huge game in your installed app, you need to save it once (e.g. by adding a bookmark or making another move), so app will save it in separate pages...

@acutus9 I manually reformatted your shared game, so now I think you will be able to load it (just unzip):
c2_2021-08-12-07-22_832440.game2048.zip

The new version is available here: #1

Waiting for your feedback!

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

3 participants