Skip to content

Warning message in logcat when scroll NTP #29343

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

Closed
SergeyZhukovsky opened this issue Mar 27, 2023 · 1 comment · Fixed by brave/brave-core#17782
Closed

Warning message in logcat when scroll NTP #29343

SergeyZhukovsky opened this issue Mar 27, 2023 · 1 comment · Fixed by brave/brave-core#17782
Assignees
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA/Yes release-notes/include

Comments

@SergeyZhukovsky
Copy link
Member

I see that warning message when scroll NTP in the latest master 1.51.x. We need to get rid of it as it potentially causes ANRs. For verification just make sure that you can scroll Brave News without any issues.

2023-03-27 15:02:53.698 20177-20177 RecyclerView            com.brave.browser_default            W  Cannot call this method in a scroll callback. Scroll callbacks mightbe run during a measure & layout pass where you cannot change theRecyclerView data. Any method call that might change the structureof the RecyclerView or the adapter contents should be postponed to the next frame.
                                                                                                    java.lang.IllegalStateException:  androidx.recyclerview.widget.RecyclerView{956134f VFE...... ......ID 0,147-1080,1605 #7f0109ca app:id/recyclerview}, adapter:org.chromium.chrome.browser.ntp.BraveNtpAdapter@f5c7b29, layout:androidx.recyclerview.widget.LinearLayoutManager@1a27adc, context:org.chromium.chrome.browser.ChromeTabbedActivity@3465149
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:3487)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onItemRangeChanged(RecyclerView.java:6061)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyItemRangeChanged(RecyclerView.java:13176)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyItemRangeChanged(RecyclerView.java:13166)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$Adapter.notifyItemChanged(RecyclerView.java:8059)
                                                                                                    	at org.chromium.chrome.browser.ntp.BraveNtpAdapter.setImageCreditAlpha(BraveNtpAdapter.java:529)
                                                                                                    	at org.chromium.chrome.browser.ntp.BraveNewTabPageLayout$4.onScrolled(BraveNewTabPageLayout.java:702)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5678)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5861)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
                                                                                                    	at android.view.Choreographer.doCallbacks(Choreographer.java:796)
                                                                                                    	at android.view.Choreographer.doFrame(Choreographer.java:727)
                                                                                                    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2023-03-27 15:02:56.426 20177-20177 RecyclerView            com.brave.browser_default            W  Cannot call this method in a scroll callback. Scroll callbacks mightbe run during a measure & layout pass where you cannot change theRecyclerView data. Any method call that might change the structureof the RecyclerView or the adapter contents should be postponed tothe next frame.
                                                                                                    java.lang.IllegalStateException:  androidx.recyclerview.widget.RecyclerView{956134f VFE...... ......ID 0,147-1080,1605 #7f0109ca app:id/recyclerview}, adapter:org.chromium.chrome.browser.ntp.BraveNtpAdapter@f5c7b29, layout:androidx.recyclerview.widget.LinearLayoutManager@1a27adc, context:org.chromium.chrome.browser.ChromeTabbedActivity@3465149
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:3487)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onItemRangeChanged(RecyclerView.java:6061)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyItemRangeChanged(RecyclerView.java:13176)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyItemRangeChanged(RecyclerView.java:13166)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$Adapter.notifyItemChanged(RecyclerView.java:8059)
                                                                                                    	at org.chromium.chrome.browser.ntp.BraveNtpAdapter.setImageCreditAlpha(BraveNtpAdapter.java:529)
                                                                                                    	at org.chromium.chrome.browser.ntp.BraveNewTabPageLayout$4.onScrolled(BraveNewTabPageLayout.java:707)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5678)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5861)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
                                                                                                    	at android.view.Choreographer.doCallbacks(Choreographer.java:796)
                                                                                                    	at android.view.Choreographer.doFrame(Choreographer.java:727)
                                                                                                    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@GeetaSarvadnya
Copy link

Verification PASSED on Vivo X70 Pro version 12 running Bravemonoarm64.apk_1.51.105

  • Verified the description from the issue and ensured that able to scroll through the brave news feeds without any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants