mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

[Bug]: Web content is not displayed if `gfx.webrender.software` is `true` #27039

Closed masayuki-nakano closed 2 years ago

masayuki-nakano commented 2 years ago

Steps to reproduce

Multiple STRs...

  1. Set default browser to Firefox Nightly

  2. Open link from another application

  3. Select a tab in the tab tray whose domain has not been loaded

etc. I guess the bug happens when I try to open a web page whose domain hasn't been loaded.

Expected behaviour

The web content should be painted.

Actual behaviour

The web content is not painted, if I see a tab, then, the tab's content is not erased and new tab's content is not painted, and if I open a link from another app, the web contained painted as black.

Device name

Galaxy Tab S8+

Android version

Androine 12, One UI 4.1

Firefox release type

Firefox Nightly

Firefox version

106.0a1

Device logs

No response

Additional information

I guess that I hit a bug of GPU driver of Galaxy S8+ or a GPU process's bug of Gecko because after I switched to another tab, the buggy tab is painted correctly (and when it's painted as black, tapping somewhere probably over a link loads another page. In addition, I don't reproduce this on Pixel 5a5G.

IIRC, I started to reproduce this bug since around 21st August. I tried to collect some warnings or errors, but I couldn't have a chance to get it so that I delayed to reported this.

┆Issue is synchronized with this Jira Task

CitronDoux commented 2 years ago

I have a similar problem. No refresh when I open a new tab. Even if I try to reload. I don't remember the first time that occurs. Now FF 106.0b2 on a Poco M3 Pro 5G with Android 11 RP1A.

masayuki-nakano commented 2 years ago

I attached to the Galaxy Tab S8+ and try to show a tab in Fenix Nightly. Then, it seems that this log reports the issue:

