Closed Bug 786826 Opened 12 years ago Closed 12 years ago

java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex(WebAppAllocator.java) on Froyo

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)

ARM
Android
defect

Tracking

(firefox17 fixed)

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- fixed

People

(Reporter: scoobidiver, Assigned: wesj)

References

Details

(Keywords: crash, Whiteboard: [native-crash], [blocking-webrtandroid1+])

Crash Data

Attachments

(1 file)

There's one crash in 18.0a1/20120829: bp-95773075-1ddc-4b10-b7a2-f0de92120829.

java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply
	at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex(WebAppAllocator.java:59)
	at org.mozilla.gecko.GeckoAppShell.getWebAppIntent(GeckoAppShell.java:816)
	at org.mozilla.gecko.GeckoAppShell$4.run(GeckoAppShell.java:866)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:123)
	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NoSuchMethodError%3A+android.content.SharedPreferences%24Editor.apply+at+org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex%28WebAppAllocator.java%29
SharedPreferences.Editor.apply() is only available in API Level >= 9 (GB). This crash was on Froyo, which we still support.

https://developer.android.com/reference/android/content/SharedPreferences.Editor.html#apply%28%29
Summary: java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex(WebAppAllocator.java) → java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex(WebAppAllocator.java) on Froyo
Priority: -- → P1
Whiteboard: [native-crash] → [native-crash], [blocking-webrtandroid1+]
Attached patch PatchSplinter Review
This uses commit here like we do most other places. We didn't care before when  apply finished, so I think we're fine not caring here either.
Assignee: nobody → wjohnston
Attachment #663175 - Flags: review?(mark.finkle)
Comment on attachment 663175 [details] [diff] [review]
Patch

Looks like this should be OK. The index (i) is returned and won't be given out for any other webapp until it's uninstalled. That should not happen before the background thread is finished.
Attachment #663175 - Flags: review?(mark.finkle) → review+
Comment on attachment 663175 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Since webapps began
User impact if declined: Crashes on Eclair
Testing completed (on m-c, etc.): Landed on mc today
Risk to taking this patch (and alternatives if risky): Fairly low risk. Android webapp only. Should have the same behavior as before, just not using a fancy new API.
String or UUID changes made by this patch: None.
Attachment #663175 - Flags: approval-mozilla-aurora?
Comment on attachment 663175 [details] [diff] [review]
Patch

This doesn't meet the crash criteria we normally have for uplifting, it's not clear that this is going to be a release issue and we're not tracking, so it can ride the trains.
Attachment #663175 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Comment on attachment 663175 [details] [diff] [review]
Patch

Sorry, but I don't agree. We marked this as high priority for a reason in triage. It has low crash volume because the path to webapps and marketing of it on Aurora and Nightly channels is incredibly low, so we likely aren't going to see activity on crash stats for webapps. So we're relying on interference here that this *could* be a problem down the line on a higher ADU rate due to the following rationale - It's highly likely a user will experience this crash using web apps on an Android 2.2 device.
Attachment #663175 - Flags: approval-mozilla-aurora- → approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/e42062ef7433
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
(In reply to Jason Smith [:jsmith] from comment #7)

> It's highly likely a user will experience this crash using
> web apps on an Android 2.2 device.

s/highly likely/100% likely
Comment on attachment 663175 [details] [diff] [review]
Patch

Thanks for the additional information, in light of that we have no problem approving this for Aurora.
Attachment #663175 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
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: