Crash in android.util.AndroidRuntimeException: at android.app.ContextImpl.startActivity(ContextImpl.java)
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox65 wontfix, firefox66 wontfix, firefox67 wontfix, firefox68+ verified, firefox69 verified)
People
(Reporter: jseward, Assigned: brad.arant)
Details
(Keywords: crash, reproducible)
Crash Data
Attachments
(2 files)
2.58 MB,
text/plain
|
Details | |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
This bug is for crash report bp-d8b204dc-01f0-4d00-aa9f-b1d460190201.
This happened for 3 different installations in the Android nightly
20190131093752.
Java stack trace:
android.util.AndroidRuntimeException
at android.app.ContextImpl.startActivity(ContextImpl.java:915)
at android.app.ContextImpl.startActivity(ContextImpl.java:891)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:379)
at org.mozilla.gecko.BrowserApp.onPictureInPictureModeChanged(BrowserApp.java:1079)
at android.app.Activity.dispatchPictureInPictureModeChanged(Activity.java:7446)
at android.app.ActivityThread.handlePictureInPictureModeChanged(ActivityThread.java:3408)
at android.app.servertransaction.PipModeChangeItem.execute(PipModeChangeItem.java:40)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
I see crash reports with this signature from ARM64 builds of Fennec 67 Nightly, but not from ARMv7 builds.
Comment 2•6 years ago
|
||
Interesting. The only thing that immediately comes to mind for an AndroidRuntimeException on a startActivity() call is calling it from a non-activity context, but I can't imagine why it would be ARM64-specific in that case.
Comment 3•6 years ago
|
||
This crash is pretty low volume across all branches. Marking as a P3 for now.
Comment 4•6 years ago
|
||
Here is a pretty long comment that someone left:
In Firefox Nightly ran in the background of the TV Phoenix livestream. Another app asked if a link should be opened and with which browser. I chose Nightly to see if it's possible to open a second Nightly window next to the livestream running in the background. Then came the crash. As long as that is not fixed, I will then use the Chrome browser for it, although I like Firefox better.
During triage we also talked about the fact there is stuff related to Picture in Picture mode in the stack - org.mozilla.gecko.BrowserApp.onPictureInPictureModeChanged(BrowserApp.java:1079). All the URLs are youtube related.
Comment 5•6 years ago
|
||
This is #7 overall on Fennec Nightly 67.
Comment 6•6 years ago
|
||
@Sorina can we do some testing around picture in picture mode?
Comment 7•6 years ago
|
||
(In reply to Marcia Knous [:marcia - needinfo? me] from comment #6)
@Sorina can we do some testing around picture in picture mode?
Sure. I'll needinfo Andrei and Mira to investigate this tomorrow.
Comment 8•6 years ago
•
|
||
Hi all,
I have managed to reproduce the issue, using these STR:
- Go to Settings -> General and enable Custom Tabs.
- Go to YouTube and enter fullscreen.
- While watching a video in full-screen mode, press the home button.
- Go to Gmail app and long-tap a link and choose to open with Nightly - Nightly crashes.
Device: OnePlus 5T (Android 9)
I`ve attached a logcat.
Thanks,
Note: I cannot reproduce this crash on Beta 66.0b9, RC 65.0.1.
Comment 9•6 years ago
|
||
Adding 68 as affected. This is the #4 overall crash on nightly.
Comment 10•6 years ago
|
||
[Tracking Requested - why for this release]: Very high crash volume on nightly.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 11•6 years ago
|
||
I am unable to recreate the issue on a Samsung Note 8 running Android 9.
Comment 12•6 years ago
|
||
Exception message is "Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?"
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
|
||
Placed a testing APK into the testing Skype group. Awaiting responses.
Assignee | ||
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
Indicated that changing context to Activity context has indeed resolved the problem in initial APK testing. Submitting for final approval.
Assignee | ||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8194de6da1c7
StartActivity must be called from Activity context and not Application context.;r=VladBaicu
Comment 17•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Comment 18•6 years ago
•
|
||
Brad, can you please request uplift of your crash fix to Fennec 68 Beta? We'll be supporting Fennec 68 in ESR until mid-2020 so it would be nice to have your fix.
Assignee | ||
Comment 19•6 years ago
|
||
Comment on attachment 9067360 [details]
Bug 1524868 - StartActivity must be called from Activity context and not Application context.;r?VladBaicu
Beta/Release Uplift Approval Request
- User impact if declined: Bug continues relating to negative user experience.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Go to Settings -> General and enable Custom Tabs.
Go to YouTube and enter fullscreen.
While watching a video in full-screen mode, press the home button.
Go to Gmail app and long-tap a link and choose to open with Nightly - Nightly crashes. - List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Single line change to resolve well known android pitfall.
- String changes made/needed: -
Assignee | ||
Updated•6 years ago
|
Comment 20•6 years ago
|
||
Comment on attachment 9067360 [details]
Bug 1524868 - StartActivity must be called from Activity context and not Application context.;r?VladBaicu
fennec crash fix, approved for 68.0b9
Comment 21•6 years ago
|
||
bugherder uplift |
Comment 22•6 years ago
•
|
||
Verified as fixed on Nightly 68.0a1 (2019-06-05) using Samsung Galaxy S8 (Android 9) and Motorola Moto G6 (Android 8). I'll let the qe-verify + till the verification on Beta, thanks.
Comment 23•6 years ago
|
||
Verified as fixed on Nightly 69.0a1 (2019-06-10) and Beta 68.0b9 with Nexus 6P (Android 8.1.0), Samsung Galaxy S8 (Android 9).
Due to my findings, I'll mark this issue as verified on Firefox 68 and 69. Thanks.
Updated•6 years ago
|
Updated•4 years ago
|
Description
•