There appears to be a synchronization related bug in the Lunar Lander example or SurfaceView. I need help debugging it because I've inadvertently copied the bug into my own project.
How to recreate it: Start Lunar Lander. Press up to start playing. Press Home. Long-Press Home to get the Activity stack. Select Lunar Lander in the Activity Stack. I'm sure there are other ways variants to the same end, but this is repeatable on 1.0r1 emulator (I'm running on Mac). Stack traces and variables from Eclipse debugger follow: ================================================== Stack Trace --------------------------------------------------------- Thread [<3> main] (Suspended (exception IllegalThreadStateException)) LunarView(SurfaceView).updateWindow(boolean) line: 362 LunarView(SurfaceView).onWindowVisibilityChanged(int) line: 173 LunarView(View).dispatchWindowVisibilityChanged(int) line: 3241 FrameLayout(ViewGroup).dispatchWindowVisibilityChanged(int) line: 691 FrameLayout(ViewGroup).dispatchWindowVisibilityChanged(int) line: 691 PhoneWindow$DecorView(ViewGroup).dispatchWindowVisibilityChanged(int) line: 691 ViewRoot.performTraversals() line: 587 ViewRoot.handleMessage(Message) line: 1103 ViewRoot(Handler).dispatchMessage(Message) line: 88 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3742 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 515 ZygoteInit$MethodAndArgsCaller.run() line: 739 ZygoteInit.main(String[]) line: 497 NativeStart.main(String[]) line: not available [native method] ================================================== Variables --------------------------------------------------------- this LunarView (id=830056358096) mAttachInfo View$AttachInfo (id=830056328120) mBackgroundResource 0 mBackgroundSizeChanged true mBGDrawable null mBottom 455 mCallbacks ArrayList (id=830056358512) mContext LunarLander (id=830056347464) mContext LunarLander (id=830056347464) mCoveredInsets Rect (id=830056358776) mCurrentAnimation null mDestroyReportNeeded true mDrawableState null mDrawingCache null mDrawingCacheBackgroundColor 0 mDrawingStopped false mFloatingTreeObserver null mFormat -1 mHandler SurfaceView$1 (id=830056358976) mHasPerformedLongPress false mHaveFrame true mHeight 455 mID 2131034112 mIsCreating false mLastLockTime 55492 mLayout WindowManager$LayoutParams (id=830056358648) mLayoutParams FrameLayout$LayoutParams (id=830056294272) mLeft 0 mLeft 0 mLocation int[2] (id=830056358448) mMeasuredHeight 455 mMeasuredWidth 320 mMinHeight 0 mMinWidth 0 mNewSurfaceNeeded false mNextFocusDownId -1 mNextFocusLeftId -1 mNextFocusRightId -1 mNextFocusUpId -1 mOldHeightMeasureSpec 1073742279 mOldWidthMeasureSpec 1073742144 mOnClickListener null mOnCreateContextMenuListener null mOnFocusChangeListener null mOnKeyListener null mOnLongClickListener null mOnTouchListener null mPaddingBottom 0 mPaddingLeft 0 mPaddingRight 0 mPaddingTop 0 mParent FrameLayout (id=830056355256) mPendingCheckForLongPress null mPrivateFlags 134800 mRequestedFormat -1 mRequestedHeight -1 mRequestedType -1 mRequestedVisible true mRequestedWidth -1 mResources Resources (id=830056332440) mRight 320 mScrollCache null mScrollX 0 mScrollY 0 mSession IWindowSession$Stub$Proxy (id=830056334560) mStatusText TextView (id=830056315544) mSurface Surface (id=830056358592) mSurfaceFrame Rect (id=830056359008) mSurfaceHolder SurfaceView$2 (id=830056359288) mSurfaceLock ReentrantLock (id=830056358544) mTag null mTempRect Rect (id=830056358480) mTop 0 mTop 25 mTouchDelegate null mType -1 mUserPaddingBottom 0 mUserPaddingRight 0 mViewFlags 134217857 mVisible true mWidth 320 mWindow SurfaceView$MyWindow (id=830056319160) mWindowAttachCount 1 mWinFrame Rect (id=830056358744) thread LunarView$LunarThread (id=830056361944) visible true relayoutResult 3 creating false formatChanged false myHeight 455 myWidth 320 sizeChanged false typeChanged false visibleChanged true force false --~--~---------~--~----~------------~-------~--~----~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---