tags:

views:

147

answers:

2

Have you ever met such problems? When exiting the activity in a thread in a SurfaceView.
This log appears in this situation:

05-18 15:20:20.344: ERROR/AndroidRuntime(2018): Uncaught handler: thread main exiting due to uncaught exception
05-18 15:20:20.355: ERROR/AndroidRuntime(2018): java.lang.IllegalArgumentException: parameter must be a descendant of this view
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:2454)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:2391)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1301)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewRoot.draw(ViewRoot.java:1107)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.os.Looper.loop(Looper.java:123)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at android.app.ActivityThread.main(ActivityThread.java:3948)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at java.lang.reflect.Method.invokeNative(Native Method)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at java.lang.reflect.Method.invoke(Method.java:521)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-18 15:20:20.355: ERROR/AndroidRuntime(2018):     at dalvik.system.NativeStart.main(Native Method)
A: 

No. (that is the answer to your question :P)

To solve your problem, could you please post the code of the Activity this exception was thrown in? Especially parts where views are created&destroyed from code.

molnarm
you can email me , my email is [email protected]
A: 

This seems like a platform issue that has not yet been resolved. I'm trying to find a way to trap the exception or avoid it somehow... I have the same problem in my app.

See also http://groups.google.com/group/android-developers/browse_thread/thread/4e2a2ac4d363d1f

swinefeaster