Open Bug 1521744 Opened 6 years ago Updated 2 years ago

Crash in java.lang.IllegalStateException at org.mozilla.geckoview.GeckoRuntime.create

Categories

(GeckoView :: General, defect, P5)

65 Branch
Unspecified
Android
defect

Tracking

(firefox-esr60 wontfix, firefox65 affected, firefox66 affected, firefox67 affected)

Tracking Status
firefox-esr60 --- wontfix
firefox65 --- affected
firefox66 --- affected
firefox67 --- affected

People

(Reporter: colormatch, Unassigned)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

using GeckoView's arm library, I get crash-reports (from less than 1% of the users), which I can't reproduce.

GV used: geckoview-beta-armeabi-v7a/65.0.20190117232427/

Actual results:

crash-reports from users (through google play)

Caused by: java.lang.IllegalStateException:
at org.mozilla.geckoview.GeckoRuntime.create (GeckoRuntime.java:282)
at org.mozilla.geckoview.GeckoRuntime.create (GeckoRuntime.java:255)
at com.kinoseed.matchcolor.MainActivity.onCreate (MainActivity.java:322)

Expected results:

Finally, decided to simply catch all unhanded exceptions, and simply reboot the app, but even this did not help, as I still got crash-reports (see attached image)

note:
The "app restart" was tested and it is rebooting the app when there's unhanded exception, but after deploying, I still got crash-reports from users (through google play)... which I thought should not have even been possible at this point.

Emily said she will take a look. Do our GeckoView developer docs mention this exception?

P1 because this is affecting a third-party developer using GeckoView.

We might consider uplifting the the GeckoView 65 release branch so colormatch can pick up the fix soon:

https://hg.mozilla.org/releases/mozilla-release/shortlog/GECKOVIEW_65_RELBRANCH

Assignee: nobody → etoop
OS: All → Android
Priority: -- → P1

Please note that I haven't had this issue reported in a while.

I keep updating the app with the current beta releases, and even though other issues have came up (which I've reported separately), this bug hasn't been reported in 5-6 weeks.

Since this error, I had the following code added:

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(new Bundle());
}

@Override
public void onRestoreInstanceState(Bundle savedInstanceState, PersistableBundle persistentState) {
    super.onRestoreInstanceState(new Bundle(), new PersistableBundle());
}

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(new Bundle());
}

@Override
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
    super.onSaveInstanceState(new Bundle(), new PersistableBundle());
}

so I don't know if it's fixed in GV or that code fixed this particular issue.
(my app is handling state-recovery through localStorage vars)

Assignee: etoop → nobody

The error started surfacing again - past few weeks got a few more reports.
I'm currently using GV nightly 69 builds.

I'm editing a bunch of GeckoView bugs. If you'd like to filter all this bugmail, search and destroy emails containing this UUID:

e88a5094-0fc0-4b7c-b7c5-aef00a11dbc9

Priority: P1 → P2
Rank: 40
Attached file Crash report - 1
Removed the above mentioned "fix" with the nightly GV builds, and immediately got a couple of crash reports again.
Attached file Crash report - 2
Second crash report.

After reintroducing the "fix" mentioned above - forcing a "new Bundle()" onSave/onRestore, the problem is not reported anymore.

I'm surprised it doesn't come up in Fenix.

private fun setupGeckoView() {
val runtime = GeckoRuntime.create(this) // crashes on this line
geckoSession.open(runtime)
geckoView.setSession(geckoSession)
val url = String(Base64.decode(MYURL, Base64.DEFAULT))
geckoSession.loadUri(url)
geckoSession.progressDelegate = createProgressDelegate()
geckoSession.settings.allowJavascript = true
}

i call setUpGeckoView methon in onCreat() but when i click back and reopen the app then app crashes with IllegalStateException saying "Failed to initialize GeckoRuntime. It works first time only crashed when i click back and then open app again" https://www.krogereschedule.us/

Priority: P2 → P5

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
Rank: 40 → 555
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: