java.lang.UnsupportedOperationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Honeycomb introduced hardware acceleration which can be turned on with a setting in the <application> node of AndroidManifest.xml. When it's turned on, and a view has a borderRadius set (> 0), the app crashes because we use clipPath, which is not supported with hw accel. (cf http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html). Re-creation steps: * Create an app. * Make the tiapp.xml's <android> section so: {code:title=tiapp.xml} <android xmlns:android="http://schemas.android.com/apk/res/android"> <tool-api-level>11</tool-api-level> <manifest> <application android:hardwareAccelerated="true"/> </manifest> </android> {code} * Make the app.js so: {code:title=app.js} Titanium.UI.setBackgroundColor('#000'); var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true }); win.add(Ti.UI.createView({ backgroundColor: "blue", borderColor: "red", borderWidth: 10, borderRadius: 5, left: "10dp", right: "10dp", top: "50dp", height: "200dp" })); win.open(); {code} * Run the app on the honeycomb device and it will crash. (When testing the fix, it should not crash of course.). Typical crash logcat entry looks like: {code} E/AndroidRuntime(26499): java.lang.UnsupportedOperationException E/AndroidRuntime(26499): at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:287) E/AndroidRuntime(26499): at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) E/AndroidRuntime(26499): at android.view.View.draw(View.java:9264) ... (etc) {code}
    via by Bill Dawson,
  • Honeycomb introduced hardware acceleration which can be turned on with a setting in the <application> node of AndroidManifest.xml. When it's turned on, and a view has a borderRadius set (> 0), the app crashes because we use clipPath, which is not supported with hw accel. (cf http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html). Re-creation steps: * Create an app. * Make the tiapp.xml's <android> section so: {code:title=tiapp.xml} <android xmlns:android="http://schemas.android.com/apk/res/android"> <tool-api-level>11</tool-api-level> <manifest> <application android:hardwareAccelerated="true"/> </manifest> </android> {code} * Make the app.js so: {code:title=app.js} Titanium.UI.setBackgroundColor('#000'); var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true }); win.add(Ti.UI.createView({ backgroundColor: "blue", borderColor: "red", borderWidth: 10, borderRadius: 5, left: "10dp", right: "10dp", top: "50dp", height: "200dp" })); win.open(); {code} * Run the app on the honeycomb device and it will crash. (When testing the fix, it should not crash of course.). Typical crash logcat entry looks like: {code} E/AndroidRuntime(26499): java.lang.UnsupportedOperationException E/AndroidRuntime(26499): at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:287) E/AndroidRuntime(26499): at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) E/AndroidRuntime(26499): at android.view.View.draw(View.java:9264) ... (etc) {code}
    via by Bill Dawson,
  • h4. Problem Description The customer is getting this crash report from Google Play h4. Crash Report {code} java.lang.UnsupportedOperationException at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:387) at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) at android.view.View.draw(View.java:10865) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10985) at android.widget.FrameLayout.draw(FrameLayout.java:450) at android.widget.ScrollView.draw(ScrollView.java:1524) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.widget.FrameLayout.draw(FrameLayout.java:450) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2106) at android.view.View.getDisplayList(View.java:10319) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:791) at android.view.ViewRootImpl.draw(ViewRootImpl.java:1889) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) {code}
    via by Mauro Parra-Miranda,
  • h4. Problem Description We are getting reports from the customer about Crashreports in Google Play. How we can help with this? Here the crashreport. h4. Crash report 1 {code} java.lang.UnsupportedOperationException at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:387) at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) at android.view.View.draw(View.java:10865) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10985) at android.widget.FrameLayout.draw(FrameLayout.java:450) at android.widget.ScrollView.draw(ScrollView.java:1524) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.widget.FrameLayout.draw(FrameLayout.java:450) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2106) at android.view.View.getDisplayList(View.java:10319) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:791) at android.view.ViewRootImpl.draw(ViewRootImpl.java:1889) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) {code} h4. Crash report 2 {code} Freeze Activity com.ing.rs.ingretire/.IngRetireActivity -------------------------------------------------------------------------------- Cause ANR keyDispatchingTimedOut DALVIK THREADS: "main" prio=5 tid=1 NATIVE | group="main" sCount=1 dsCount=0 s=N obj=0x4001d8c0 self=0xccc8 | sysTid=11357 nice=0 sched=0/0 cgrp=default handle=-1345017816 | schedstat=( 1621185285 622955337 1314 ) at android.view.Surface.readFromParcel(Native Method) at android.view.IWindowSession$Stub$Proxy.relayout(IWindowSession.java:505) at android.view.ViewRoot.relayoutWindow(ViewRoot.java:2558) at android.view.ViewRoot.performTraversals(ViewRoot.java:905) at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) "kroll$1: app://app.js" prio=5 tid=8 WAIT | group="main" sCount=1 dsCount=0 s=N obj=0x448eb430 self=0x247508 | sysTid=11365 nice=0 sched=0/0 cgrp=default handle=1161704 | schedstat=( 2613189719 356170632 2312 ) at java.lang.Object.wait(Native Method) - waiting on <0x448eb9e0> (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:288) at android.os.MessageQueue.next(MessageQueue.java:146) at android.os.Looper.loop(Looper.java:110) at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86) "pool-1-thread-1" prio=5 tid=7 TIMED_WAIT | group="main" sCount=1 dsCount=0 s=N obj=0x448e57a0 self=0x23e770 | sysTid=11364 nice=0 sched=0/0 cgrp=default handle=1157544 | schedstat=( 610352 9887695 3 ) at java.lang.Object.wait(Native Method) - waiting on <0x448e5920> (a java.lang.VMThread) at java.lang.Thread.parkFor(Thread.java:1535) at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48) at sun.misc.Unsafe.park(Unsafe.java:317) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:165) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2043) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:947) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:664) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1001) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561) at java.lang.Thread.run(Thread.java:1096) "Binder Thread #2" prio=5 tid=6 NATIVE | group="main" sCount=1 dsCount=0 s=N obj=0x4485b800 self=0x134598 | sysTid=11362 nice=0 sched=0/0 cgrp=default handle=1175808 | schedstat=( 1647949 7812498 5 ) at dalvik.system.NativeStart.run(Native Method) "Binder Thread #1" prio=5 tid=5 NATIVE | group="main" sCount=1 dsCount=0 s=N obj=0x4485b740 self=0x11ef38 | sysTid=11361 nice=0 sched=0/0 cgrp=default handle=1194280 | schedstat=( 5004884 20935058 6 ) at dalvik.system.NativeStart.run(Native Method) "Compiler" daemon prio=5 tid=4 VMWAIT | group="system" sCount=1 dsCount=0 s=N obj=0x448552a0 self=0x123740 | sysTid=11360 nice=0 sched=0/0 cgrp=default handle=1180936 | schedstat=( 356811518 88012677 3051 ) at dalvik.system.NativeStart.run(Native Method) "Signal Catcher" daemon prio=5 tid=3 RUNNABLE | group="system" sCount=0 dsCount=0 s=N obj=0x448551e8 self=0x13cf48 | sysTid=11359 nice=0 sched=0/0 cgrp=default handle=1180872 | schedstat=( 59600830 15502929 12 ) at dalvik.system.NativeStart.run(Native Method) "HeapWorker" daemon prio=5 tid=2 VMWAIT | group="system" sCount=1 dsCount=0 s=N obj=0x4314ec88 self=0x11fec0 | sysTid=11358 nice=0 sched=0/0 cgrp=default handle=1173504 | schedstat=( 26885989 77056887 94 ) at dalvik.system.NativeStart.run(Native Method) {code} h4. Crash Report 3 {code} v1.1 Apr 28, 2012 5:35:32 PM 1 reports/week 1 reports java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@4147eda8 at android.graphics.Canvas.throwIfRecycled(Canvas.java:1038) at android.graphics.Canvas.drawBitmap(Canvas.java:1142) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:393) at android.widget.ImageView.onDraw(ImageView.java:892) at android.view.View.draw(View.java:10978) at android.view.ViewGroup.drawChild(ViewGroup.java:2887) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.draw(View.java:10981) at android.view.ViewGroup.drawChild(ViewGroup.java:2887) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.draw(View.java:11083) at android.widget.FrameLayout.draw(FrameLayout.java:450) at android.widget.ScrollView.draw(ScrollView.java:1524) at android.view.ViewGroup.drawChild(ViewGroup.java:2887) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.draw(View.java:10981) at android.view.ViewGroup.drawChild(ViewGroup.java:2887) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.ViewGroup.drawChild(ViewGroup.java:2885) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.draw(View.java:10981) at android.widget.FrameLayout.draw(FrameLayout.java:450) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2026) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554) at dalvik.system.NativeStart.main(Native Method) {code} h4. Crash Report 4 {code} Hi, There was another crash reported by a user on Google play store. Can you please look into this? java.lang.UnsupportedOperationException at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:387) at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) at android.view.View.draw(View.java:10865) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10985) at android.widget.FrameLayout.draw(FrameLayout.java:450) at android.widget.ScrollView.draw(ScrollView.java:1524) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.view.View.getDisplayList(View.java:10319) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.getDisplayList(View.java:10317) at android.view.ViewGroup.drawChild(ViewGroup.java:2862) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495) at android.view.View.draw(View.java:10883) at android.widget.FrameLayout.draw(FrameLayout.java:450) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2106) at android.view.View.getDisplayList(View.java:10319) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:791) at android.view.ViewRootImpl.draw(ViewRootImpl.java:1889) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) {code}
    via by Mauro Parra-Miranda,
  • UnsupportedOperationException
    via GitHub by WegFetZ
    ,
    • java.lang.UnsupportedOperationException at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:287) at org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73) at android.view.View.draw(View.java:9264)
    No Bugmate found.