{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/9924","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/9924/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9924/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/9924/events","html_url":"https://github.com/facebook/react-native/issues/9924","id":177204700,"number":9924,"title":"Updating state throw DeadObjectException","user":{"login":"ansmonjol","id":5517077,"avatar_url":"https://avatars.githubusercontent.com/u/5517077?v=3","gravatar_id":"","url":"https://api.github.com/users/ansmonjol","html_url":"https://github.com/ansmonjol","followers_url":"https://api.github.com/users/ansmonjol/followers","following_url":"https://api.github.com/users/ansmonjol/following{/other_user}","gists_url":"https://api.github.com/users/ansmonjol/gists{/gist_id}","starred_url":"https://api.github.com/users/ansmonjol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansmonjol/subscriptions","organizations_url":"https://api.github.com/users/ansmonjol/orgs","repos_url":"https://api.github.com/users/ansmonjol/repos","events_url":"https://api.github.com/users/ansmonjol/events{/privacy}","received_events_url":"https://api.github.com/users/ansmonjol/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-15T15:13:19Z","updated_at":"2016-12-15T23:30:52Z","closed_at":"2016-12-15T23:30:52Z","body":"Hello,\n\nI just integrate a spinner for an infinite scroll when arriving at the end of the current list, then my app crash with a `android.os.DeadObjectException` exception.\n\nNote that this crash does not appear avery time I scroll in the list\n### Code Snippets\n\nWhen I added the parts with the `loadNewAssets` state, I started to have this bug\n\nMy state\n\n```\nthis.state = {\n      assets: null,\n      loaded: false,\n      loadNewAssets: false // Just added\n};\n```\n\nRender\n\n```\nrender() {\n    const { assetList, loaded, loadNewAssets // Just added } = this.state;\n\n    return (\n      <View style={[styles.mainContainer, styles.noPadding]}>\n        <ListView\n          renderHeader={this._renderHeader.bind(this)}\n          dataSource={assetList}\n          renderRow={this._renderRow.bind(this)}\n          renderSeparator={null}\n          onEndReached={this._loadMoreAssets.bind(this)}\n          onEndReachedThreshold={200}\n        />\n      {this._renderActionButton()}\n      {loadNewAssets ? <Spinner/> : null} // Just added\n      </View>\n    );\n}\n```\n\nMethod for getting new asset list\n\n```\n  async _loadMoreAssets() {\n    const { page, assetArray } = this.state;\n    const { backend, assetType, assetList } = this.props;\n\n    this.setState({ loadNewAssets: true }); // Just added\n\n    let nextPage = page + 1;\n\n    let assets = await backend.asset.all(assetType, assetList, nextPage);\n\n    let newAssetArray = assetArray.concat(assets.data);\n\n    this.setState({\n      page: nextPage,\n      assetArray: newAssetArray,\n      assetList: ds.cloneWithRows(newAssetArray),\n      loadNewAssets: false // Just added\n    });\n}\n```\n### Additional Information\n- React Native version: 0.32.0\n- Platform: Android Emulator API_23\n- Operating System: macOS v10.11.6 \n- Logs\n\n```\n09-15 15:56:20.473  1674  1674 V DeadZone: consuming errant click: (448.37402,20.882813)\n09-15 15:56:40.225  8444  8444 W ViewPager: Requested offscreen page limit 0 too small; defaulting to 1\n09-15 15:56:42.710  8444  8588 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 8588 (mqt_js)\n09-15 15:56:42.812  1260  1260 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n09-15 15:56:42.812  1260  1260 F DEBUG   : Build fingerprint: 'Android/sdk_google_phone_x86_64/generic_x86_64:6.0/MASTER/3079352:userdebug/test-keys'\n09-15 15:56:42.812  1260  1260 F DEBUG   : Revision: '0'\n09-15 15:56:42.812  1260  1260 F DEBUG   : ABI: 'x86'\n09-15 15:56:42.812  1260  1260 F DEBUG   : pid: 8444, tid: 8588, name: mqt_js  >>> com.bulbthings.app <<<\n09-15 15:56:42.812  1260  1260 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0\n09-15 15:56:42.822  1260  1260 F DEBUG   :     eax d726fe50  ebx e0fe1d9c  ecx ddbd3d10  edx 00000000\n09-15 15:56:42.822  1260  1260 F DEBUG   :     esi e063b1d8  edi cd08ee40\n09-15 15:56:42.822  1260  1260 F DEBUG   :     xcs 00000023  xds 0000002b  xes 0000002b  xfs 000000b7  xss 0000002b\n09-15 15:56:42.822  1260  1260 F DEBUG   :     eip e0dcf404  ebp e063b018  esp e063afc0  flags 00210282\n09-15 15:56:42.825  1260  1260 F DEBUG   : \n09-15 15:56:42.825  1260  1260 F DEBUG   : backtrace:\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #00 pc 00254404  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #01 pc 002f8399  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so (JSC::PropertySlot::functionGetter(JSC::ExecState*) const+73)\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #02 pc 0013b1fd  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #03 pc 0013b623  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #04 pc 00000756  <unknown>\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #05 pc 0000298f  <unknown>\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #06 pc 00000d29  <unknown>\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #07 pc 00000398  <unknown>\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #08 pc 000010b1  <unknown>\n09-15 15:56:42.826  1260  1260 F DEBUG   :     #09 pc 000060c9  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #10 pc 0000220c  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #11 pc 0000068e  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #12 pc 000018e9  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #13 pc 0000030b  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #14 pc 00006b8a  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #15 pc 0000220c  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #16 pc 0000068e  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #17 pc 000018e9  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #18 pc 0000030b  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #19 pc 00006b8a  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #20 pc 00001117  <unknown>\n09-15 15:56:42.827  1260  1260 F DEBUG   :     #21 pc 00001580  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #22 pc 00001db4  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #23 pc 00001e66  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #24 pc 000013ca  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #25 pc 000060c9  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #26 pc 0000220c  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #27 pc 0000068e  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #28 pc 000018e9  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #29 pc 0000030b  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #30 pc 00006b8a  <unknown>\n09-15 15:56:42.828  1260  1260 F DEBUG   :     #31 pc 0000220c  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #32 pc 0000068e  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #33 pc 000018e9  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #34 pc 0000030b  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #35 pc 00006b8a  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #36 pc 0000220c  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #37 pc 0000068e  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #38 pc 000018e9  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #39 pc 0000030b  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #40 pc 00006b8a  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #41 pc 0000220c  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #42 pc 0000068e  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #43 pc 000018e9  <unknown>\n09-15 15:56:42.829  1260  1260 F DEBUG   :     #44 pc 0000030b  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #45 pc 00006b8a  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #46 pc 00001117  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #47 pc 00001580  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #48 pc 00001db4  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #49 pc 00001e66  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #50 pc 000013ca  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #51 pc 000060c9  <unknown>\n09-15 15:56:42.830  1260  1260 F DEBUG   :     #52 pc 0000220c  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #53 pc 0000068e  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #54 pc 000018e9  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #55 pc 0000030b  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #56 pc 00006b8a  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #57 pc 00001117  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #58 pc 00001580  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #59 pc 00001db4  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #60 pc 00001e66  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #61 pc 000013ca  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #62 pc 000060c9  <unknown>\n09-15 15:56:42.831  1260  1260 F DEBUG   :     #63 pc 0000220c  <unknown>\n09-15 15:56:43.073  1566  8659 W ActivityManager:   Force finishing activity com.bulbthings.app/.MainActivity\n09-15 15:56:43.073  1260  1260 F DEBUG   : \n09-15 15:56:43.073  1260  1260 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_07\n09-15 15:56:43.073  1260  1260 E DEBUG   : AM write failed: Broken pipe\n09-15 15:56:43.073  1566  1583 I BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)\n09-15 15:56:43.088  1566  8659 D         : HostConnection::get() New Host Connection established 0x7f3646033e00, tid 8659\n09-15 15:56:43.101  1250  1250 E EGL_emulation: tid 1250: eglCreateSyncKHR(1370): error 0x3004 (EGL_BAD_ATTRIBUTE)\n09-15 15:56:43.104  1566  1602 W InputDispatcher: channel '53df5bf com.bulbthings.app/com.bulbthings.app.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9\n09-15 15:56:43.104  1566  1602 E InputDispatcher: channel '53df5bf com.bulbthings.app/com.bulbthings.app.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!\n09-15 15:56:43.112  1566  5108 D GraphicsStats: Buffer count: 4\n09-15 15:56:43.161  1271  1271 I Zygote  : Process 8444 exited due to signal (11)\n09-15 15:56:43.168  1566  1953 I WindowState: WIN DEATH: Window{53df5bf u0 com.bulbthings.app/com.bulbthings.app.MainActivity}\n09-15 15:56:43.168  1566  1953 W InputDispatcher: Attempted to unregister already unregistered input channel '53df5bf com.bulbthings.app/com.bulbthings.app.MainActivity (server)'\n09-15 15:56:43.172  1566  8659 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)\n09-15 15:56:43.174  1566  8659 W ActivityManager: Exception thrown during pause\n09-15 15:56:43.174  1566  8659 W ActivityManager: android.os.DeadObjectException\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.os.BinderProxy.transactNative(Native Method)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.os.BinderProxy.transact(Binder.java:503)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:727)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:867)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2907)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2763)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2755)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11971)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11867)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12556)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12063)\n09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)\n09-15 15:56:43.177  1566  1705 I ActivityManager: Process com.bulbthings.app (pid 8444) has died\n09-15 15:56:43.215  1566  3020 I OpenGLRenderer: Initialized EGL, version 1.4\n09-15 15:56:43.282  2293  8661 D DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics or Lockbox.\n09-15 15:56:43.299  2293  8661 D DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics or Lockbox.\n09-15 15:56:43.826  1566  1585 W WindowAnimator: Failed to dispatch window animation state change.\n09-15 15:56:43.826  1566  1585 W WindowAnimator: android.os.DeadObjectException\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.BinderProxy.transactNative(Native Method)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.BinderProxy.transact(Binder.java:503)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer.doCallbacks(Choreographer.java:670)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer.doFrame(Choreographer.java:603)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Handler.handleCallback(Handler.java:739)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Handler.dispatchMessage(Handler.java:95)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Looper.loop(Looper.java:148)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.HandlerThread.run(HandlerThread.java:61)\n09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.ServiceThread.run(ServiceThread.java:46)\n09-15 15:56:43.858  1928  2099 W OpenGLRenderer: Incorrectly called buildLayer on View: em, destroying layer...\n```\n\nAny idea ? Maybe the way I handle the spinner for this too repetitive action is not the good way, I don't know\n"}}
{"actor":{"display_login":"lacker"}}