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

crash when scrolling through news and then switching tabs #23227

Closed
kjozwiak opened this issue Jun 3, 2022 · 7 comments
Closed

crash when scrolling through news and then switching tabs #23227

kjozwiak opened this issue Jun 3, 2022 · 7 comments
Assignees

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Jun 3, 2022

Description

When you're in the middle of scrolling through the Brave News feed by quickly swiping and increasing the velocity, switching tabs will eventually crash the browser. This usually happens when you're swiping through the news feed on two different tabs and then switching between them while the news feed is still strolling.

Pretty sure this is related to brave/brave-core#13453. I can't reproduce the issue using 1.41.15 Chromium: 102.0.5005.61 which was the version right before brave/brave-core#13453 landed.

Steps to reproduce

  1. install any Nightly build that includes [Android] fixes orientation issue after turning news on brave-core#13453 (1.41.34 in this case)
  2. once installed, enable Brave News
  3. ensure that you have two NTP tabs opened
  4. start quickly scrolling through the news feed on Tab A and then switch to Tab B quickly
  5. after switching, quickly start scrolling through the news feed on Tab B and switch back to Tab A

Run through the above a few times and you'll reproduce the issue pretty quickly. It's a lot easier to reproduce via tablet.

Actual result

Screen_Recording_20220603-010853_Brave.-.Nightly.mp4

Expected result

Brave shouldn't be crashing when you're swiping through the news feed and then switching tabs. Crashes are never good.

Issue reproduces how often

100% reproducible using the STR/Cases mentioned above (see video example for visual aid to reproduce)

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version? No
  • Can you reproduce this issue with the current Play Store Beta version? No
  • Can you reproduce this issue with the current Play Store Nightly version? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device type (Phone, Tablet, Phablet): Samsung S10+ & Samsung S8+ Ultra
  • Android version: Android 12

Brave version

  • 1.41.15 Chromium: 102.0.5005.61 - Couldn't reproduce
  • 1.39.115 Chromium: 102.0.5005.78 - Couldn't reproduce
  • 1.41.34 Chromium: 102.0.5005.78 - Reproduce

Website problems only

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A
@kjozwiak
Copy link
Member Author

kjozwiak commented Jun 9, 2022

@alexsafe @tapanmodh I ended up getting a crash stack while connected to Android Studio. You'll need to symbolise it though but here's the build that I was using:

Brave | 1.41.48 Chromium: 102.0.5005.78 (Official Build) canary (32-bit)
--- | ---
Revision | df6dbb5a9fd82af3f567198af2eb5fb4876ef99c-refs/branch-heads/5005_59@{#3}
OS | Android 12; Build/TPBB.220414.018

Crash Stack:

2022-06-08 21:34:56.440 1924-1967/? W/ActivityManager: Exception when unbinding service com.brave.browser_nightly/org.chromium.content.app.PrivilegedProcessService0
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:584)
        at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1343)
        at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:4845)
        at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:5351)
        at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12252)
        at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3221)
        at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3328)
        at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1513)
        at android.os.IBinder$DeathRecipient.binderDied(IBinder.java:317)
        at android.os.BinderProxy.sendDeathNotice(BinderProxy.java:704)
