Closed Bug 1015209 Opened 10 years ago Closed 10 years ago

crash in java.lang.NoSuchMethodError: android.app.FragmentTransaction.detach at org.mozilla.gecko.preferences.GeckoPreferences.onLocaleChanged(GeckoPreferences.java) on API 11 and 12 with locale switching enabled

Categories

(Firefox for Android Graveyard :: Locale switching and selection, defect)

All
Android
defect
Not set
critical

Tracking

(firefox31 unaffected, firefox32 disabled, firefox33 disabled, fennec34+)

RESOLVED WONTFIX
Tracking Status
firefox31 --- unaffected
firefox32 --- disabled
firefox33 --- disabled
fennec 34+ ---

People

(Reporter: aaronmt, Assigned: rnewman)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-5fed8048-cc22-4080-a73e-6d3912140522.
=============================================================

java.lang.NoSuchMethodError: android.app.FragmentTransaction.detach
	at org.mozilla.gecko.preferences.GeckoPreferences.onLocaleChanged(GeckoPreferences.java:212)
	at org.mozilla.gecko.preferences.GeckoPreferences.access$000(GeckoPreferences.java:74)
	at org.mozilla.gecko.preferences.GeckoPreferences$6$1.run(GeckoPreferences.java:860)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:152)
	at android.app.ActivityThread.main(ActivityThread.java:4606)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:491)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
	at dalvik.system.NativeStart.main(Native Method)
6 crashes from a HTC PG09410 (http://www.att.com/esupport/article.jsp?sid=KB410365&cv=820#fbid=Mf9XWeOQjwO) Honeycomb (3.1) device. 

detach() added in API Level 13 (3.2)
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
tracking-fennec: ? → 32+
I suspect we can simply switch from detach() to remove(), but needs testing.
This uses replace instead. Tested on a KitKat tablet; we should probably verify on a phone, too.
Attachment #8430353 - Flags: review?(nalexander)
Hmm, I get a failure to even select Language at all:

E GeckoAppShell(13655)        >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
E GeckoAppShell(13655)        java.lang.IllegalStateException: Fragment already added: GeckoPreferenceFragment{4097a0a0 #1 id=0x10202c8}
E GeckoAppShell(13655)        	at android.app.BackStackRecord.doAddOp(BackStackRecord.java:339)
E GeckoAppShell(13655)        	at android.app.BackStackRecord.replace(BackStackRecord.java:377)
E GeckoAppShell(13655)        	at android.app.BackStackRecord.replace(BackStackRecord.java:369)
E GeckoAppShell(13655)        	at org.mozilla.gecko.preferences.GeckoPreferences.onLocaleChanged(GeckoPreferences.java:219)
E GeckoAppShell(13655)        	at org.mozilla.gecko.preferences.GeckoPreferences.access$0(GeckoPreferences.java:201)
E GeckoAppShell(13655)        	at org.mozilla.gecko.preferences.GeckoPreferences$6$1.run(GeckoPreferences.java:864)
E GeckoAppShell(13655)        	at android.os.Handler.handleCallback(Handler.java:587)
E GeckoAppShell(13655)        	at android.os.Handler.dispatchMessage(Handler.java:92)
E GeckoAppShell(13655)        	at android.os.Looper.loop(Looper.java:132)
E GeckoAppShell(13655)        	at android.app.ActivityThread.main(ActivityThread.java:4126)
E GeckoAppShell(13655)        	at java.lang.reflect.Method.invokeNative(Native Method)
E GeckoAppShell(13655)        	at java.lang.reflect.Method.invoke(Method.java:491)
E GeckoAppShell(13655)        	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
E GeckoAppShell(13655)        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
E GeckoAppShell(13655)        	at dalvik.system.NativeStart.main(Native Method)
E Gecko(13655)                mozalloc_abort: Redirecting call to abort() to mozalloc_abort
E GeckoConsole(13655)         Switching to system locale.
(In reply to Nick Alexander :nalexander from comment #4)
> Hmm, I get a failure to even select Language at all:
> 
> E GeckoAppShell(13655)        >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1
> ("main")
> E GeckoAppShell(13655)        java.lang.IllegalStateException: Fragment
> already added: GeckoPreferenceFragment{4097a0a0 #1 id=0x10202c8}

Oh, Android.
Comment on attachment 8430353 [details] [diff] [review]
Don't use FragmentTransaction.detach. v1

Review of attachment 8430353 [details] [diff] [review]:
-----------------------------------------------------------------

Unfortunately, this is crashy on v13, at least.
Attachment #8430353 - Flags: review?(nalexander) → review-
I discovered that my TF101 upgraded itself to Android 4.0, and the emulator doesn't cooperate for pre-KitKat, so I can't iterate on this just yet.

snorp is kindly sending me his Honeycomb tablet so I can try to break things in real time.
Bug 1019981 disables locale switching for all three of our remaining Honeycomb users.

I'll pick this bug up again when I have an old tablet in front of me, see if I can get a solution that lets us turn it back on.
Depends on: 1019981
After Bug 1019981 this should no longer be occurring, so marking this as disabled and pushing the tracking flag back.

Fixing this is waiting on snorp to send me an old Transformer.
tracking-fennec: 32+ → 33+
Summary: crash in java.lang.NoSuchMethodError: android.app.FragmentTransaction.detach at org.mozilla.gecko.preferences.GeckoPreferences.onLocaleChanged(GeckoPreferences.java) → crash in java.lang.NoSuchMethodError: android.app.FragmentTransaction.detach at org.mozilla.gecko.preferences.GeckoPreferences.onLocaleChanged(GeckoPreferences.java) on API 11 and 12 with locale switching enabled
Version: Firefox 32 → Trunk
tracking-fennec: 33+ → 34+
Maybe we should close this bug?
If we don't have an appropriate device for me to test on, and don't have many users on affected API versions, then fine by me!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
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: