rusdewey / mathdoku

Automatically exported from code.google.com/p/mathdoku
0 stars 0 forks source link

Rare Force Close after installing new version #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install new version of MathDoku
2. Start Game and select Menu - New Game - 6x6 (hard)

What is the expected output? What do you see instead?
It should create a new game. Very rarely, it causes a force close.

Log from Android:

ERROR/AndroidRuntime(1068): FATAL EXCEPTION: main
ERROR/AndroidRuntime(1068): java.lang.IndexOutOfBoundsException: Invalid index 
6, size is 4
ERROR/AndroidRuntime(1068):     at 
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257)
ERROR/AndroidRuntime(1068):     at java.util.ArrayList.get(ArrayList.java:311)
ERROR/AndroidRuntime(1068):     at 
net.cactii.mathdoku.GridView.CageIdAt(GridView.java:194)
ERROR/AndroidRuntime(1068):     at 
net.cactii.mathdoku.GridCage.setBorders(GridCage.java:425)
ERROR/AndroidRuntime(1068):     at 
net.cactii.mathdoku.GridCage.userValuesCorrect(GridCage.java:401)
ERROR/AndroidRuntime(1068):     at 
net.cactii.mathdoku.GridView.onDraw(GridView.java:389)
ERROR/AndroidRuntime(1068):     at android.view.View.draw(View.java:6740)

Original issue reported on code.google.com by em...@srlee.com on 10 Nov 2010 at 11:32

GoogleCodeExporter commented 9 years ago
Appears to be caused by screen redraw at the same time the puzzle is being 
created. It occasionally draws a grid which is only half constructed, which can 
lead to errors.

Original comment by em...@srlee.com on 10 Nov 2010 at 12:06

GoogleCodeExporter commented 9 years ago
Twofold approach to solution:
- Move code which adjusts button visibility until puzzle creation is complete - 
avoids redraw during puzzle creation
- Use synchronized lock to avoid simultaneous redraw & creation.

Original comment by em...@srlee.com on 10 Nov 2010 at 1:30

GoogleCodeExporter commented 9 years ago
Can not be reproduced. Assume that it is no longer a problem anymore.

Original comment by paul.din...@gmail.com on 15 Mar 2013 at 2:39