Closed Bug 992938 Opened 11 years ago Closed 4 years ago

Opening settings crashes Fennec if built with target API < 19

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mhaigh, Unassigned)

References

Details

Opening the settings menu option crashes Fennec with the following error message: /GeckoHealthRec( 8319): Recording session end: P V/GeckoHealthRec( 8319): Recorded session entry for env 6, current is 6 D/GeckoSessInfo( 8319): Recording session done: 1396881756748 D/AndroidRuntime( 8319): Shutting down VM W/dalvikvm( 8319): threadid=1: thread exiting with uncaught exception (group=0x41565c50) E/GeckoAppShell( 8319): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main") E/GeckoAppShell( 8319): java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid! org.mozilla.gecko.preferences.GeckoPreferences has not checked if fragment org.mozilla.gecko.preferences.GeckoPreferenceFragment is valid. E/GeckoAppShell( 8319): at android.preference.PreferenceActivity.isValidFragment(PreferenceActivity.java:921) E/GeckoAppShell( 8319): at android.preference.PreferenceActivity.switchToHeaderInner(PreferenceActivity.java:1228) E/GeckoAppShell( 8319): at android.preference.PreferenceActivity.switchToHeader(PreferenceActivity.java:1248) E/GeckoAppShell( 8319): at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:582) E/GeckoAppShell( 8319): at org.mozilla.gecko.preferences.GeckoPreferences.onCreate(GeckoPreferences.java:116) E/GeckoAppShell( 8319): at android.app.Activity.performCreate(Activity.java:5243) E/GeckoAppShell( 8319): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/GeckoAppShell( 8319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150) E/GeckoAppShell( 8319): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2246) E/GeckoAppShell( 8319): at android.app.ActivityThread.access$700(ActivityThread.java:145) E/GeckoAppShell( 8319): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1407) E/GeckoAppShell( 8319): at android.os.Handler.dispatchMessage(Handler.java:102) E/GeckoAppShell( 8319): at android.os.Looper.loop(Looper.java:137) E/GeckoAppShell( 8319): at android.app.ActivityThread.main(ActivityThread.java:5062) E/GeckoAppShell( 8319): at java.lang.reflect.Method.invokeNative(Native Method) E/GeckoAppShell( 8319): at java.lang.reflect.Method.invoke(Method.java:515) E/GeckoAppShell( 8319): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/GeckoAppShell( 8319): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/GeckoAppShell( 8319): at dalvik.system.NativeStart.main(Native Method) E/Gecko ( 8319): mozalloc_abort: Redirecting call to abort() to mozalloc_abort F/MOZ_CRASH( 8319): Hit MOZ_CRASH() at /Users/martyn/Mozilla/git-master/memory/mozalloc/mozalloc_abort.cpp:30 F/libc ( 8319): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 8319 (a.fennec_martyn) I/ActivityManager( 493): Process org.mozilla.fennec_martyn (pid 8319) has died. I/WindowState( 493): WIN DEATH: Window{41a9b2c8 u0 org.mozilla.fennec_martyn/org.mozilla.fennec_martyn.App} W/ActivityManager( 493): Force removing ActivityRecord{419d2608 u0 org.mozilla.fennec_martyn/.App t66}: app died, no saved state I/WindowState( 493): WIN DEATH: Window{41ac92f0 u0 SurfaceView} D/dalvikvm( 8418): Late-enabling CheckJNI I/ActivityManager( 493): Start proc org.mozilla.fennec_martyn for activity org.mozilla.fennec_martyn/org.mozilla.gecko.preferences.GeckoPreferences: pid=8418 uid=10101 gids={50101, 3003, 1028, 1015, 1006} I/DEBUG ( 6681): unexpected waitpid response: n=8319, status=00000b00 I/DEBUG ( 6681): ptrace detach from 8319 failed: No such process I/DEBUG ( 6681): debuggerd committing suicide to free the zombie! D/Zygote ( 127): Process 8319 exited cleanly (11) I/DEBUG ( 8427): debuggerd: Dec 5 2013 16:04:16 D/dalvikvm( 8418): Trying to load lib /data/app-lib/org.mozilla.fennec_martyn-2/libmozglue.so 0x41821588 D/dalvikvm( 8418): Added shared lib /data/app-lib/org.mozilla.fennec_martyn-2/libmozglue.so 0x41821588 D/dalvikvm( 8418): No JNI_OnLoad found in /data/app-lib/org.mozilla.fennec_martyn-2/libmozglue.so 0x41821588, skipping init D/AndroidRuntime( 8418): Shutting down VM W/dalvikvm( 8418): threadid=1: thread exiting with uncaught exception (group=0x41565c50) E/AndroidRuntime( 8418): FATAL EXCEPTION: main E/AndroidRuntime( 8418): Process: org.mozilla.fennec_martyn, PID: 8418 E/AndroidRuntime( 8418): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.mozilla.fennec_martyn/org.mozilla.gecko.preferences.GeckoPreferences}: java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid! org.mozilla.gecko.preferences.GeckoPreferences has not checked if fragment org.mozilla.gecko.preferences.GeckoPreferenceFragment is valid. E/AndroidRuntime( 8418): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2196) E/AndroidRuntime( 8418): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2246) E/AndroidRuntime( 8418): at android.app.ActivityThread.access$700(ActivityThread.java:145) E/AndroidRuntime( 8418): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1407) E/AndroidRuntime( 8418): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 8418): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 8418): at android.app.ActivityThread.main(ActivityThread.java:5062) E/AndroidRuntime( 8418): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 8418): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 8418): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 8418): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 8418): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 8418): Caused by: java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid! org.mozilla.gecko.preferences.GeckoPreferences has not checked if fragment org.mozilla.gecko.preferences.GeckoPreferenceFragment is valid. E/AndroidRuntime( 8418): at android.preference.PreferenceActivity.isValidFragment(PreferenceActivity.java:921) E/AndroidRuntime( 8418): at android.preference.PreferenceActivity.switchToHeaderInner(PreferenceActivity.java:1228) E/AndroidRuntime( 8418): at android.preference.PreferenceActivity.switchToHeader(PreferenceActivity.java:1248) E/AndroidRuntime( 8418): at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:582) E/AndroidRuntime( 8418): at org.mozilla.gecko.preferences.GeckoPreferences.onCreate(GeckoPreferences.java:116) E/AndroidRuntime( 8418): at android.app.Activity.performCreate(Activity.java:5243) E/AndroidRuntime( 8418): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/AndroidRuntime( 8418): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150) E/AndroidRuntime( 8418): ... 11 more W/ActivityManager( 493): Force finishing activity org.mozilla.fennec_martyn/org.mozilla.gecko.preferences.GeckoPreferences
Did you change the SDK target to 19 in your build? This requirement was apparently added in KitKat: http://developer.android.com/reference/android/preference/PreferenceActivity.html#isValidFragment%28java.lang.String%29
Confusingly this was working before the weekend! In my .mozconfig I have: ac_add_options --with-android-sdk="$HOME/android-sdk-macosx/platforms/android-19" ac_add_options --with-android-version=9 link to full version: https://etherpad.mozilla.org/martyns-mozconfig
Flags: needinfo?(bnicholson)
My mozconfig file contains: ac_add_options --with-android-sdk="$HOME/android-sdk-macosx/platforms/android-16" And "NDK/SDK version notes" <https://wiki.mozilla.org/Mobile/Fennec/Android#NDK.2FSDK_version_notes> points to "canonical version numbers," which is 17 for the SDK. So I suggest setting --with-android-sdk to "$HOME/android-sdk-macosx/platforms/android-17", rebuilding, and seeing if the crash still happens.
(In reply to Martyn Haigh (:mhaigh) from comment #2) > Confusingly this was working before the weekend! That is weird -- if you were already using SDK 19, I don't know why you wouldn't have hit this before. I'd use SDK 16/17 as suggested by myk; anything beyond that hasn't been thoroughly tested. That said, we should still fix this for the future (it looks like the fix will be fairly straightforward).
Flags: needinfo?(bnicholson)
(In reply to Brian Nicholson (:bnicholson) from comment #4) > I'd use SDK 16/17 as suggested by myk; anything beyond that hasn't been > thoroughly tested. That said, we should still fix this for the future (it > looks like the fix will be fairly straightforward). Note that I have issues building with SDK 17 (bug 992996). > > Confusingly this was working before the weekend! bug 992996 was working start of day Friday, and stopped working by end of day, Friday. Related? I wonder what changed.
Summary: Opening settings crashes Fennec → Opening settings crashes Fennec if built with target API < 19
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.