Closed Bug 1551614 Opened 5 years ago Closed 5 years ago

Crash in [@ android.util.SuperNotCalledException: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)]

Categories

(Firefox for Android Graveyard :: General, defect, P1)

Unspecified
Android
defect

Tracking

(firefox-esr6869+ verified, firefox67 unaffected, firefox68 wontfix, firefox69 verified)

VERIFIED FIXED
Firefox 69
Tracking Status
firefox-esr68 69+ verified
firefox67 --- unaffected
firefox68 --- wontfix
firefox69 --- verified

People

(Reporter: marcia, Assigned: petru)

Details

(Keywords: crash, Whiteboard: [fennec68.1])

Crash Data

Attachments

(2 files)

This bug is for crash report bp-4da82ca1-50e3-4091-809f-fffe80190511.

New nightly crash which appears to have started in 20190509033505: https://bit.ly/2W1cgFn

Possible regression range based on Build ID: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=65a693623cee0837b4ad0d23241c84cd3ea23e3a&tochange=34a824c75b7b5618a06ba8987c418d6363da5038

One comment "Nightly crashes upon switching user in Android Pie"

Java stack trace:

android.util.SuperNotCalledException
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2935)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:4823)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4732)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:55)
	at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:4782)
	at android.app.ActivityThread.access$3200(ActivityThread.java:200)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1826)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

exception message is "Activity {org.mozilla.fennec_aurora/org.mozilla.gecko.BrowserApp} did not call through to super.onCreate()"

Petru or Andrei - Any idea what might be going on here? Thanks.

Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)
Assignee: nobody → andrei.a.lazar
Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)

I had a hard time trying to reproduce this, please NI me when we have some STR.

Assignee: andrei.a.lazar → nobody

Check the context, if not from activity...

Perhaps similar? https://bugzilla.mozilla.org/show_bug.cgi?id=1524868

Priority: -- → P1

Not much to go in in terms of comments. One URL:

*https://www.bbc.co.uk/news/topics/c7zzdg3pmgpt/european-elections-2019

Top crashing device is huawei CLT-L29.

(100.0% in signature vs 29.45% overall) Module "startupCache.8.little" = true
(90.91% in signature vs 17.42% overall) Module "libclang_rt.ubsan_standalone-aarch64-android.so" = true
(90.91% in signature vs 23.29% overall) Module "dalvik-large object free list space allocation info map (deleted)" = true
(90.91% in signature vs 23.29% overall) Module "dalvik-free list large object space (deleted)" = true
(90.91% in signature vs 23.58% overall) Module "libvixl-arm64.so" = true
(81.82% in signature vs 10.59% overall) Module "dalvik-Sentinel fault page (deleted)" = true
(81.82% in signature vs 16.55% overall) Module "system@framework@boot-WfdCommon.art" = true
(81.82% in signature vs 16.65% overall) Module "boot-WfdCommon.oat" = true
(72.73% in signature vs 12.90% overall) Module "boot-WfdCommon.vdex" = true
(63.64% in signature vs 11.65% overall) Module "uBlock0@raymondhill.net.xpi" = true
(54.55% in signature vs 07.41% overall) Module "com.qualcomm.qti.camera.jar" = true
(45.45% in signature vs 01.73% overall) Addon "jid1-BoFifL9Vbdl2zQ@jetpack" = true
(45.45% in signature vs 03.75% overall) adapter_device_id = Adreno (TM) 540 [55.56% vs 07.93% if adapter_vendor_id = Qualcomm]
(45.45% in signature vs 03.08% overall) Addon "https-everywhere@eff.org" = true
(45.45% in signature vs 03.75% overall) Module "gralloc.msm8998.so" = true
(45.45% in signature vs 05.49% overall) Module "qcom.fmradio.jar" = true
(45.45% in signature vs 05.58% overall) Addon "uBlock0@raymondhill.net" Version = 1.19.6

I'm seeing this when changing input language from system settings while having "Don't keep activities checked"

Happens because BrowserLocaleManager.getInstance().systemLocaleDidChange() (line 1023)
calls Activity#finish() and returns before actually calling super.onCreate(..) (line 1088).

The code is very convoluted though and does not seem as an easy fix.

Fix for the following scenario:

  • "Don't keep activities" checked
  • Change system language

Upon detecting a locale change in BrowserApp's onCreate() we would call
finish() and then return before calling super.onCreate().

This patch introdues the call to super.onCreate() before returning and ensures
that the app will die cleanly so that upon restarting Gecko can reinit add-ons
that touch the UI.

Our Restarter Service would have issues on Android Q:
It would run on a separate process that allowed it to kill the app's process
but when trying to restart the app it would fail because it would've been a
background Service and as such it would've been restricted from starting other
Android Application components.

To make it work on Android Q we would need to migrate it to a foreground
service or piggy-back the SYSTEM_ALERT_WINDOW permission given by the user for
the Tab Queue functionality.

The chosen solution is simpler and not affected by any of those limitations.

Depends on D35402

