react-native-reanimated: Exception thrown while executing UI block: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
Reproduction
Issue happens only when running on iOS
We have a screen where we show an image. We use modified version of this example. Modified version can be found here.
Issue happens when one navigate away from a screen where the touch handler is used and then navigate back to it using react-navigation’s navigation.goBack();
. See the output below.
Same happens if we use the imageViewer example without modifining it.
This issue doesn’t happen on Android.
Issue screenshot - iOS
Console log
Output of node -v && npm -v && npm ls --prod --depth=1
v11.6.0
6.5.0
capmo@0.0.1 /Users/miodrag/Desktop/pave/mobileapp
├─┬ @ambassify/fetch-retried@1.1.0
│ └── @ambassify/fetch@1.0.3
├─┬ @nozbe/watermelondb@0.8.0
│ ├── rambdax@0.21.0
│ ├── rxjs@6.3.2 deduped
│ ├── rxjs-compat@6.3.3
│ └── sql-escape-string@1.1.0
├─┬ @nozbe/with-observables@1.0.1
│ └── rxjs@6.3.2 deduped
├─┬ better-queue@3.8.10
│ ├── better-queue-memory@1.0.3 deduped
│ ├── node-eta@0.9.0
│ └── uuid@3.3.2 deduped
├── better-queue-memory@1.0.3
├─┬ color@3.1.0
│ ├── color-convert@1.9.3
│ └── color-string@1.5.3
├── date-fns@1.29.0
├─┬ es6-symbol@3.1.1
│ ├── d@1.0.0
│ └── es5-ext@0.10.46
├── events@2.1.0
├─┬ extract-files@2.1.1
│ └── @babel/runtime@7.1.2
├─┬ formik@1.2.0
│ ├── create-react-context@0.2.3
│ ├── deepmerge@2.1.1
│ ├── hoist-non-react-statics@2.5.5
│ ├── lodash.clonedeep@4.5.0
│ ├── lodash.topath@4.5.2
│ ├── prop-types@15.6.2 deduped
│ ├── UNMET PEER DEPENDENCY react@^0.14.0 || ^15.0.0 || ^16.0.0
│ ├── react-fast-compare@1.0.0
│ ├── tslib@1.9.3
│ └── warning@3.0.0
├── lodash@4.17.11
├── moment@2.22.2
├─┬ moment-timezone@0.5.21
│ └── moment@2.22.2 deduped
├─┬ prop-types@15.6.2
│ ├── loose-envify@1.4.0
│ └── object-assign@4.1.1
├── ramda@0.25.0
├─┬ UNMET PEER DEPENDENCY react@16.6.0-alpha.8af6728
│ ├── loose-envify@1.4.0 deduped
│ ├── object-assign@4.1.1 deduped
│ ├── prop-types@15.6.2 deduped
│ └── scheduler@0.10.0
├─┬ UNMET PEER DEPENDENCY react-native@0.57.4
│ ├── @babel/runtime@7.1.2 deduped
│ ├── absolute-path@0.0.0
│ ├── art@0.10.3
│ ├── base64-js@1.3.0
│ ├── chalk@1.1.3
│ ├── commander@2.17.1
│ ├── compression@1.7.3
│ ├── connect@3.6.6
│ ├── create-react-class@15.6.3
│ ├── debug@2.6.9
│ ├── denodeify@1.2.1
│ ├── envinfo@5.10.0
│ ├── errorhandler@1.5.0
│ ├── escape-string-regexp@1.0.5
│ ├── event-target-shim@1.1.1
│ ├── fbjs@1.0.0
│ ├── fbjs-scripts@0.8.3
│ ├── fs-extra@1.0.0
│ ├── glob@7.1.3
│ ├── graceful-fs@4.1.11
│ ├── inquirer@3.3.0
│ ├── lodash@4.17.11 deduped
│ ├── metro@0.48.3
│ ├── metro-babel-register@0.48.3
│ ├── metro-core@0.48.3
│ ├── metro-memory-fs@0.48.3
│ ├── mime@1.6.0
│ ├── minimist@1.2.0
│ ├── mkdirp@0.5.1
│ ├── morgan@1.9.0
│ ├── node-fetch@2.2.0
│ ├── node-notifier@5.2.1
│ ├── npmlog@2.0.4
│ ├── opn@3.0.3
│ ├── optimist@0.6.1
│ ├── plist@3.0.1
│ ├── pretty-format@4.3.1
│ ├── promise@7.3.1
│ ├── prop-types@15.6.2 deduped
│ ├── react-clone-referenced-element@1.0.1
│ ├── react-devtools-core@3.4.2
│ ├── react-timer-mixin@0.13.4
│ ├── regenerator-runtime@0.11.1
│ ├── rimraf@2.6.2
│ ├── semver@5.5.1
│ ├── serve-static@1.13.2
│ ├── shell-quote@1.6.1
│ ├── stacktrace-parser@0.1.4
│ ├── ws@1.1.5
│ ├── xcode@1.0.0
│ ├── xmldoc@0.4.0
│ └── yargs@9.0.1
├─┬ react-native-datepicker@1.7.2
│ └── moment@2.22.2 deduped
├── react-native-elevated-view@0.0.6
├─┬ react-native-gesture-handler@1.0.7
│ ├── hoist-non-react-statics@2.5.5 deduped
│ ├── invariant@2.2.4
│ └── prop-types@15.6.2 deduped
├── react-native-image-pan-zoom@2.1.10
├── react-native-image-picker@0.26.10
├─┬ react-native-image-zoom-viewer@2.2.19
│ └── react-native-image-pan-zoom@2.1.10 deduped
├─┬ react-native-keyboard-aware-scroll-view@0.7.4
│ ├── prop-types@15.6.2 deduped
│ └── react-native-iphone-x-helper@1.2.0
├─┬ react-native-modal@6.5.0
│ ├── prop-types@15.6.2 deduped
│ └── react-native-animatable@1.3.0
├─┬ react-native-modal-dropdown@0.6.2
│ └── prop-types@15.6.2 deduped
├─┬ react-native-paper@2.0.1
│ ├── @callstack/react-theme-provider@1.0.3
│ ├── color@2.0.1
│ ├── create-react-context@0.2.3 deduped
│ ├── hoist-non-react-statics@2.5.5 deduped
│ ├── UNMET PEER DEPENDENCY react@^15.3.0 || ^16.0.0
│ └── react-lifecycles-compat@3.0.4
├─┬ react-native-pdf@5.0.9
│ ├── crypto-js@3.1.9-1
│ └── prop-types@15.6.2 deduped
├── react-native-reanimated@1.0.0-alpha.9
├── react-native-remote-svg@1.3.0
├── react-native-responsive-screen@1.1.10
├── react-native-screens@1.0.0-alpha.12
├── react-native-splash-screen@3.1.1
├── react-native-status-bar-height@2.1.0
├── react-native-typography@1.4.0
├─┬ react-native-vector-icons@5.0.0
│ ├── lodash@4.17.11 deduped
│ ├── prop-types@15.6.2 deduped
│ └── yargs@8.0.2
├─┬ react-navigation@2.12.1
│ ├── clamp@1.0.1
│ ├── create-react-context@0.2.3 deduped
│ ├── hoist-non-react-statics@2.5.5 deduped
│ ├── path-to-regexp@1.7.0
│ ├── query-string@6.1.0
│ ├── UNMET PEER DEPENDENCY react@^0.14.0 || ^15.0.0 || ^16.0.0
│ ├── react-lifecycles-compat@3.0.4 deduped
│ ├── react-native-safe-area-view@0.9.0
│ ├── react-navigation-deprecated-tab-navigator@1.3.0
│ ├── react-navigation-drawer@0.5.0
│ ├── react-navigation-stack@0.2.3
│ └── react-navigation-tabs@0.6.0
├─┬ react-validator-prop-types@1.1.0
│ └── validator@3.43.0
├─┬ recompose@0.30.0
│ ├── @babel/runtime@7.1.2 deduped
│ ├── change-emitter@0.1.6
│ ├── fbjs@0.8.17
│ ├── hoist-non-react-statics@2.5.5 deduped
│ ├── react-lifecycles-compat@3.0.4 deduped
│ └── symbol-observable@1.2.0
├─┬ rn-fetch-blob@0.10.13
│ ├── base-64@0.1.0
│ └── glob@7.0.6
├─┬ rxjs@6.3.2
│ └── tslib@1.9.3 deduped
├─┬ styled-components@3.4.9
│ ├── buffer@5.2.1
│ ├── css-to-react-native@2.2.2
│ ├── fbjs@0.8.17 deduped
│ ├── hoist-non-react-statics@2.5.5 deduped
│ ├── prop-types@15.6.2 deduped
│ ├── react-is@16.5.2
│ ├── stylis@3.5.3
│ ├── stylis-rule-sheet@0.0.10
│ └── supports-color@3.2.3
├─┬ util@0.11.0
│ └── inherits@2.0.3
└── uuid@3.3.2
npm ERR! peer dep missing: react@^16.5.0, required by @nozbe/watermelondb@0.8.0
npm ERR! peer dep missing: react@^16.4.2, required by @nozbe/with-observables@1.0.1
npm ERR! peer dep missing: react@>=15, required by formik@1.2.0
npm ERR! peer dep missing: react@> 15.0.0, required by react-native-gesture-handler@1.0.7
npm ERR! peer dep missing: react@16.0.0-alpha.6, required by react-native-reanimated@1.0.0-alpha.9
npm ERR! peer dep missing: react@>=15, required by react-native-remote-svg@1.3.0
npm ERR! peer dep missing: react@>=16.0.0, required by react-native-testing-library@1.5.0
npm ERR! peer dep missing: react@^16.0.0, required by react-test-renderer@16.4.1
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0 || ^16.0.0, required by recompose@0.30.0
npm ERR! peer dep missing: react@>= 0.14.0 < 17.0.0-0, required by styled-components@3.4.9
npm ERR! peer dep missing: react-native@^0.56.0, required by @nozbe/watermelondb@0.8.0
npm ERR! peer dep missing: react-native@^0.44.1, required by react-native-reanimated@1.0.0-alpha.9
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0 || ^16.0.0, required by create-react-context@0.2.3
npm ERR! peer dep missing: react@^15.3.0 || ^16.0.0, required by @callstack/react-theme-provider@1.0.3
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0 || ^16.0.0, required by create-react-context@0.2.3
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0 || ^16.0.0, required by create-react-context@0.2.3
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0 || ^16.0.0, required by create-react-context@0.2.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 15 (2 by maintainers)
Hey folks 👋 We decided to close this issue because we were not able to reproduce it for a long period of time. If anyone of you will be able to provide a minimal reproduction of this issue, we will reopen it and work on it. Have a nice day! 😄
Yes, i just updated the version of react native, from 0.70+ to 0.71+
Try reinstall your app in devices
I’ve seen this bug a number of times (but it doesn’t cause a crash). I believe it occurs when a component using an
Animated.Value
is unmounted before theAnimated.Value
update is propagated to the component.I notice it the most when a pan gesture recognizer updates the location of a component and then that component unmounts while moving it around.
If I had to guess, I would say this issue feels a little like forgetting to call
window.clearTimeout
oncomponentWillUnmount
– maybe somewhere in the native code, pending callbacks need to be cleared when a UIView is detached/unmounted?