Activities in our application employ use of an OpenGL Surface that is
drawn behind the main content of the activity. Every time, the
activity is "entered into" a bitmap is captured and rendered on the GL
surface and every time it is paused the bitmap is removed.

It is observed that if we keep switching between activities, after
15-20 transitions we get "Canvas Lock exception". Also, with less
desperate navigational behavior, if the application is used for a
certain period of time, it becomes sluggish and prone to Canvas lock
exceptions.

E/ViewRootImpl(10414): IllegalArgumentException locking surface
E/ViewRootImpl(10414): java.lang.IllegalArgumentException
E/ViewRootImpl(10414):  at
android.view.Surface.lockCanvasNative(Native Method)
E/ViewRootImpl(10414):  at
android.view.Surface.lockCanvas(Surface.java:76)
E/ViewRootImpl(10414):  at
android.view.ViewRootImpl.draw(ViewRootImpl.java:1924)
E/ViewRootImpl(10414):  at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613)
E/ViewRootImpl(10414):  at
android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
E/ViewRootImpl(10414):  at
android.os.Handler.dispatchMessage(Handler.java:99)
E/ViewRootImpl(10414):  at android.os.Looper.loop(Looper.java:137)
E/ViewRootImpl(10414):  at
android.app.ActivityThread.main(ActivityThread.java:4340)
E/ViewRootImpl(10414):  at
java.lang.reflect.Method.invokeNative(Native Method)
E/ViewRootImpl(10414):  at java.lang.reflect.Method.invoke(Method.java:
511)
E/ViewRootImpl(10414):  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/ViewRootImpl(10414):  at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/ViewRootImpl(10414):  at dalvik.system.NativeStart.main(Native
Method)

We are on GB(2.3.3) build.

People have reported similar issue (code.google.com/p/android/issues/
detail?id=22406#c1) where the use-case sounds similar to the
navigational problem we are facing.

Questions :
1. Is this exception documented in detail?
2. What are the possible reasons for its occurence and what can be
done to avoid it?
3. Would fixing memory leaks alleviate the problem?

Please help.

-- 
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

Reply via email to