-
Notifications
You must be signed in to change notification settings - Fork 67
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
application crash #5
Comments
I get the same issue. |
I believe I'm aware of the bug causing the crash you mentioned, although I haven't managed to track down the cause exactly. Could you provide me with a stacktrace? |
same issue here, it's easy to reproduce : play the game in 24*24 with 3 color which is quite easy. |
I can't be fully sure of the crash that's happening on your devices because I don't have a stacktrace, but I'm fairly sure that this is a stackoverflow error due to seeing almost exactly the same problem on my friend's phone. Because I can't replicate this error on my phone, can one of you try building the app from the iterative_floodfill branch, installing it to your device and seeing if that solves the problem. I've replaced the recursive flood fill algorithm with an iterative one on that branch, which should solve the problem. |
I have reproduced it thanks to the instruction above. 24x24 grid with 3 colors. One of the very last move caused the application to quit and the Android popup I had
My setup is irrelevant but: Phone: Google Galaxy Nexus, rather old phone floodFill() being a recursive function which lacks some harness to prevent it from overflowing the stack. Most probably it is going too deep. |
If you give an apk, I can test, but I don't know anything about compilation for android. |
On large boards with mostly the same color, the recursive algorithm goes to deep and the poor Android stack ends up filled. The other filling algorithm would not suffer from that.b It does not fill the stack. So imho it is already fixed. Need testing of the new algo. |
I have merged the iterative_floodfill branch into master. The algorithm that I replaced the old recursive one with is pretty simple, works fine on my phone, and fixed this problem on another phone that I tested. I will be releasing 1.1.1 shortly which will contain the new algorithm. If anybody finds any problems with the new algorithm, please open a new issue. |
F-Droid has pushed 1.1.1 (their page) which comes with the new iterative algorithm. That definitely fixed the uses cases mentioned on this issue. Well done @GunshipPenguin |
same here, I confirm it's working fine with 1.1.1 |
Thanks for this simple and nice game :)
If i change the color number to max, and grid size to 22x22, the application tends to crash at the moment I complete the flood.
The text was updated successfully, but these errors were encountered: