question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception thrown while executing UI block: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]

See original GitHub issue

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

image

Console log

image image

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jkadamczykcommented, Jul 24, 2020

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! πŸ˜„

1reaction
Jarred-Sumnercommented, Dec 28, 2019

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 the Animated.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 on componentWillUnmount – maybe somewhere in the native code, pending callbacks need to be cleared when a UIView is detached/unmounted?

Read more comments on GitHub >

github_iconTop Results From Across the Web

attempt to insert nil object from objects[0]' - Stack Overflow
I am working with UITableview i am displaying image, title,date and location name on tableview cell.When iΒ ...
Read more >
iOS : React Native: Exception thrown while executing UI block
iOS : React Native: Exception thrown while executing UI block [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOSΒ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found