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

Updating state throw DeadObjectException #9924

Closed
ansmonjol opened this issue Sep 15, 2016 · 1 comment
Closed

Updating state throw DeadObjectException #9924

ansmonjol opened this issue Sep 15, 2016 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ansmonjol
Copy link

ansmonjol commented Sep 15, 2016

Hello,

I 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.

Note that this crash does not appear avery time I scroll in the list

Code Snippets

When I added the parts with the loadNewAssets state, I started to have this bug

My state

this.state = {
      assets: null,
      loaded: false,
      loadNewAssets: false // Just added
};

Render

render() {
    const { assetList, loaded, loadNewAssets // Just added } = this.state;

    return (
      <View style={[styles.mainContainer, styles.noPadding]}>
        <ListView
          renderHeader={this._renderHeader.bind(this)}
          dataSource={assetList}
          renderRow={this._renderRow.bind(this)}
          renderSeparator={null}
          onEndReached={this._loadMoreAssets.bind(this)}
          onEndReachedThreshold={200}
        />
      {this._renderActionButton()}
      {loadNewAssets ? <Spinner/> : null} // Just added
      </View>
    );
}

Method for getting new asset list

  async _loadMoreAssets() {
    const { page, assetArray } = this.state;
    const { backend, assetType, assetList } = this.props;

    this.setState({ loadNewAssets: true }); // Just added

    let nextPage = page + 1;

    let assets = await backend.asset.all(assetType, assetList, nextPage);

    let newAssetArray = assetArray.concat(assets.data);

    this.setState({
      page: nextPage,
      assetArray: newAssetArray,
      assetList: ds.cloneWithRows(newAssetArray),
      loadNewAssets: false // Just added
    });
}

Additional Information

  • React Native version: 0.32.0
  • Platform: Android Emulator API_23
  • Operating System: macOS v10.11.6
  • Logs
09-15 15:56:20.473  1674  1674 V DeadZone: consuming errant click: (448.37402,20.882813)
09-15 15:56:40.225  8444  8444 W ViewPager: Requested offscreen page limit 0 too small; defaulting to 1
09-15 15:56:42.710  8444  8588 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 8588 (mqt_js)
09-15 15:56:42.812  1260  1260 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-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'
09-15 15:56:42.812  1260  1260 F DEBUG   : Revision: '0'
09-15 15:56:42.812  1260  1260 F DEBUG   : ABI: 'x86'
09-15 15:56:42.812  1260  1260 F DEBUG   : pid: 8444, tid: 8588, name: mqt_js  >>> com.bulbthings.app <<<
09-15 15:56:42.812  1260  1260 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-15 15:56:42.822  1260  1260 F DEBUG   :     eax d726fe50  ebx e0fe1d9c  ecx ddbd3d10  edx 00000000
09-15 15:56:42.822  1260  1260 F DEBUG   :     esi e063b1d8  edi cd08ee40
09-15 15:56:42.822  1260  1260 F DEBUG   :     xcs 00000023  xds 0000002b  xes 0000002b  xfs 000000b7  xss 0000002b
09-15 15:56:42.822  1260  1260 F DEBUG   :     eip e0dcf404  ebp e063b018  esp e063afc0  flags 00210282
09-15 15:56:42.825  1260  1260 F DEBUG   : 
09-15 15:56:42.825  1260  1260 F DEBUG   : backtrace:
09-15 15:56:42.826  1260  1260 F DEBUG   :     #00 pc 00254404  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so
09-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)
09-15 15:56:42.826  1260  1260 F DEBUG   :     #02 pc 0013b1fd  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so
09-15 15:56:42.826  1260  1260 F DEBUG   :     #03 pc 0013b623  /data/app/com.bulbthings.app-2/lib/x86/libjsc.so
09-15 15:56:42.826  1260  1260 F DEBUG   :     #04 pc 00000756  <unknown>
09-15 15:56:42.826  1260  1260 F DEBUG   :     #05 pc 0000298f  <unknown>
09-15 15:56:42.826  1260  1260 F DEBUG   :     #06 pc 00000d29  <unknown>
09-15 15:56:42.826  1260  1260 F DEBUG   :     #07 pc 00000398  <unknown>
09-15 15:56:42.826  1260  1260 F DEBUG   :     #08 pc 000010b1  <unknown>
09-15 15:56:42.826  1260  1260 F DEBUG   :     #09 pc 000060c9  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #10 pc 0000220c  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #11 pc 0000068e  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #12 pc 000018e9  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #13 pc 0000030b  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #14 pc 00006b8a  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #15 pc 0000220c  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #16 pc 0000068e  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #17 pc 000018e9  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #18 pc 0000030b  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #19 pc 00006b8a  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #20 pc 00001117  <unknown>
09-15 15:56:42.827  1260  1260 F DEBUG   :     #21 pc 00001580  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #22 pc 00001db4  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #23 pc 00001e66  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #24 pc 000013ca  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #25 pc 000060c9  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #26 pc 0000220c  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #27 pc 0000068e  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #28 pc 000018e9  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #29 pc 0000030b  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #30 pc 00006b8a  <unknown>
09-15 15:56:42.828  1260  1260 F DEBUG   :     #31 pc 0000220c  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #32 pc 0000068e  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #33 pc 000018e9  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #34 pc 0000030b  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #35 pc 00006b8a  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #36 pc 0000220c  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #37 pc 0000068e  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #38 pc 000018e9  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #39 pc 0000030b  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #40 pc 00006b8a  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #41 pc 0000220c  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #42 pc 0000068e  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #43 pc 000018e9  <unknown>
09-15 15:56:42.829  1260  1260 F DEBUG   :     #44 pc 0000030b  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #45 pc 00006b8a  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #46 pc 00001117  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #47 pc 00001580  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #48 pc 00001db4  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #49 pc 00001e66  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #50 pc 000013ca  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #51 pc 000060c9  <unknown>
09-15 15:56:42.830  1260  1260 F DEBUG   :     #52 pc 0000220c  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #53 pc 0000068e  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #54 pc 000018e9  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #55 pc 0000030b  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #56 pc 00006b8a  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #57 pc 00001117  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #58 pc 00001580  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #59 pc 00001db4  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #60 pc 00001e66  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #61 pc 000013ca  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #62 pc 000060c9  <unknown>
09-15 15:56:42.831  1260  1260 F DEBUG   :     #63 pc 0000220c  <unknown>
09-15 15:56:43.073  1566  8659 W ActivityManager:   Force finishing activity com.bulbthings.app/.MainActivity
09-15 15:56:43.073  1260  1260 F DEBUG   : 
09-15 15:56:43.073  1260  1260 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_07
09-15 15:56:43.073  1260  1260 E DEBUG   : AM write failed: Broken pipe
09-15 15:56:43.073  1566  1583 I BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
09-15 15:56:43.088  1566  8659 D         : HostConnection::get() New Host Connection established 0x7f3646033e00, tid 8659
09-15 15:56:43.101  1250  1250 E EGL_emulation: tid 1250: eglCreateSyncKHR(1370): error 0x3004 (EGL_BAD_ATTRIBUTE)
09-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
09-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!
09-15 15:56:43.112  1566  5108 D GraphicsStats: Buffer count: 4
09-15 15:56:43.161  1271  1271 I Zygote  : Process 8444 exited due to signal (11)
09-15 15:56:43.168  1566  1953 I WindowState: WIN DEATH: Window{53df5bf u0 com.bulbthings.app/com.bulbthings.app.MainActivity}
09-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)'
09-15 15:56:43.172  1566  8659 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
09-15 15:56:43.174  1566  8659 W ActivityManager: Exception thrown during pause
09-15 15:56:43.174  1566  8659 W ActivityManager: android.os.DeadObjectException
09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.os.BinderProxy.transactNative(Native Method)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.os.BinderProxy.transact(Binder.java:503)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:727)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:867)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2907)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2763)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2755)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11971)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11867)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12556)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12063)
09-15 15:56:43.174  1566  8659 W ActivityManager:   at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
09-15 15:56:43.177  1566  1705 I ActivityManager: Process com.bulbthings.app (pid 8444) has died
09-15 15:56:43.215  1566  3020 I OpenGLRenderer: Initialized EGL, version 1.4
09-15 15:56:43.282  2293  8661 D DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics or Lockbox.
09-15 15:56:43.299  2293  8661 D DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics or Lockbox.
09-15 15:56:43.826  1566  1585 W WindowAnimator: Failed to dispatch window animation state change.
09-15 15:56:43.826  1566  1585 W WindowAnimator: android.os.DeadObjectException
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.BinderProxy.transactNative(Native Method)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.BinderProxy.transact(Binder.java:503)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer.doCallbacks(Choreographer.java:670)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer.doFrame(Choreographer.java:603)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Handler.handleCallback(Handler.java:739)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Handler.dispatchMessage(Handler.java:95)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.Looper.loop(Looper.java:148)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at android.os.HandlerThread.run(HandlerThread.java:61)
09-15 15:56:43.826  1566  1585 W WindowAnimator:    at com.android.server.ServiceThread.run(ServiceThread.java:46)
09-15 15:56:43.858  1928  2099 W OpenGLRenderer: Incorrectly called buildLayer on View: em, destroying layer...

Any idea ? Maybe the way I handle the spinner for this too repetitive action is not the good way, I don't know

@lacker
Copy link
Contributor

lacker commented Dec 15, 2016

It seems like it is too hard to reproduce this issue from this information. I am going close this issue but if you have a way to reproduce this inside a simple app on rnplay.org then it would be great to reopen a new issue here. Thanks for reporting this!

@lacker lacker closed this as completed Dec 15, 2016
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants