Android, error after 3-4 runs
<p>I am a noob learning Android and making my own little demo project at the same time.</p>

<p>Basically, when the user starts my app it shows levels.java with 8 buttons, when the user clicks the 8th button this fires:</p>

<pre><code>public void button_clicked8(View v) {
        text1.setText("clicked 8");
        startActivity(new Intent(this, GameScreen.class));
}
</code></pre>

<p>which starts my main <code>gamescreen</code> class where the simple game is played.</p>

<p>If the user gets the math problem wrong 3 times, the game is over and I fire this code:</p>

<pre><code>r_settings.setGameStarted(false);
        r_settings.setGameOver(0);
        r_settings.setInternalLevel(0);
        r_settings.setDisplayLevel(0);

        this.finish();
</code></pre>

<p>which basically resets some static variables and sends the user back to the levels.java screen.</p>

<p>So far all of the above works like a charm, in the levels screen if the user presses the 8 button again the game starts again, the problem is this works for around 4 times, on the 4th or 5th time it goes to the gamescreen but nothing works... and then in logcat I get this error:<br>
<a href="http://imageshack.us/photo/my-images/546/68081548.png/" rel="nofollow">http://imageshack.us/photo/my-images/546/68081548.png/</a><br>
<a href="http://imageshack.us/photo/my-images/59/93717315.png/" rel="nofollow">http://imageshack.us/photo/my-images/59/93717315.png/</a><br>
(you need to click the image to see it full size)</p>

<p>Where am I going wrong?</p>

<p>Thanks!<br>
R</p>
