• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Touchscreen forces close after second instance.

barley06

Lurker
Hi All,
I hope someone can help me. I am a newbie to Android but experienced in other areas. I have been developing a game for some time now. The game uses the touchscreen to select blocks. Everything works fine at first. I then select back,l save the state of the score, the level and the timer, which is quite important to the game. On unPause, and resume, these integers and doubles are restored correctly. The problem I am facing is that when I touch the screen again, this causes a "Force Close". Do I need to save the state of the environment aswell e.g. the touchscreen or view. I am struggling to work out from logcat what is going wrong. I have included the following debug from logcat. I would appreciate any help.

Regards,
Karl :)

W/WindowManager( 65): Key dispatching timed out sending to com.blastem/com.blastem.Blastem
W/WindowManager( 65): Previous dispatch state: {{KeyEvent{action=1 code=82 repeat=0 meta=0 scancode=229 mFlags=8} to Window{43ef2108 Keyguard paused=false} @ 1287329205888 lw=Window{43ef2108 Keyguard paused=false} lb=android.view.ViewRoot$W@43f508c0 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43ef2108 Keyguard paused=false}}}
W/WindowManager( 65): Current dispatch state: {{null to Window{4401c918 com.blastem/com.blastem.Blastem paused=false} @ 1287329318945 lw=Window{4401c918 com.blastem/com.blastem.Blastem paused=false} lb=android.os.BinderProxy@44015918 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{4401c918 com.blastem/com.blastem.Blastem paused=false}}}
I/Process ( 65): Sending signal. PID: 277 SIG: 3
 
Does it include the line number and procedure that is causing the error? It looks like the "null to Window" part is the problem -- are all references to your views properly set?
 
Back
Top Bottom