2022-06-08 21:34:56.441 806-806/? I/Zygote: Process 12979 exited due to signal 9 (Killed)
2022-06-08 21:34:56.441 1924-1967/? I/ActivityManager: Killing 13319:com.brave.browser_nightly:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:4/u0a184i-8896 (adj 0): isolated not needed
2022-06-08 21:34:56.442 1924-1967/? I/ActivityManager: Killing 13073:com.brave.browser_nightly:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a184i-8900 (adj 0): isolated not needed
2022-06-08 21:34:56.442 1924-2117/? D/ConnectivityService: releasing NetworkRequest [ REQUEST id=1311, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10184 RequestorUid: 10184 RequestorPkg: com.brave.browser_nightly UnderlyingNetworks: Null] ] (release request)
2022-06-08 21:34:56.442 1924-2117/? D/ConnectivityService: releasing NetworkRequest [ REQUEST id=1314, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10184 RequestorUid: 10184 RequestorPkg: com.brave.browser_nightly UnderlyingNetworks: Null] ] (release request)
2022-06-08 21:34:56.443 1924-1968/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(uid/pid:10184/12979, [NetworkRequest [ REQUEST id=1317, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10184 RequestorUid: 10184 RequestorPkg: com.brave.browser_nightly UnderlyingNetworks: Null] ]], android.os.BinderProxy@9c99eaf)
2022-06-08 21:34:56.443 1924-2117/? D/ConnectivityService: releasing NetworkRequest [ REQUEST id=1317, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10184 RequestorUid: 10184 RequestorPkg: com.brave.browser_nightly UnderlyingNetworks: Null] ] (release request)
2022-06-08 21:34:56.444 1924-1961/? I/libprocessgroup: Successfully killed process cgroup uid 10184 pid 12979 in 0ms
2022-06-08 21:34:56.444 806-806/? I/Zygote: Process 13086 exited cleanly (0)
2022-06-08 21:34:56.444 1924-1961/? I/libprocessgroup: Successfully killed process cgroup uid 90104 pid 13319 in 0ms
2022-06-08 21:34:56.446 13039-13039/? I/Zygote: Process 13319 exited cleanly (0)
2022-06-08 21:34:56.450 1924-1961/? I/libprocessgroup: Successfully killed process cgroup uid 90100 pid 13073 in 0ms
2022-06-08 21:34:56.450 463-463/? W/lowmemorykiller: Failed to open /proc/13086/oom_score_adj; errno=2: process 13086 might have been killed
2022-06-08 21:34:56.451 1924-1968/? I/ActivityManager: Process com.brave.browser_nightly:privileged_process0 (pid 13086) has died: cch+80 CACC
2022-06-08 21:34:56.459 1924-1953/? W/WindowManager: Failed to deliver inset state change to w=Window{8b43ace u0 com.brave.browser_nightly/com.google.android.apps.chrome.Main EXITING}
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:584)
        at android.view.IWindow$Stub$Proxy.insetsControlChanged(IWindow.java:473)
        at com.android.server.wm.WindowState.notifyInsetsControlChanged(WindowState.java:4009)
        at com.android.server.wm.InsetsStateController.lambda$notifyPendingInsetsControlChanged$5(InsetsStateController.java:348)
        at com.android.server.wm.InsetsStateController.$r8$lambda$ni7v3ZO6TRbLZqXOFahDjPeXTS0(Unknown Source:0)
        at com.android.server.wm.InsetsStateController$$ExternalSyntheticLambda4.run(Unknown Source:2)
        at com.android.server.wm.WindowAnimator.executeAfterPrepareSurfacesRunnables(WindowAnimator.java:345)
        at com.android.server.wm.WindowAnimator.animate(WindowAnimator.java:226)
        at com.android.server.wm.WindowAnimator.lambda$new$1(WindowAnimator.java:106)
        at com.android.server.wm.WindowAnimator.$r8$lambda$fo2Nk5bb9hY3lvmHsTnTEwtZMbI(Unknown Source:0)
        at com.android.server.wm.WindowAnimator$$ExternalSyntheticLambda1.doFrame(Unknown Source:2)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1219)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
        at android.view.Choreographer.doCallbacks(Choreographer.java:896)
        at android.view.Choreographer.doFrame(Choreographer.java:822)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1204)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.os.HandlerThread.run(HandlerThread.java:67)
        at com.android.server.ServiceThread.run(ServiceThread.java:44)
2022-06-08 21:34:56.462 13039-13039/? I/Zygote: Process 13073 exited cleanly (0)
2022-06-08 21:34:56.466 1924-1961/? I/libprocessgroup: Successfully killed process cgroup uid 10184 pid 13086 in 0ms
2022-06-08 21:34:56.468 3484-3484/? I/GsaVoiceInteractionSrv: Handling ACTION_START_HOTWORD
2022-06-08 21:34:56.469 3484-4119/? I/GsaVoiceInteractionSrv: disregardVoiceMatch: false
2022-06-08 21:34:56.469 3484-4119/? I/GsaVoiceInteractionSrv: Cannot start hotword, hotword has been explicitly disabled.
2022-06-08 21:34:56.473 3481-4021/? I/AiAiEcho: Predicting[1]: { Feature:WEATHER, creation:2022-06-09T01:26:53.720Z, expiry:2022-06-09T07:26:53.720Z, isExpired: false}
2022-06-08 21:34:56.473 3481-4021/? I/AiAiEcho: Ranked targets strategy: WEIGHTED, count: 1, ranking metadata: { cardId: WEATHER-569377243, card type: WEATHER, update time: 2022-06-09T01:26:53.720Z, expiration time: 2022-06-09T07:26:53.720Z, ranking metadata: RankingMetaData(urgency=0.982, priority=0.3, recency=1.0, rankScore=0.2946, importantTimePoints=# knf@7bca4) }
2022-06-08 21:34:56.475 3481-4021/? I/AiAiEcho: #postPredictionTargets: Sending updates to UISurface lockscreen with targets# 1
2022-06-08 21:34:56.475 3481-4021/? I/AiAiEcho: #postPredictionTargets: Sending updates to UISurface home with targets# 1
2022-06-08 21:34:56.475 3481-4021/? I/AiAiEcho: #postPredictionTargets: Sending updates to UISurface media_data_manager with targets# 0
2022-06-08 21:34:56.478 3769-3769/? I/A: onApplyWindowInsets: systemWindowInsets=Insets{left=0, top=118, right=0, bottom=42}
2022-06-08 21:34:56.478 3769-3769/? I/A: onApplyWindowInsets: systemWindowInsets=Insets{left=0, top=118, right=0, bottom=42}
2022-06-08 21:34:56.480 2200-2200/? W/BcSmartspaceCard: No title view to update
2022-06-08 21:34:56.480 2200-2200/? I/BcSmartspaceCard: setFormattedContentDescription: textView=SUBTITLE, text=14°C, iconDescription=Rain, contentDescription=Rain 14°C
2022-06-08 21:34:56.484 3769-3769/? W/A: Can't get WAA status for Mavatar!
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
        at com.google.apps.tiktok.dataservice.ad.b(PG:1)
        at com.google.apps.tiktok.dataservice.ax.a(PG:1)
        at com.google.apps.tiktok.tracing.ee.a(PG:2)
        at com.google.common.util.concurrent.aj.a(PG:2)
        at com.google.common.util.concurrent.ac.apply(PG:1)
        at com.google.common.util.concurrent.h.e(PG:2)
        at com.google.common.util.concurrent.j.run(PG:9)
        at com.google.common.util.concurrent.bg.execute(PG:1)
        at com.google.common.util.concurrent.d.i(PG:1)
        at com.google.common.util.concurrent.d.l(PG:12)
        at com.google.common.util.concurrent.d.n(PG:2)
        at com.google.common.util.concurrent.i.f(PG:1)
        at com.google.common.util.concurrent.j.run(PG:13)
        at com.google.android.libraries.i.ad.run(PG:1)
        at com.google.android.libraries.i.al.run(PG:23)
        at com.google.android.libraries.i.k.run(PG:2)
        at com.google.android.libraries.i.p.run(PG:4)
        at java.lang.Thread.run(Thread.java:1012)
2022-06-08 21:34:56.485 1924-1953/? W/WindowManager: Exception thrown during dispatchAppVisibility Window{8b43ace u0 com.brave.browser_nightly/com.google.android.apps.chrome.Main EXITING}
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:584)
        at android.view.IWindow$Stub$Proxy.dispatchAppVisibility(IWindow.java:536)
        at com.android.server.wm.WindowState.sendAppVisibilityToClients(WindowState.java:3502)
        at com.android.server.wm.WindowContainer.sendAppVisibilityToClients(WindowContainer.java:1197)
        at com.android.server.wm.WindowToken.setClientVisible(WindowToken.java:398)
        at com.android.server.wm.ActivityRecord.setClientVisible(ActivityRecord.java:6472)
        at com.android.server.wm.ActivityRecord.onAnimationFinished(ActivityRecord.java:7259)
        at com.android.server.wm.ActivityRecord.postApplyAnimation(ActivityRecord.java:5173)
        at com.android.server.wm.ActivityRecord.commitVisibility(ActivityRecord.java:5145)
        at com.android.server.wm.ActivityRecord.commitVisibility(ActivityRecord.java:5149)
        at com.android.server.wm.AppTransitionController.handleClosingApps(AppTransitionController.java:1058)
        at com.android.server.wm.AppTransitionController.handleAppTransitionReady(AppTransitionController.java:261)
        at com.android.server.wm.RootWindowContainer.checkAppTransitionReady(RootWindowContainer.java:975)
        at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:842)
        at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:784)
        at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
        at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
        at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
        at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.os.HandlerThread.run(HandlerThread.java:67)
        at com.android.server.ServiceThread.run(ServiceThread.java:44)

@kjozwiak
Copy link
Member Author

I tried reproducing it again using 1.41.68 Chromium: 103.0.5060.42 with several devices and it seems a lot harder to reproduce compared to before. However, I did manage to get it to crash after ~15-30min of following the STR/Cases via #23227 (comment) and just swiping/switching tabs.

So it's definitely not something that's happening often. I guess we can leave this opened for now and see if we get any similar reports from users or if we start getting crash reports from the GPS dashboard. Maybe one of those will be this particular issue and we'll resolve it that way.

@deeppandya
Copy link
Contributor

@tapanmodh can you verify it and add a comment ?

@tapanmodh
Copy link

It's working for me. @kjozwiak can you check in the latest stable channel?

@LorenzoMinto
Copy link

@tapanmodh can we close this?

@tapanmodh
Copy link

I think so. Last time I checked it was working as expected. @kjozwiak can you please double check this?

@kjozwiak
Copy link
Member Author

Going to close this off as I couldn't reproduce the above on my Pixel 8 Pro using Android 14 using the following build(s):

Brave | 1.64.69 Chromium: 122.0.6261.29 (Official Build) canary (64-bit)
--- | ---
Revision | 3992d5550b2a00310f063f95c597bb87c31b4d47
OS | Android 14; Build/UQ1A.240205.004; 34; REL

I tried reproducing the issue for ~10min and couldn't reproduce any crashes when scrolling through Brave News feed. We've fixed a bunch of crashes re: scrolling through Brave News in the last ~year. Assuming the above probably got fixed as well.

@kjozwiak kjozwiak added closed/works-for-me and removed bug crash QA/Yes release-notes/exclude OS/Android Fixes related to Android browser functionality feature/brave-news formerly brave-today labels Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants