Last Comment Bug 786826 - java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex(WebAppAllocator.java) on Froyo
: java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply a...
Status: RESOLVED FIXED
[native-crash], [blocking-webrtandroi...
: crash
Product: Firefox for Android
Classification: Client Software
Component: Web Apps (show other bugs)
: Trunk
: ARM Android
: P1 critical (vote)
: Firefox 18
Assigned To: Wesley Johnston (:wesj)
: Aaron Train [:aaronmt]
: Myk Melez [:myk] [@mykmelez]
Mentors:
: 798231 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-29 14:22 PDT by Scoobidiver (away)
Modified: 2012-10-07 23:59 PDT (History)
5 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Patch (2.77 KB, patch)
2012-09-20 14:52 PDT, Wesley Johnston (:wesj)
mark.finkle: review+
lukasblakk+bugs: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Scoobidiver (away) 2012-08-29 14:22:48 PDT
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
Comment 1 Chris Peterson [:cpeterson] 2012-08-29 14:43:23 PDT
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
Comment 2 Wesley Johnston (:wesj) 2012-09-20 14:52:06 PDT
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.
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2012-09-20 19:35:11 PDT
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.
Comment 5 Wesley Johnston (:wesj) 2012-09-24 08:59:49 PDT
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.
Comment 6 Lukas Blakk [:lsblakk] use ?needinfo 2012-09-24 16:08:12 PDT
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.
Comment 7 Jason Smith [:jsmith] 2012-09-24 16:14:08 PDT
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.
Comment 8 Ryan VanderMeulen [:RyanVM] 2012-09-24 17:55:52 PDT
https://hg.mozilla.org/mozilla-central/rev/e42062ef7433
Comment 9 Mark Finkle (:mfinkle) (use needinfo?) 2012-09-24 18:25:58 PDT
(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 10 Lukas Blakk [:lsblakk] use ?needinfo 2012-09-26 15:19:55 PDT
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.
Comment 11 Scoobidiver (away) 2012-10-05 02:51:12 PDT
*** Bug 798231 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.