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

RESOLVED FIXED in Firefox 17

Status

()

Firefox for Android
Web Apps
P1
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Scoobidiver (away), Assigned: wesj)

Tracking

({crash})

Trunk
Firefox 18
ARM
Android
crash
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox17 fixed)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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
(Reporter)

Updated

5 years ago
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

Updated

5 years ago
Priority: -- → P1
Whiteboard: [native-crash] → [native-crash], [blocking-webrtandroid1+]
(Assignee)

Comment 2

5 years ago
Created attachment 663175 [details] [diff] [review]
Patch

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+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e42062ef7433
(Assignee)

Comment 5

5 years ago
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
Last Resolved: 5 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+
(Reporter)

Updated

5 years ago
Duplicate of this bug: 798231
(Reporter)

Updated

5 years ago
status-firefox17: --- → affected
https://hg.mozilla.org/releases/mozilla-aurora/rev/a02bb6f11014
status-firefox17: affected → fixed
You need to log in before you can comment on or make changes to this bug.