akumaigorodski / wallet

Bitcoin wallet for Android
https://sbw.app
Apache License 2.0
240 stars 73 forks source link

Investigate payment list exception #92

Closed akumaigorodski closed 3 years ago

akumaigorodski commented 3 years ago

java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131362077, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)] at android.widget.ListView.layoutChildren(ListView.java:1814) at android.widget.AbsListView.onLayout(AbsListView.java:2405) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at com.android.internal.policy.DecorView.onLayout(DecorView.java:1225) at android.view.View.layout(View.java:24475) at android.view.ViewGroup.layout(ViewGroup.java:7383) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4260) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3695) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2618) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9971) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010) at android.view.Choreographer.doCallbacks(Choreographer.java:809) at android.view.Choreographer.doFrame(Choreographer.java:744) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:995) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8595) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

akumaigorodski commented 3 years ago

Supposedly fixed by making data update to always happen in UI thread: https://github.com/btcontract/wallet/blob/master/app/src/main/java/com/btcontract/wallet/HubActivity.scala#L136-L142.