Skip to content

[Android] LayoutAnimation crashes on certain devices #15698

Description

@matihabbas

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes.

Environment

  1. react-native -v: 0.47.0
  2. node -v: 8.4.0
  3. npm -v: 5.3.0

Then, specify:

  • Target Platform: Android
  • Development Operating System: macOS 10.12.6
  • Build tools: 23.0.1

Steps to Reproduce

Description:

App crashes on while setting setLayoutAnimationEnabledExperimental(true) on certain Android devices. The crash is only seen on devices with the Adreno 330 GPU on Android 5.0+. Examples of devices on which it is crashing are:

  1. Samsung Galaxy S5
  2. One Plus One
  3. Nexus 5
  4. HTC One M8
  5. LG G2/G3
  6. Sony Xperia Z2/Z3

Note: the app will only crash on a real device with the mentioned GPU. Has not been reported otherwise.

Steps:

  1. setLayoutAnimationEnabledExperimental(true)
  2. LayoutAnimation.easeInEaseOut()
  3. Render view

Expected Behavior

Should perform Layout Animations.

Actual Behavior

Crashes with stacktrace:

Fatal Exception: java.lang.IllegalStateException: Unable to create layer for d at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:122) at android.app.ActivityThread.main(ActivityThread.java:5569) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:931) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)

Note: Not using setLayoutAnimationEnabledExperimental fixes the crash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions