Last Comment Bug 786826 - java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at org.mozilla.gecko.WebAppAllocator.findAndAllocateIndex( on Froyo
: java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply a...
[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]
: 798231 (view as bug list)
Depends on:
  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: ---

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 User image 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(
	at org.mozilla.gecko.GeckoAppShell.getWebAppIntent(
	at org.mozilla.gecko.GeckoAppShell$
	at android.os.Handler.handleCallback(
	at android.os.Handler.dispatchMessage(
	at android.os.Looper.loop(

More reports at:
Comment 1 User image 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.
Comment 2 User image Wesley Johnston (:wesj) 2012-09-20 14:52:06 PDT
Created attachment 663175 [details] [diff] [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.
Comment 3 User image Mark Finkle (:mfinkle) (use needinfo?) 2012-09-20 19:35:11 PDT
Comment on attachment 663175 [details] [diff] [review]

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 User image Wesley Johnston (:wesj) 2012-09-24 08:59:49 PDT
Comment on attachment 663175 [details] [diff] [review]

[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 User image Lukas Blakk [:lsblakk] use ?needinfo 2012-09-24 16:08:12 PDT
Comment on attachment 663175 [details] [diff] [review]

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 User image Jason Smith [:jsmith] 2012-09-24 16:14:08 PDT
Comment on attachment 663175 [details] [diff] [review]

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 User image Ryan VanderMeulen [:RyanVM] 2012-09-24 17:55:52 PDT
Comment 9 User image 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 User image Lukas Blakk [:lsblakk] use ?needinfo 2012-09-26 15:19:55 PDT
Comment on attachment 663175 [details] [diff] [review]

Thanks for the additional information, in light of that we have no problem approving this for Aurora.
Comment 11 User image Scoobidiver (away) 2012-10-05 02:51:12 PDT
*** Bug 798231 has been marked as a duplicate of this bug. ***
Comment 12 User image Justin Wood (:Callek) [away until Feb 27] 2012-10-07 23:59:56 PDT

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