Assignee: nobody → petru.lingurar
Status: NEW → ASSIGNED
Keywords: regression
Keywords: checkin-needed

Pushed by aiakab@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab1822f92ad7
Call BrowserApp's onCreate() before finish(); r=VladBaicu
https://hg.mozilla.org/integration/autoland/rev/390ec5bd9da7
Simpler way of restarting our app in a new process; r=VladBaicu

Keywords: checkin-needed

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=390ec5bd9da78514854ce82c041077d12ddef80a&tochange=b46da4b8000e5cb1ae7e8af6563ed62bcf6b31b0&selectedJob=252661962&searchStr=android%2C4.0%2Capi16%2B%2Copt%2Candroid%2Cgradle%2Ctests%2Cbuild-android-checkstyle%2Fopt%2Ca%28checkstyle%29

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=252661962&repo=autoland&lineNumber=2971

Backout link: https://hg.mozilla.org/integration/autoland/rev/b46da4b8000e5cb1ae7e8af6563ed62bcf6b31b0

[task 2019-06-20T18:38:21.790Z] 18:38:21 INFO - SUITE-START | android-checkstyle
[task 2019-06-20T18:38:21.891Z] 18:38:21 INFO - TinderboxPrint: report<br/><a href="https://queue.taskcluster.net/v1/task/LbXl08gaQ-eOgXNcegDotA/runs/0/artifacts/public/android/checkstyle">HTML checkstyle report</a>, visit "Inspect Task" link for details
[task 2019-06-20T18:38:21.891Z] 18:38:21 INFO - TinderboxPrint: report<br/><a href="https://queue.taskcluster.net/v1/task/LbXl08gaQ-eOgXNcegDotA/runs/0/artifacts/public/android/checkstyle">XML checkstyle report</a>, visit "Inspect Task" link for details
[task 2019-06-20T18:38:21.892Z] 18:38:21 INFO - TEST-UNEXPECTED-FAIL | android-checkstyle | Checkstyle rule violations were found. See the report at: https://queue.taskcluster.net/v1/task/LbXl08gaQ-eOgXNcegDotA/runs/0/artifacts/public/android/checkstyle
[task 2019-06-20T18:38:21.892Z] 18:38:21 INFO - TEST-UNEXPECTED-FAIL | /builds/worker/workspace/build/src/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
[task 2019-06-20T18:38:21.892Z] 18:38:21 INFO - TEST-UNEXPECTED-FAIL | <error line="2128" message="Trailing whitespace" severity="error" source="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineCheck" />
[task 2019-06-20T18:38:21.894Z] 18:38:21 INFO - SUITE-END | android-checkstyle
[task 2019-06-20T18:38:21.912Z] 18:38:21 ERROR - Return code: 1
[task 2019-06-20T18:38:21.912Z] 18:38:21 ERROR - 1 not in success codes: [0]

Flags: needinfo?(petru.lingurar)

Thanks Cosmin!
Resolved the issue and updated the original patch.
Let's try again.

Flags: needinfo?(petru.lingurar)
Keywords: checkin-needed

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/819d3061b8fb
Call BrowserApp's onCreate() before finish(); r=VladBaicu
https://hg.mozilla.org/integration/autoland/rev/0e1180cd2a89
Simpler way of restarting our app in a new process; r=VladBaicu

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69

[Tracking Requested - why for this release]:

We will want to uplift this Fennec crash fix to the ESR 68 branch for the Fennec 68.1 release.

Please request esr68 uplift when you get a chance.

Flags: needinfo?(petru.lingurar)
Flags: needinfo?(petru.lingurar) → qe-verify+

Hello, I tested this issue on the Nightly 69.0a1 (https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&selectedJob=253503170&searchStr=android&revision=b20b355373b444b5a9a303777631f99141149a2b) from the Treeherder and I can confirm that this issue is not anymore reproducible using Samsung Galaxy Note 8 (Android 9) and Google Pixel (Android Q).

Flags: qe-verify+

Comment on attachment 9072963 [details]
Bug 1551614 - Call BrowserApp's onCreate() before finish(); r?VladBaicu

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Crash fix.
  • User impact if declined: Crash when changing system language if "Don't keep activities is checked"
  • Fix Landed on Version: 69
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small changes, verified by QA
  • String or UUID changes made by this patch:
Attachment #9072963 - Flags: approval-mozilla-esr68?

Comment on attachment 9072963 [details]
Bug 1551614 - Call BrowserApp's onCreate() before finish(); r?VladBaicu

Fixes a crash. Approved for Fennec 68.1b1.

Attachment #9072963 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Hello, I tested this issue using the latest version of Beta 68.1b1 build 3 from the archive and I can confirm that the issue is fixed.
Devices:

  • Xiaomi Mi 8 Lite (Android 9);
  • Google Pixel (Android Q).

Due to that, I'll close this ticket as verified, thanks.

Status: RESOLVED → VERIFIED

Just removing the qe-verify flag due to comment 20, thanks.

Flags: qe-verify+
Whiteboard: [fennec68.1]
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: