weijiang8410 / mathdoku

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

Crash report in cell draw from play.google.com #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Numerous users have reported this. Looks like something to do with their saved 
games.

java.lang.NullPointerException
at net.cactii.mathdoku.GridCell.draw(GridCell.java:422)
at net.cactii.mathdoku.GridView.onDraw(GridView.java:313)
at android.view.View.draw(View.java:6880)
at net.cactii.mathdoku.GameFile.savePreviewImage(GameFile.java:520)
at net.cactii.mathdoku.MainActivity$18.run(MainActivity.java:1297)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by bbux...@gmail.com on 27 Apr 2013 at 8:56

GoogleCodeExporter commented 9 years ago

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 6:29

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
 1. Start with clean install of revision77
 2. Start a new games.
 3. Enter some maybe values
 4. Save game
 5. Start new game.
 6. Either finish it or just reveal the solution.
 7. Upgrade to new version.

Explanation of cause:
As the digit controls below the grid are not shown for a completed puzzle the 
variabale digitPositionGrid is not initialized when converting the game with 
maybe values which causes the null-pointer assignment.

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 7:14

GoogleCodeExporter commented 9 years ago
After solving the error described before, a similar error occured when loading 
the grid saved in step 4.

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 7:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r277.

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 7:29

GoogleCodeExporter commented 9 years ago
Issue 146 has been merged into this issue.

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 8:32

GoogleCodeExporter commented 9 years ago
Two scenarios found/tested (based on information above)
1) Immediate crash on startup after update
- Clean install on old R77
- New Game
- Add some maybe values to a cell
- Save Game
- Complete game (via Show Solution)
- Update to R273
- Start MathDoku - Crash at startup during "Creating Preview Images"

Results:
a) Reproduced between R77 & R273
b) Could not reproduce between R77 & R278
c) Reproduced between R77 & R273, then upgraded to R278 - MathDoku no longer 
crashes at startup
All successfull

2) Clean install of new version, crashes on Load game occasionally
- Clean install of new R273
- New Game
- Add some maybe values to a cell
- Save Game
- Complete game (via Show Solution)
- Press Back button (to close/shutdown MathDoku)
- Start MathDoku (completed grid should be shown)
- Select Load/Save from menu
- Select the saved game and press Load -> crash

Results:
a) Reproduced in R273
b) Could not reproduce in R278
All successfull

Original comment by em...@srlee.com on 28 Apr 2013 at 11:41