09-30 16:49:09.913  2405  5686 I WindowManager: Reparenting to original parent: Surface(name=WindowToken{dfb6c7 android.os.Binder@9527006})/@0x5877c23, destroy=false, surface=Surface(name=4786ca1 InputMethod)/@0x92ac152
09-30 16:49:09.913  2405  5686 I WindowManager: Reparenting to leash, surface=Surface(name=4786ca1 InputMethod)/@0x92ac152, leashParent=Surface(name=WindowToken{dfb6c7 android.os.Binder@9527006})/@0x5877c23
09-30 16:49:09.913  1619  2102 I SurfaceFlinger: id=654 createSurf (0x0),-1 flag=24004, Surface(name=4786ca1 InputMethod)/@0x92ac152 - animation-leash of insets_animation#1
09-30 16:49:09.915  2405  5686 D WindowManager: makeSurface duration=2 leash=Surface(name=Surface(name=4786ca1 InputMethod)/@0x92ac152 - animation-leash of insets_animation)/@0x6f34f9
09-30 16:49:09.916 10621 10621 I WebExtension: releasePendingMessages: extension=cookies@mozac.org nativeApp=MozacBrowserSearchMessage session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.917  1619  1619 I Layer   : id=649 removedFromDrawingState Surface(name=4786ca1 InputMethod)/@0x92ac152 - animation-leash of insets_animation#0 (127)
09-30 16:49:09.919  1619  2102 I SurfaceFlinger: id=649 Removed Surface(name=4786ca1 InputMethod)/@0x92ac152 - animation-leash of insets_animation#0 (127)
09-30 16:49:09.926  1619  1619 I Layer   : id=649 Destroyed Surface(name=4786ca1 InputMethod)/@0x92ac152 - animation-leash of insets_animation#0
09-30 16:49:09.931 10621 10621 I WebExtension: releasePendingMessages: extension=fxa@mozac.org nativeApp=mozacWebchannel session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.931 10621 10621 I WebExtension: releasePendingMessages: extension=ads@mozac.org nativeApp=MozacBrowserAdsMessage session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.932 10621 10621 I WebExtension: releasePendingMessages: extension=icons@mozac.org nativeApp=MozacBrowserIcons session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.932 10621 10621 I WebExtension: releasePendingMessages: extension=readerview@mozac.org nativeApp=mozacReaderviewActive session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.932 10621 10621 I WebExtension: releasePendingMessages: extension=readerview@mozac.org nativeApp=mozacReaderview session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.932 10621 10621 I WebExtension: releasePendingMessages: extension=readerview@mozac.org nativeApp=mozacReaderviewActive session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.932 10621 10621 I WebExtension: releasePendingMessages: extension=readerview@mozac.org nativeApp=mozacReaderview session=org.mozilla.geckoview.GeckoSession@133da02
09-30 16:49:09.937  2405  5686 D InputMethodManagerServicePhysicalKey: isConnectedDexOnPC false
09-30 16:49:09.938  2405  5686 D InputMethodManagerService: isImeSwitcherDisabledPackage : false
09-30 16:49:09.943 10621 10759 I GeckoSession: zerdatime 1316846 - chrome startup finished
09-30 16:49:09.949 10621 10621 I GeckoSession: handleMessage GeckoView:PageStart uri=
09-30 16:49:09.949 10621 10621 I GeckoSession: handleMessage GeckoView:PageStop uri=null
09-30 16:49:09.968 10621 10621 I GeckoSession: handleMessage GeckoView:PageStart uri=
09-30 16:49:09.991  2405  3267 D NetdEventListenerService: DNS Requested by : 100, 10298, 0
09-30 16:49:09.991  2405  3267 D NetdEventListenerService: DNS Requested by : 100, 10298, 0
09-30 16:49:10.034 10621 24304 I places::storage::history: breadcrumb: apply_observation: begin_transaction
09-30 16:49:10.040 10621 24304 I places::storage::history: breadcrumb: apply_observation: commit
09-30 16:49:10.046  2405  3267 D NetdEventListenerService: DNS Requested by : 100, 10298, 0
09-30 16:49:10.086  2405  2550 I WindowManager: Reparenting to original parent: Surface(name=ActivityRecord{51167b0 u0 org.mozilla.fenix/.HomeActivity t3728})/@0x14cde34, destroy=true, surface=Surface(name=4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity)/@0x55ac7c4
09-30 16:49:10.088  2405  2550 E WindowManager: win=Window{4ebf78a u0 org.mozilla.fenix/org.mozilla.fenix.HomeActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5860 com.android.server.wm.ActivityRecord.destroySurfaces:5841 com.android.server.wm.WindowState.onExitAnimationDone:5972 com.android.server.wm.WindowStateAnimator.onAnimationFinished:242 com.android.server.wm.WindowState.onAnimationFinished:6225 com.android.server.wm.WindowContainer$$ExternalSyntheticLambda0.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:113 
09-30 16:49:10.088  2405  2550 I WindowManager: Destroying surface Surface(name=org.mozilla.fenix/org.mozilla.fenix.HomeActivity$_10621)/@0xa4641bb called by com.android.server.wm.WindowStateAnimator.destroySurface:987 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:518 com.android.server.wm.WindowState.destroySurfaceUnchecked:4229 com.android.server.wm.WindowState.destroySurface:4203 com.android.server.wm.ActivityRecord.destroySurfaces:5860 com.android.server.wm.ActivityRecord.destroySurfaces:5841 com.android.server.wm.WindowState.onExitAnimationDone:5972 com.android.server.wm.WindowStateAnimator.onAnimationFinished:242 
09-30 16:49:10.093  1619  1619 I Layer   : id=645 removedFromDrawingState org.mozilla.fenix/org.mozilla.fenix.HomeActivity$_10621#1 (126)
09-30 16:49:10.093  1619  1619 I Layer   : id=642 removedFromDrawingState 4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity#0 (126)
09-30 16:49:10.093  1619  1619 I Layer   : id=650 removedFromDrawingState Surface(name=4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity)/@0x55ac7c4 - animation-leash of window_animation#0 (126)
09-30 16:49:10.093  2405  2550 I WindowManager: Reparenting to original parent: Surface(name=Task=3728)/@0xcf3092f, destroy=true, surface=Surface(name=Dim Layer for - Task=3728)/@0x44bede2
09-30 16:49:10.093  1619  1619 I SurfaceFlinger: id=642 Removed 4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity#0 (126)
09-30 16:49:10.093  1619  1619 I SurfaceFlinger: id=645 Removed org.mozilla.fenix/org.mozilla.fenix.HomeActivity$_10621#1 (126)
09-30 16:49:10.093  1619  1619 I SurfaceFlinger: id=650 Removed Surface(name=4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity)/@0x55ac7c4 - animation-leash of window_animation#0 (126)
09-30 16:49:10.094  1619  1619 I Layer   : id=650 Destroyed Surface(name=4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity)/@0x55ac7c4 - animation-leash of window_animation#0
09-30 16:49:10.094  1619  1619 I Layer   : id=642 Destroyed 4ebf78a org.mozilla.fenix/org.mozilla.fenix.HomeActivity#0
09-30 16:49:10.097 10621 10632 D InputTransport: Input channel destroyed: 'ClientS', fd=237
09-30 16:49:10.097  1619  1619 I Layer   : id=645 Destroyed org.mozilla.fenix/org.mozilla.fenix.HomeActivity$_10621#1
09-30 16:49:10.102  1619  1619 D SurfaceFlinger: Display 4630947232161729154 HWC layers:
09-30 16:49:10.102  1619  1619 D SurfaceFlinger:      DEVICE | 0xb4000077abe3d930 | 0100 | RGBx_8888    |    0.0    0.0 2598.0 1752.0 |   51    0 2649 1752 | bbq-wrapper#0
09-30 16:49:10.102  1619  1619 D SurfaceFlinger:      DEVICE | 0xb4000077abe29ec0 | 0100 | RGBA_8888    |    0.0    0.0 2800.0 1752.0 |    0    0 2800 1752 | org.mozilla.fenix/org.mozilla.fenix.HomeActivity$_10621#0
09-30 16:49:10.102  1619  1619 D SurfaceFlinger:      DEVICE | 0xb4000077abe2db80 | 0100 | RGBA_8888    |    0.0    0.0   51.0 1752.0 |    0    0   51 1752 | StatusBar$_3534#0
09-30 16:49:10.102  1619  1619 D SurfaceFlinger:      DEVICE | 0xb4000077abe21730 | 0100 | RGBA_8888    |    0.0    0.0  102.0 1752.0 | 2698    0 2800 1752 | NavigationBar0$_3534#0
09-30 16:49:10.102  1619  1619 D SurfaceFlinger:      DEVICE | 0xb4000077abe37a20 | 0100 | RGBA_8888    |    0.0   56.0  172.0  172.0 |  383    0  555  116 | Air_Cmd(Floating)$_6029#0
09-30 16:49:10.102  1619  1619 D SurfaceFlinger: 
09-30 16:49:10.103  1619  1619 I Layer   : id=647 removedFromDrawingState Dim Layer for - Task=3728#0 (123)
09-30 16:49:10.104  1619  1619 I Layer   : id=653 removedFromDrawingState Surface(name=Dim Layer for - Task=3728)/@0x44bede2 - animation-leash of dimmer#0 (123)
09-30 16:49:10.104  1619  1619 I SurfaceFlinger: id=647 Removed Dim Layer for - Task=3728#0 (123)
09-30 16:49:10.104  1619  1619 I SurfaceFlinger: id=653 Removed Surface(name=Dim Layer for - Task=3728)/@0x44bede2 - animation-leash of dimmer#0 (123)
09-30 16:49:10.105  1619  1619 I Layer   : id=653 Destroyed Surface(name=Dim Layer for - Task=3728)/@0x44bede2 - animation-leash of dimmer#0
09-30 16:49:10.105  1619  1619 I Layer   : id=647 Destroyed Dim Layer for - Task=3728#0
09-30 16:49:10.111  2405  2547 I GestureDetector: handleMessage TAP
09-30 16:49:10.111  2405  2405 I GestureDetector: handleMessage TAP
09-30 16:49:10.113 10621 10621 I GestureDetector: handleMessage TAP
09-30 16:49:10.175  2405  3227 D SemNscXgbMsL1: Probability - Cloud gaming: [0.053705342]
09-30 16:49:10.175  2405  3227 D SemNscXgbMsL1: Probability - Real time: [0.04639239]
09-30 16:49:10.175  2405  3227 D SemNscXgbMsL1: Probability - Non real time: [0.7085339]
09-30 16:49:10.175  2405  3227 D SemNscXgbMsL1: 1 sample inference time: 0.24901 msecs
09-30 16:49:10.176  2405  3227 D SemNscXgbL2Rt: L2 RT 1 sample inference time: 0.458333 msecs
09-30 16:49:10.176  2405  3227 D SemNscXgbL2Nrt: L2 NRT 1 sample inference time: 0.421615 msecs
09-30 16:49:10.193  1479  5656 I sensors-hal: handle_sns_client_event:141, auto_rotation_event_2: mode:255, type:1:0/0.055,4.056,8.911, ar:1
09-30 16:49:10.259 10621 24304 I places::storage::history: breadcrumb: apply_observation: begin_transaction
09-30 16:49:10.265 10621 24304 I places::storage::history: breadcrumb: apply_observation: commit
09-30 16:49:10.313 10621 10631 W g.mozilla.feni: Cleared Reference was only reachable from finalizer (only reported once)
09-30 16:49:10.322 10621 24301 D OpenGLRenderer: setSurface called with nullptr
09-30 16:49:10.334 10621 10633 W System  : A resource failed to call release. 
09-30 16:49:10.393  1482  3343 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xc9
09-30 16:49:10.396  3352  3352 E wpa_sslib: diag_event:22       diag_buf:[16:49:10.393000][DHCP] DISCOVER tx_status=TX_FAIL [vdev_id=0]
09-30 16:49:10.539   994   994 D io_stats: !@   8,0 r 505394 8795313 w 96492 3697452 d 40455 18087332 f 0 8301 iot 160500 0 th 0 0 0 pt 0 inp 0 0 1317.437
09-30 16:49:10.540   994   994 D io_stats: !@ Read_top(KB): AndroidUI(10621) 10628 lla.fenix:tab16(24407) 1940 lla.fenix:tab33(24984) 76
09-30 16:49:10.541   994   994 D io_stats: !@ Write_top(KB): kworker/u16:9(1532) 9444 f2fs_ckpt-254:1(4494) 1288 AndroidUI(10621) 1112
09-30 16:49:10.581 10621 10621 I GeckoSession: handleMessage GeckoView:PageStop uri=null
masayuki-nakano commented 2 years ago

@jamienicol Do you have any ideas from the log? I'm still not sure whether this is a bug of Gecko or Fenix.

masayuki-nakano commented 2 years ago

Oh, this is reproducible with TWA if the domain has been in a cold tab. Then, I couldn't solve this issue without rebooting the processes.

masayuki-nakano commented 2 years ago

I couldn't reproduce this issue with builds which I built by myself. Therefore, I tried to check prefs. Then, I see that gfx.webrender.software was enabled (perhaps, I changed it for debugging another GPU driver issue), then, I disable it and reboot Fenix Nightly. Finally, I've not reproduced this issue yet.

@CitronDoux How about you?

CitronDoux commented 2 years ago

Hi, today I meet again (today) this issue w/ Firefox Beta 106.0b5.

masayuki-nakano commented 2 years ago

Hi, today I meet again (today) this issue w/ Firefox Beta 106.0b5.

My pointn is, is gfx.webrender.software pref enabled in your environment? If not, probably you see different issue.

CitronDoux commented 2 years ago

Hello, my gfx.webrender.software is set to false

BTW if this can help : gfx.webrender.software.d3d11 true gfx.webrender.software.d3d11.upload-mode 4 gfx.webrender.software.opengl true gfx.webrender.software.svg-image true (Maybe the last one is for SVG format file ?)

jamienicol commented 2 years ago

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1798714

Change performed by the Move to Bugzilla add-on.

masayuki-nakano commented 2 years ago

I verified the fix in today's Nightly build. How about you, @CitronDoux ?