dashpay / dash-wallet

Dash Wallet for Android
https://dash.org
174 stars 169 forks source link

Crash from RecyclerView #46

Closed HashEngineering closed 6 years ago

HashEngineering commented 7 years ago
java.lang.IllegalArgumentException: 
  at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal (RecyclerView.java:5692)
  at android.support.v7.widget.RecyclerView.removeAnimatingView (RecyclerView.java:1279)
  at android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished (RecyclerView.java:11518)
  at android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished (RecyclerView.java:12018)
  at android.support.v7.widget.SimpleItemAnimator.dispatchAddFinished (SimpleItemAnimator.java:289)
  at android.support.v7.widget.DefaultItemAnimator$5.onAnimationEnd (DefaultItemAnimator.java:242)
  at android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd (ViewPropertyAnimatorCompatJB.java:51)
  at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd (ViewPropertyAnimator.java:1114)
  at android.animation.ValueAnimator.endAnimation (ValueAnimator.java:1239)
  at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame (ValueAnimator.java:766)
  at android.animation.ValueAnimator$AnimationHandler$1.run (ValueAnimator.java:801)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:920)
  at android.view.Choreographer.doCallbacks (Choreographer.java:695)
  at android.view.Choreographer.doFrame (Choreographer.java:628)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:906)
  at android.os.Handler.handleCallback (Handler.java:739)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:158)
  at android.app.ActivityThread.main (ActivityThread.java:7225)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
HashEngineering commented 7 years ago

This does not apply: https://samebug.io/exceptions/3012439/java.lang.IllegalArgumentException/tmp-detached-view-should-be-removed-from https://issuetracker.google.com/issues/37098293 https://github.com/google/flexbox-layout/issues/240

HashEngineering commented 7 years ago

This is the proposed solution. https://stackoverflow.com/questions/26477660/recyclerview-crashes-when-scrapped-or-attached-views-may-not-be-recycled

HashEngineering commented 7 years ago

Device Model: SM-G900W8 Android Version: 6.0.1 Android security patch level: 2017-02-01 ABIs: armeabi-v7a, armeabi

java.lang.IllegalArgumentException: Tmp detached view should be removed from RecyclerView before it can be recycled: ViewHolder{f08251d position=0 id=66470, oldPos=-1, pLpos:-1 invalid update tmpDetached undefined adapter position no parent}
    at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:5692) ~[na:0.0]
    at android.support.v7.widget.RecyclerView.removeAnimatingView(RecyclerView.java:1279) ~[na:0.0]
    at android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:11518) ~[na:0.0]
    at android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:12018) ~[na:0.0]
    at android.support.v7.widget.SimpleItemAnimator.dispatchMoveFinished(SimpleItemAnimator.java:279) ~[na:0.0]
    at android.support.v7.widget.DefaultItemAnimator$6.onAnimationEnd(DefaultItemAnimator.java:304) ~[na:0.0]
    at android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd(ViewPropertyAnimatorCompatJB.java:51) ~[na:0.0]
    at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1114) ~[na:0.0]
    at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239) ~[na:0.0]
    at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766) ~[na:0.0]
    at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801) ~[na:0.0]
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) ~[na:0.0]
    at android.view.Choreographer.doCallbacks(Choreographer.java:695) ~[na:0.0]
    at android.view.Choreographer.doFrame(Choreographer.java:628) ~[na:0.0]
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) ~[na:0.0]
    at android.os.Handler.handleCallback(Handler.java:739) ~[na:0.0]
    at android.os.Handler.dispatchMessage(Handler.java:95) ~[na:0.0]
    at android.os.Looper.loop(Looper.java:158) ~[na:0.0]
    at android.app.ActivityThread.main(ActivityThread.java:7224) ~[na:0.0]
    at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) ~[na:0.0]
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) ~[na:0.0]
HashEngineering commented 6 years ago

Several users report that this occurred while viewing the Exchange Rates activity.

HashEngineering commented 6 years ago
12:25:27 [Wallet autosave thread] WalletFiles - Background saving wallet; last seen block is height 794164, date 2017-12-27T12:21:39Z, hash 000000000000000df2ac5c4dfa5df4c40e734c2227a6c388f05f8b5d89f00b23
12:25:27 [Wallet autosave thread] WalletFiles - Save completed in 24.62 ms
12:25:28 [NioClientManager] Peer - [bandwidth] 2.013127326965332 MiB in 38 s:53.004278072932735 KB/s
12:25:30 [NioClientManager] Peer - [bandwidth] 2.0165796279907227 MiB in 40 s:50.52303628553778 KB/s
12:25:32 [NioClientManager] Peer - [bandwidth] 2.020051956176758 MiB in 42 s:48.706896868892606 KB/s
12:25:35 [NioClientManager] Peer - [bandwidth] 2.023538589477539 MiB in 45 s:45.895798609572964 KB/s
12:25:38 [NioClientManager] Peer - [bandwidth] 2.0270042419433594 MiB in 48 s:43.13402347727603 KB/s
12:25:40 [NioClientManager] Peer - [bandwidth] 2.0302906036376953 MiB in 50 s:40.83952262213448 KB/s
12:25:44 [NioClientManager] Peer - [bandwidth] 2.033702850341797 MiB in 54 s:38.3547907534625 KB/s
12:25:46 [NioClientManager] Peer - [bandwidth] 2.0370378494262695 MiB in 56 s:36.98910782920752 KB/s
12:25:48 [NioClientManager] Peer - [bandwidth] 2.040858268737793 MiB in 58 s:35.79104071223668 KB/s
12:25:50 [NioClientManager] Peer - [bandwidth] 2.0442686080932617 MiB in 60 s:34.57137049243613 KB/s
12:25:51 [dash-privatesend] InstantSend - CInstantSend::CheckAndRemove -- Lock Candidates: 0, Votes 0
12:25:51 [dash-privatesend] DarkSendPool - Masternodes: 0, peers who asked us for Masternode list: 0, peers we asked for Masternode list: 0, entries in Masternode list we asked for: 0, nDsqCount: 0
12:25:52 [NioClientManager] Peer - [bandwidth] 2.047665596008301 MiB in 62 s:33.29273225754593 KB/s
12:25:55 [NioClientManager] Peer - [bandwidth] 2.051055908203125 MiB in 65 s:32.02380498589616 KB/s
12:25:58 [NioClientManager] Peer - [bandwidth] 2.0544252395629883 MiB in 68 s:30.754509170699084 KB/s
12:26:00 [NioClientManager] Peer - [bandwidth] 2.057863235473633 MiB in 70 s:29.851989702861594 KB/s
12:26:00 [main] BlockchainServiceImpl - service start command: Intent { act=de.schildbach.wallet.service.cancel_coins_received cmp=hashengineering.darkcoin.wallet/de.schildbach.wallet.service.BlockchainServiceImpl }
12:26:01 [NioClientManager] Peer - [2001:0:5ef5:79fb:34bf:27ef:9ea6:5947]:9999: Received unhandled message: org.bitcoinj.core.GovernanceSyncMessage@f236982
12:26:02 [main] BlockchainServiceImpl - onTrimMemory(20) called
12:26:03 [NioClientManager] Peer - [bandwidth] 2.0615310668945312 MiB in 73 s:28.64053363316917 KB/s
12:26:06 [NioClientManager] Peer - [bandwidth] 2.0648107528686523 MiB in 76 s:27.672414974249744 KB/s
12:26:08 [NioClientManager] Peer - [bandwidth] 2.068202018737793 MiB in 79 s:26.79519809695969 KB/s
12:26:11 [main] BlockchainServiceImpl - service start command: Intent { act=de.schildbach.wallet.service.cancel_coins_received cmp=hashengineering.darkcoin.wallet/de.schildbach.wallet.service.BlockchainServiceImpl }
12:26:11 [NioClientManager] Peer - [bandwidth] 2.071626663208008 MiB in 81 s:26.0029382224415 KB/s
12:26:12 [NioClientManager] Peer - [bandwidth] 2.075023651123047 MiB in 82 s:25.78044429446736 KB/s
12:26:14 [NioClientManager] Peer - [bandwidth] 2.078441619873047 MiB in 84 s:25.217709172610725 KB/s
12:26:16 [NioClientManager] Peer - [bandwidth] 2.0819625854492188 MiB in 86 s:24.6996974708622 KB/s
12:26:19 [NioClientManager] Peer - [bandwidth] 2.085214614868164 MiB in 89 s:23.896633229905767 KB/s
12:26:21 [NioClientManager] Peer - [bandwidth] 2.088639259338379 MiB in 91 s:23.330387372099743 KB/s
12:26:21 [dash-privatesend] DarkSendPool - Masternodes: 0, peers who asked us for Masternode list: 0, peers we asked for Masternode list: 0, entries in Masternode list we asked for: 0, nDsqCount: 0
12:26:23 [NioClientManager] Peer - [bandwidth] 2.0920982360839844 MiB in 93 s:22.918519323348487 KB/s
12:26:24 [main] BlockchainServiceImpl - onTrimMemory(20) called
12:26:26 [NioClientManager] Peer - [bandwidth] 2.0954885482788086 MiB in 96 s:22.31700752405096 KB/s
12:26:26 [main] BlockchainServiceImpl - service start command: Intent { act=de.schildbach.wallet.service.cancel_coins_received cmp=hashengineering.darkcoin.wallet/de.schildbach.wallet.service.BlockchainServiceImpl }
12:26:28 [NioClientManager] Peer - [bandwidth] 2.0987958908081055 MiB in 98 s:21.718410123565018 KB/s
12:26:31 [NioClientManager] Peer - [bandwidth] 2.1021928787231445 MiB in 101 s:21.174742603481178 KB/s
12:26:33 [main] BlockchainServiceImpl - service start command: Intent { act=de.schildbach.wallet.service.cancel_coins_received cmp=hashengineering.darkcoin.wallet/de.schildbach.wallet.service.BlockchainServiceImpl }
12:26:33 [NioClientManager] Peer - [bandwidth] 2.105624198913574 MiB in 103 s:20.74806035053069 KB/s
12:26:34 [NioClientManager] Peer - [bandwidth] 2.1090211868286133 MiB in 104 s:20.698080269431664 KB/s
12:26:35 [NioClientManager] Peer - [bandwidth] 2.11246395111084 MiB in 105 s:20.422997846801298 KB/s
12:26:38 [NioClientManager] Peer - [bandwidth] 2.115846633911133 MiB in 108 s:19.984383791368433 KB/s
12:26:41 [NioClientManager] Peer - [bandwidth] 2.1196460723876953 MiB in 111 s:19.478579373109817 KB/s
12:26:41 [main] CrashReporter - crashing because of uncaught exception
java.lang.IllegalArgumentException: Tmp detached view should be removed from RecyclerView before it can be recycled: ViewHolder{9f15238 position=0 id=65759, oldPos=-1, pLpos:-1 invalid update tmpDetached undefined adapter position no parent}
    at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:5692) ~[na:0.0]
    at android.support.v7.widget.RecyclerView.removeAnimatingView(RecyclerView.java:1279) ~[na:0.0]
    at android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:11518) ~[na:0.0]
    at android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:12018) ~[na:0.0]
    at android.support.v7.widget.SimpleItemAnimator.dispatchMoveFinished(SimpleItemAnimator.java:279) ~[na:0.0]
    at android.support.v7.widget.DefaultItemAnimator$6.onAnimationEnd(DefaultItemAnimator.java:304) ~[na:0.0]
    at android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd(ViewPropertyAnimatorCompatJB.java:51) ~[na:0.0]
    at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1122) ~[na:0.0]
    at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:552) ~[na:0.0]
    at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1209) ~[na:0.0]
    at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1449) ~[na:0.0]
    at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146) ~[na:0.0]
    at android.animation.AnimationHandler.-wrap2(Unknown Source:0) ~[na:0.0]
    at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54) ~[na:0.0]
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:964) ~[na:0.0]
    at android.view.Choreographer.doCallbacks(Choreographer.java:778) ~[na:0.0]
    at android.view.Choreographer.doFrame(Choreographer.java:710) ~[na:0.0]
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952) ~[na:0.0]
    at android.os.Handler.handleCallback(Handler.java:789) ~[na:0.0]
    at android.os.Handler.dispatchMessage(Handler.java:98) ~[na:0.0]
    at android.os.Looper.loop(Looper.java:164) ~[na:0.0]
    at android.app.ActivityThread.main(ActivityThread.java:6809) ~[na:0.0]
    at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) ~[na:0.0]
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) ~[na:0.0]
HashEngineering commented 6 years ago

User reported that this happens when entering a currency code that is not found.

I found on android 4.4.4 and android 7.0 that if I type a currency code fast that is not found it will crash, but if I type it slowly, it will not crash.

Bitcoin Wallet does not have this problem.

desamtralized commented 6 years ago

This PR: https://github.com/HashEngineering/dash-wallet/pull/70 should solve this issue.

HashEngineering commented 6 years ago

This issue was resolved by https://github.com/HashEngineering/dash-wallet/commit/30bb304c03ece1b749fc90aad896f7af64e0fb36.

We can close this issue about 2 weeks after it is published on Google Play and we see that the crash reports concerning this exception disappear from the reported crashes.

HashEngineering commented 6 years ago

This issue has been resolved.