bruce-visscher / mathdoku

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

Another game restore crash #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

The other big crash report from numerous users:

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.NullPointerException
at 
net.cactii.mathdoku.GameFileConverter.doInBackground(GameFileConverter.java:189)
at 
net.cactii.mathdoku.GameFileConverter.doInBackground(GameFileConverter.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
... 4 more

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Apparently an error occurred while loading a grid at line 185 of 
GameFileConverter.jave in which case grid.load() returns a null value. We need 
access to such a grid in order to be able to solve the problem. Meanwhile we 
can skip a file which can not be loaded succesfully.

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

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

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

GoogleCodeExporter commented 9 years ago
Test scenario:
- Clean install of R77
- New Game
- Save Game
- Press Back (to save current game)
- edit both save files (savedgame & savedgame_0) to corrupt them
- Upgrade to R273
- Start MathDoku - crash during startup
- Upgrade to R278
- Start MathDoku - both corrupted games (current & saved) have been discarded

Tested upgrading directly from R77 & R278 - no crash, corrupted game discarded
Tested multiple saved games, only 1 corrupted - no crash, only corrupted game 
discarded

Tests successful.

NOTE: The fact that numerous users have reported this issue presumably mean 
there is a case that the savedgame upgrade code does not handle. But in the 
absence of an example saved game and the inability to replicate it (I 
couldn't), discarding these games seems a pragmatic way to get a quick fix out 
-> Verified.

Original comment by em...@srlee.com on 28 Apr 2013 at 12:18

GoogleCodeExporter commented 9 years ago
I expect this problem to be caused by older save files in which not all data is 
available which is required by later versions. Note that prior to r77 there was 
no versioning done inside the game file nor conversion done at upgrading.

In the usage log files the number of games which could not be converted is 
reported. Based on the logfiles we can decide whether extra investigation needs 
to be done. Files which are ignored are still present at the device and are not 
removed.

Original comment by paul.din...@gmail.com on 28 Apr 2013 at 1:46