[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-22 Thread Zombies and Robots
On Feb 22, 7:49 am, Mark Murphy wrote: > In the case of LunarLander, LunarView is a SurfaceView, which has > getContext() to return the Context for the view. Oh yeah--thanks! I tried using getContext() to provide the context, and it seems to work for the most part. It's just frustrating that e

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-22 Thread Mark Murphy
Zombies and Robots wrote: > I suppose I could just set gameThread to a new GameThread() > and try to start that, but that approach won't work because I need to > supply the Context for the GameThread, and that isn't passed to > surfaceCreated(). In the case of LunarLander, LunarView is a SurfaceV

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-22 Thread Zombies and Robots
AHA! I *knew* I was doing everything just like LunarLander did. I was! That was the problem. This particular bug was really bothering me. I became a little obsessed with it, so I tried logging practically everything that my game did while it was running. After lots of painstaking work, I fina

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-18 Thread Zombies and Robots
After dissecting my code and playing around with the logs quite a bit, I've determined that the problem starts when the activity's onResume() is called, even though all that my overridden onResume() does is run super.onResume(). There may be more to this. I'll post more later. --~--~-~--

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-18 Thread Zombies and Robots
Thanks for the responses! I really appreciate the help! I'm about to give the try/catch and logging idea a try. I'll let you know if I turn up anything. I'll also post the code as soon as I'm able to. I just have to move it from the other computer. --~--~-~--~~~---

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-18 Thread Mike Hearn
Could you post the relevant code of StealthView? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from

[android-developers] Re: IllegalThreadStateException when program is restored

2009-02-18 Thread Al Sutton
Have you put a try/catch block around the whole of your run method and logged any output? Al. Zombies and Robots wrote: > I'm hoping somebody who is more familiar with Android's application > life-cycle will be able to help me out here. > > I'm writing a game. From inside the game, I open a ne