java.lang.UnsupportedOperationException

Appcelerator JIRA | Mauro Parra-Miranda | 5 years ago
  1. 0

    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}

    Appcelerator JIRA | 5 years ago | Mauro Parra-Miranda
    java.lang.UnsupportedOperationException
  2. 0

    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}

    Appcelerator JIRA | 5 years ago | Bill Dawson
    java.lang.UnsupportedOperationException
  3. 0

    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}

    Appcelerator JIRA | 5 years ago | Bill Dawson
    java.lang.UnsupportedOperationException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    UnsupportedOperationException

    GitHub | 2 years ago | WegFetZ
    java.lang.UnsupportedOperationException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      No message provided

      at android.view.GLES20Canvas.clipPath()
    2. Android Platform
      GLES20Canvas.clipPath
      1. android.view.GLES20Canvas.clipPath(GLES20Canvas.java:387)
      1 frame
    3. org.appcelerator.titanium
      TiBackgroundDrawable.draw
      1. org.appcelerator.titanium.view.TiBackgroundDrawable.draw(TiBackgroundDrawable.java:73)
      1 frame
    4. Android Platform
      FrameLayout.draw
      1. android.view.View.draw(View.java:10865)
      2. android.view.View.getDisplayList(View.java:10319)
      3. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      4. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      5. android.view.View.getDisplayList(View.java:10317)
      6. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      7. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      8. android.view.View.draw(View.java:10985)
      9. android.widget.FrameLayout.draw(FrameLayout.java:450)
      10. android.widget.ScrollView.draw(ScrollView.java:1524)
      11. android.view.View.getDisplayList(View.java:10319)
      12. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      13. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      14. android.view.View.draw(View.java:10883)
      15. android.view.View.getDisplayList(View.java:10319)
      16. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      17. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      18. android.view.View.getDisplayList(View.java:10317)
      19. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      20. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      21. android.view.View.getDisplayList(View.java:10317)
      22. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      23. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      24. android.view.View.getDisplayList(View.java:10317)
      25. android.view.ViewGroup.drawChild(ViewGroup.java:2862)
      26. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
      27. android.view.View.draw(View.java:10883)
      28. android.widget.FrameLayout.draw(FrameLayout.java:450)
      28 frames
    5. Android
      PhoneWindow$DecorView.draw
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2106)
      1 frame
    6. Android Platform
      ActivityThread.main
      1. android.view.View.getDisplayList(View.java:10319)
      2. android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:791)
      3. android.view.ViewRootImpl.draw(ViewRootImpl.java:1889)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613)
      5. android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
      6. android.os.Handler.dispatchMessage(Handler.java:99)
      7. android.os.Looper.loop(Looper.java:137)
      8. android.app.ActivityThread.main(ActivityThread.java:4340)
      8 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
      2 frames
    9. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame