TwitterKit 2.1.0 crashes in API 15 because of multi-photos support

android
twitterkit

#1

Hi,
The new TwitterKit update 2.1.0 for Android, crashes the app when a user in timeline has more than 1 photo, this problem appears in API 15 (Android 4.0.3) , in the API 24 is OK.

Here is the crash:

E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:408)
at com.twitter.sdk.android.tweetui.internal.TweetMediaView.dispatchDraw(TweetMediaView.java:127)
at android.view.View.getDisplayList(View.java:10415)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10415)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10981)
at android.view.View.getDisplayList(View.java:10417)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10415)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.widget.ListView.drawChild(ListView.java:3223)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.widget.AbsListView.dispatchDraw(AbsListView.java:2092)
at android.widget.ListView.dispatchDraw(ListView.java:3218)
at android.view.View.draw(View.java:10981)
at android.widget.AbsListView.draw(AbsListView.java:3398)
at android.view.View.getDisplayList(View.java:10417)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10380)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1910)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

The problem looks like to be at the TweetMediaView.java file in the 127th line


#2

Any news about that?


#4

I have tested on emulator , and this error appears when you scroll in timeline and there is more than one photo in it.If timeline doesn’t have any multi-photos, there is no problem, I tested also on API 24, and it’s ok.


#5

Thank you for the error report. It looks like we missed something during our testing. It looks like clipPath wasn’t supported until API 18. We are working to update our release ASAP. See: https://developer.android.com/guide/topics/graphics/hardware-accel.html#unsupported


#6

This has been resolved in version 2.1.1. Looking at AOSP impact seems limited to API 14/15 only.

ICS Branch: GLES20Canvas.java#408
JB Branch: GLES20Canvas.java#435


#7