Hi,
I have one surface view in one activity.
I am using the surface of the srface view in my native code.
But some times while moving out of the activity i am getting
"IllegalArgumentException".
By the time surface view is getting destroyed, SufaceViewHolder call
back is getting called.
What needs to be done to prevent the exception?
The logcat stack trace is as follows.
02-21 18:34:26.472 E/Surface ( 941): surface (identity=234) is
invalid, err=-19 (No such device)
02-21 18:34:26.472 E/Surface ( 941): queueBuffer (idx=0) failed (No
such device)
02-21 18:34:26.472 D/AndroidRuntime( 941): Shutting down VM
02-21 18:34:26.472 E/AndroidRuntime( 941): FATAL EXCEPTION: main
02-21 18:34:26.472 E/AndroidRuntime( 941):
java.lang.IllegalArgumentException
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.view.Surface.unlockCanvasAndPost(Native Method)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.view.ViewRoot.draw(ViewRoot.java:1551)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.view.ViewRoot.performTraversals(ViewRoot.java:1263)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.os.Looper.loop(Looper.java:123)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
android.app.ActivityThread.main(ActivityThread.java:3661)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
java.lang.reflect.Method.invokeNative(Native Method)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
java.lang.reflect.Method.invoke(Method.java:507)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:842)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
02-21 18:34:26.472 E/AndroidRuntime( 941): at
dalvik.system.NativeStart.main(Native Method)
Thanks in advance.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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