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

RESOLVED WONTFIX

Status

()

Firefox for Android
Locale switching and selection
--
critical
RESOLVED WONTFIX
3 years ago
3 years ago

People

(Reporter: aaronmt, Assigned: rnewman)

Tracking

({crash})

Trunk
All
Android
crash
Points:
---
Dependency tree / graph

Firefox Tracking Flags

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

Details

(crash signature)

Attachments

(1 attachment)

(Reporter)

Description

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

Comment 1

3 years ago
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)

Updated

3 years ago
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
tracking-fennec: ? → 32+
(Assignee)

Comment 2

3 years ago
I suspect we can simply switch from detach() to remove(), but needs testing.
(Assignee)

Comment 3

3 years ago
Created attachment 8430353 [details] [diff] [review]
Don't use FragmentTransaction.detach. v1

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

Comment 5

3 years ago
(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-
(Assignee)

Comment 7

3 years ago
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.
(Assignee)

Comment 8

3 years ago
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
(Assignee)

Comment 9

3 years ago
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+
status-firefox32: affected → disabled
status-firefox33: --- → disabled
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?
(Assignee)

Comment 11

3 years ago
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!
(Assignee)

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.