Closed Bug 1817249 Opened 3 years ago Closed 3 years ago

Geckoview crashing since 109.0.20230109161414

Categories

(GeckoView :: General, defect, P3)

Firefox 109
All
Android
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1812356

People

(Reporter: jw, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Steps to reproduce:

Our application works fine with org.mozilla.geckoview:geckoview:108.0.20230104165113. We have tried to move to a newer build (109 or 100). Both of these crash immediately.

For reference, the log below was taken using: org.mozilla.geckoview:geckoview:109.0.20230109161414

Actual results:

2023-02-16 16:18:56.898 1795-1940/uk.co.example.app D/GeckoViewStartup: observe: content-process-ready-for-script
2023-02-16 16:18:56.929 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoViewContent:ExitFullScreen","GeckoView:ClearMatches","GeckoView:DisplayMatches","GeckoView:FindInPage","GeckoView:RestoreState","GeckoView:ContainsFormData","GeckoView:ScrollBy","GeckoView:ScrollTo","GeckoView:SetActive","GeckoView:SetFocused","GeckoView:SetPriorityHint","GeckoView:UpdateInitData","GeckoView:ZoomToInput"]
2023-02-16 16:18:56.931 1596-1728/uk.co.example.app D/GeckoViewNavigation: onInit
2023-02-16 16:18:56.944 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoView:GoBack","GeckoView:GoForward","GeckoView:GotoHistoryIndex","GeckoView:LoadUri","GeckoView:Reload","GeckoView:Stop","GeckoView:PurgeHistory"]
2023-02-16 16:18:56.947 1596-1728/uk.co.example.app D/GeckoViewProcessHangMonitor: onInit
2023-02-16 16:18:56.947 1596-1728/uk.co.example.app D/GeckoViewProcessHangMonitor: onEnable
2023-02-16 16:18:56.950 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoView:HangReportStop","GeckoView:HangReportWait"]
2023-02-16 16:18:56.957 1596-1728/uk.co.example.app D/GeckoViewSettings: onInit
2023-02-16 16:18:56.958 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoView:GetUserAgent"]
2023-02-16 16:18:56.961 1596-1728/uk.co.example.app D/GeckoViewSettings: onSettingsUpdate: {"chromeUri":null,"screenId":0,"userAgentOverride":null,"allowJavascript":true,"userAgentMode":0,"viewportMode":0,"useTrackingProtection":false,"suspendMediaWhenInactive":false,"usePrivateMode":false,"unsafeSessionContextId":null,"displayMode":0,"sessionContextId":null,"fullAccessibilityTree":false,"isPopup":false}
2023-02-16 16:18:56.965 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoView:WebExtension:SetTabActive"]
2023-02-16 16:18:56.978 1596-1728/uk.co.example.app I/GeckoSession: zerdatime 3741740161 - chrome startup finished
2023-02-16 16:18:56.987 1795-1940/uk.co.example.app D/GeckoViewClipboardPermissionChild[C]: handleEvent: deactivate
2023-02-16 16:18:56.995 1795-1940/uk.co.example.app D/GeckoViewSettings[C]: receiveMessage: SettingsUpdate
2023-02-16 16:18:57.002 1596-1728/uk.co.example.app D/GeckoViewXUL: onEvent GeckoView:UpdateModuleState {"enabled":true,"module":"GeckoViewSelectionAction"}
2023-02-16 16:18:57.007 1596-1728/uk.co.example.app D/GeckoViewSelectionAction: onEnable
2023-02-16 16:18:57.008 1596-1728/uk.co.example.app D/GeckoViewModule: registerListener ["GeckoView:ExecuteSelectionAction"]
2023-02-16 16:18:57.010 1795-1940/uk.co.example.app W/GeckoEditableChild: No editable parent
2023-02-16 16:18:57.010 1596-1728/uk.co.example.app D/GeckoViewModule: dispatch GeckoView:SetActive, data={"active":true}
2023-02-16 16:18:57.011 1596-1728/uk.co.example.app D/GeckoViewContent: onEvent: event=GeckoView:SetActive, data={"active":true}
2023-02-16 16:18:57.018 1596-1728/uk.co.example.app D/GeckoViewClipboardPermissionParent: receiveMessage: DispatcherMessage
2023-02-16 16:18:57.020 1596-1728/uk.co.example.app D/GeckoViewXUL: receiveMessage GeckoView:ContentModuleLoaded {"module":"SessionStateAggregator"}
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: Setting timer a day from now
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: Register idle observer 0x71fd403a28 for 5 seconds
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: Register: adjusting next switch from -1 to 5 seconds
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: next timeout 5000 msec from now
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: SetTimerExpiryIfBefore: next timeout 5000 msec from now
2023-02-16 16:18:57.305 1596-1728/uk.co.example.app D/GeckoIdleService: reset timer expiry to 5010 msec from now
2023-02-16 16:18:57.320 1596-1728/uk.co.example.app D/GeckoViewStartup: observe: browser-idle-startup-tasks-finished
2023-02-16 16:18:57.586 1596-1728/uk.co.example.app D/GeckoViewModule: dispatch GeckoView:LoadUri, data={"uri":"resource://android/assets/index.html","flags":0,"headerFilter":1}
2023-02-16 16:18:57.587 1596-1728/uk.co.example.app D/GeckoViewNavigation: onEvent: event=GeckoView:LoadUri, data={"uri":"resource://android/assets/index.html","flags":0,"headerFilter":1}
2023-02-16 16:18:57.595 1596-1596/uk.co.example.app D/GeckoSession: handleMessage: GeckoView:DismissClipboardPermissionRequest
2023-02-16 16:18:57.597 3742-4996/? I/SurfaceFlinger: createSurf start. lock debugging [GeckoSurface]
2023-02-16 16:18:57.597 3742-4996/? I/SurfaceFlinger: id=5986 createSurf (0x0),2 flag=4, GeckoSurface#0
2023-02-16 16:18:57.629 1596-1728/uk.co.example.app I/Gecko: IPDL protocol error: nsDocShellLoadState URI changed while in content process
2023-02-16 16:18:57.630 1596-1728/uk.co.example.app A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 1728 (Gecko), pid 1596 (AndroidUI)
DEVICE | 0x73558e6100 | 0000 | RGBx_8888 | 0.0 0.0 1080.0 2031.0 | 0 63 1080 2094 | GeckoSurface#0

Expected results:

This happens every time at app start up, is repeatable, and also occurs with v110 builds. Has something changed between v108 and v109 that we need to be aware of and hence do we need to do something different in our app?

The severity field is not set for this bug.
:cpeterson, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)
Severity: -- → S2

