Coder Social home page Coder Social logo

Comments (13)

TimmyT123 avatar TimmyT123 commented on June 22, 2024

I remember I had a phone that acted similar. When I had too many apps in the background, I believe Android would need resources (memory) for the foreground app and take away from the background apps. I would close some background apps that I didn't need and everything was fine. I think there may be a way to make chess priority over the other background apps. It would be nice to duplicate the problems that you are having. I'll chat with Jeroen about it. Thank you.

from android-chess.

jcarolus avatar jcarolus commented on June 22, 2024

Yes, it's most probably a problem with resources. My opinion is that the way the app is put to the foreground seems a bit intrusive (both system-wise and from user experience view).
I suggest we implement a notification to the user that a challenge was accepted, and by clicking on it, open the activity. This way, Android will do the switching of processes and I suspect this will work without crashes. We can also remove the 'app history' rights, which makes the also more appealing to users who do not understand why an app would need these rights.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

It has happened before when the app is in the foreground, it's just that I don't usually sit and wait for someone to accept a seek. I used to think it had to be in the background too but it happened when I was in the app staring at the board also, and more than once. It depends more on how long has elapsed since last playing... if it's been a while then it will crash when the seek is accepted even when only a few seconds have elapsed since switching out of the app (when the app is still fully in memory, presumably, so I take back that it has to be "well gone from memory"). Once it happens, I can start another seek, happily go use a bunch of apps, and once it gets foregrounded it will not crash. It just needs to be "primed" by this first crash.

Now sometimes the app just vanishes from memory under memory pressure and when I switch back to it, the app starts anew and I have to login. This happens when I use a bunch of apps and probably Chess falls off Android's LRU. I think that is normal and expected behavior and not related to this bug. Usually when this bug happens I only go to one other app, the last one used, because I want to keep Chess in memory and expect a game soon. I think this bug is different than just having gotten evicted due to memory pressure.

I actually like the current behavior of buzzing and quickly foregrounding the app... anything to reduce latency of making the first move. Most people only wait a few seconds before concluding you are not present and aborting. However, reducing permissions is a powerful motivation on its own... but, I think this behavior choice is orthogonal to this bug.

Why not look at the stack dump? I marked them clearly in comments that should be attached to the crash reports. Doesn't it inform of the exact exception point?

from android-chess.

jcarolus avatar jcarolus commented on June 22, 2024

Looking at the stack trace marked "crashes frequently now when accepting a match. never used to a months ago. no changes on my end" it is indeed not a memory issue, just a plain null pointer exception which can be fixed easily. Is that your comment?

I'll go with good fast usability over reducing permissions.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

yes, there were a number of them I submitted, sometimes several in a row. that sounds like mine. but there were many others which might be more clearly marked as belonging to this bug such as including words "foreground" or "background" or "memory." I probably submitted 5-10 with additional comments and 10 more without. later ones would be from this email, earlier ones from a different one with my fullname as the address.

I did look at most of them to see that they were NullPointerException and not a memory exception, which I typically don't submit because the app can't do anything about those.

from android-chess.

jcarolus avatar jcarolus commented on June 22, 2024

Then something is wrong with reporting or fetching crash reports in the Google Play store. There are only 7 Nullpointer exception reports with user messages attached, none including your key words. Anyway - I think we found the problem.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

it's possible I've exaggerated the number in my memory over time due to frustration with lost points. in future (after next app update) I will submit issue with time of crash report submission and what the exception was.

thanks very much for looking into it...

from android-chess.

TimmyT123 avatar TimmyT123 commented on June 22, 2024

We believe a NullPointerException has been fixed and using a notification instead of bringing the app to front may be better for Android resources.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

to verify it's really same one, it just happened to me again moments ago, I submitted crash report with subject "instance of bug #110 crash" (oops, wrong bug number, but that's the right crash)

from android-chess.

TimmyT123 avatar TimmyT123 commented on June 22, 2024

The application version is on 8.7.1, now. It looks like you have 8.7.0.

from android-chess.

TimmyT123 avatar TimmyT123 commented on June 22, 2024

I'll be able to keep an eye on crashes and ANRs, now. Thanks to Jeroen.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

I didn't realize the update had been pushed, thanks. Just updated and will know within a few days if it's fixed because the crash is pretty reliable.

What I meant though was to check that the recent crash was the same as the one that got fixed, to make sure it isn't a different bug.

In any case, I'll close the bug after a week if I don't see it again with the update. Thanks again for taking a look.

from android-chess.

smemsh avatar smemsh commented on June 22, 2024

has not reappeared. thanks.

from android-chess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.