Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] LayoutAnimation crashes on certain devices #15698

Closed
matihabbas opened this issue Aug 29, 2017 · 6 comments
Closed

[Android] LayoutAnimation crashes on certain devices #15698

matihabbas opened this issue Aug 29, 2017 · 6 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@matihabbas
Copy link

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.

@stale
Copy link

stale bot commented Oct 30, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 30, 2017
@stale stale bot closed this as completed Nov 6, 2017
@dluksza
Copy link

dluksza commented Dec 2, 2017

I've got this exception on RN 0.50.4

Fatal Exception: java.lang.IllegalStateException: Unable to create layer for ReactHorizontalScrollContainerView
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:331)
       at android.os.Looper.loop(Looper.java:218)
       at android.app.ActivityThread.main(ActivityThread.java:5526)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)**

@dluksza
Copy link

dluksza commented Dec 24, 2017

Today got the same issue on RN 0.51.0 it seams that only Android 6.0 is affected.

@DanGDroid
Copy link

DanGDroid commented Feb 14, 2018

FATAL
still active bug.

RN 0.51
Samsung SM-G900F
Android 6.0.1

i use it in constructor as:

 UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);

and the crash is when dispatch:

LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)

stack trace:

java.lang.IllegalStateException · Unable to create layer for ReactHorizontalScrollContainerView Raw MessageQueue.java:-2android.os.MessageQueue.nativePollOnce MessageQueue.java:323android.os.MessageQueue.next Looper.java:143android.os.Looper.loop ActivityThread.java:7224android.app.ActivityThread.main Method.java:-2java.lang.reflect.Method.invoke ZygoteInit.java:1230com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run ZygoteInit.java:1120com.android.internal.os.ZygoteInit.main

@yaronlevi
Copy link

Same here +1

@Winglonelion
Copy link

same here +1

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants
@dluksza @yaronlevi @matihabbas @DanGDroid @Winglonelion and others