Can you share an example app for this issue so we can look into this? On our apps, we are not seeing the same behavior.

Also, have you tried a newer version?

Flags: needinfo?(jw)

I've just tried 111.0.20230309232128 and it crashes in the same was as 109 and 110.

I'll have a go trimming back our app to make a test case. I was really after any pointers of areas to look at, as it seems fairly black and white that on v108 and older it's fine, but on v109 onwards I seem to get what looks like a segfault almost immediately.

For reference, I'm running on a Samsung A7/Android 10 and we'll try a range of other devices to see if it's device/Android-version specific.

Flags: needinfo?(jw)

Ah, ok... after some more testing (and stripping our app to basically match the example at https://firefox-source-docs.mozilla.org/mobile/android/geckoview/consumer/geckoview-quick-start.html), it seems that the crash is due to:

    ...
    session.loadUri("resource://android/assets/index.html");

If, instead, we do the following then the webpage loads just fine.
...
session.loadUri("about:buildconfig");

This also works:
...
session.loadUri("google.com");

For reference, when testing we has set index.html to contain nothing but the word "TEST", but we get the crash whatever the content (or if there is no content). If index.html doesn't exist (or we use URI like "resource://android/assets/blah.html" that doesn't exist), then we still get the crash.

So, I think the exception happens due to loading a resource within the Android app.

Has anything changed in this area between v108 and v109?

Is "resource://android/assets/index.html" the right URI to use to get data from the Android asset folder?

Priority: -- → P3
See Also: → 1812356
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Duplicate of bug: 1812356
Resolution: --- → DUPLICATE
Severity: S2 → S4
Flags: needinfo?(cpeterson)
See Also: 1812356
You need to log in before you can comment on or make changes to this bug.