You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Native Environment Info:
System:
OS: macOS Sierra 10.12.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.86 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm
SDKs:
Android SDK:
API Levels: 24, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
Description
Seeing multiple crashes in production app, can not reproduce. Seems like sometimes one (or multiple) UIOperation from batchedOperations in com.facebook.react.uimanager.UIViewOperationQueue are null at execution time, resulting in NPE ...
Reproducible Demo
As mentioned above, can not repro, not sure of the reason either. Stacktrace looks like this
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.UIViewOperationQueue$UIOperation.execute()' on a null object reference at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:894) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1001) at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:46) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1061) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:977) at android.view.Choreographer.doCallbacks(Choreographer.java:791) at android.view.Choreographer.doFrame(Choreographer.java:723) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:965) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
Code throws in this section, op.execute();
if (batchedOperations != null) {
for (UIOperation op : batchedOperations) {
op.execute();
}
}
Ideally would like to understand, what might be causing this and whether this is bug on our side or in RN or a result of using third-party, like react-native-navigation
Suggested fix would be to perform a null check before calling execute on UIOperation, possibly iterating through batchedOperations and nonBatchedOperations Collections with Iterator and also removing those ops, in case of null ?
Discussion points
figure out whether this is a bug in client code, or in RN, or a result of using RN with other 3rd party libs
if bug is not in client code, suggest best solution to prevent crashes
The text was updated successfully, but these errors were encountered:
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.
Hello there 👋 this issue seems to have a really low activity on it.
This is probably because OP managed to find a solution - also, it was most likely related their precise configuration. Because of this inactivity, we are closing it - but please feel free to comment and post a repro for version 0.59 and we'll gladly re-open it 🤗
That said, in your reporting you are neither providing a way to reproduce this issue nor important info like the full list of packages that you have. So I hope you can understand that it's borderline impossible for us to understand that this issue is actually caused by a bug of the main react-native library.
Environment
React Native Environment Info:
System:
OS: macOS Sierra 10.12.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.86 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm
SDKs:
Android SDK:
API Levels: 24, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
Description
Seeing multiple crashes in production app, can not reproduce. Seems like sometimes one (or multiple)
UIOperation
frombatchedOperations
incom.facebook.react.uimanager.UIViewOperationQueue
are null at execution time, resulting in NPE ...Reproducible Demo
As mentioned above, can not repro, not sure of the reason either. Stacktrace looks like this
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.UIViewOperationQueue$UIOperation.execute()' on a null object reference at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:894) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1001) at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:46) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1061) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:977) at android.view.Choreographer.doCallbacks(Choreographer.java:791) at android.view.Choreographer.doFrame(Choreographer.java:723) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:965) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
Code throws in this section,
op.execute();
Ideally would like to understand, what might be causing this and whether this is bug on our side or in RN or a result of using third-party, like react-native-navigation
Suggested fix would be to perform a null check before calling
execute
onUIOperation
, possibly iterating throughbatchedOperations
andnonBatchedOperations
Collections with Iterator and also removing those ops, in case of null ?Discussion points
The text was updated successfully, but these errors were encountered: