Page MenuHomePhabricator

App crashes on Android 3.2.x
Closed, ResolvedPublic

Description

Using either the Android emulator or a Xoom tablet the app crashes with a process org.wikipedia has stopped unexpectedly message.

If the app isn't supposed to work with Android 3.x lets at least put in a max api requirement. Otherwise lets fix the issue.


Version: 1.0.0 (Android)
Severity: critical

Details

Reference
bz31455

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:52 PM
bzimport set Reference to bz31455.
brion added a comment.Oct 7 2011, 5:48 AM

E/AndroidRuntime( 555): FATAL EXCEPTION: main
E/AndroidRuntime( 555): java.lang.NullPointerException
E/AndroidRuntime( 555): at com.phonegap.menu.AppMenu$1.run(AppMenu.java:172)
E/AndroidRuntime( 555): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 555): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 555): at android.os.Looper.loop(Looper.java:132)
E/AndroidRuntime( 555): at android.app.ActivityThread.main(ActivityThread.java:4123)
E/AndroidRuntime( 555): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 555): at java.lang.reflect.Method.invoke(Method.java:491)
E/AndroidRuntime( 555): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 555): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 555): at dalvik.system.NativeStart.main(Native Method)

The anonymous inner class in the backtrace is a UI-thread callback in buildHoneycombMenu() ... this is code that's only run on Android 3.x and seems to pull a Menu object out of ctx.dMenu which I can find no documentation on.

If I change it to skip this when ctx.dMenu is null, it doesn't crash but the web view is limited to a tiny little square in the upper-left.

Tested with Android 3.2 emulator image.

herman.wong wrote:

the ctx.dMenu is related to the menu plugin which gives PhoneGap access to the native menu on Android phones.

it's possible that the plugin is not compatible with the Android tablets. I will verify if this is the case.

brion added a comment.Oct 28 2011, 6:41 PM

Still crashes in emulator running 3.2 as of commit f24fdd5449b020ac9a24f64abad9f07594fe6df8.

10-28 11:38:51.602: W/dalvikvm(589): threadid=1: thread exiting with uncaught exception (group=0x40014760)
10-28 11:38:51.612: E/AndroidRuntime(589): FATAL EXCEPTION: main
10-28 11:38:51.612: E/AndroidRuntime(589): java.lang.NullPointerException
10-28 11:38:51.612: E/AndroidRuntime(589): at com.phonegap.menu.AppMenu$1.run(AppMenu.java:173)
10-28 11:38:51.612: E/AndroidRuntime(589): at android.os.Handler.handleCallback(Handler.java:587)
10-28 11:38:51.612: E/AndroidRuntime(589): at android.os.Handler.dispatchMessage(Handler.java:92)
10-28 11:38:51.612: E/AndroidRuntime(589): at android.os.Looper.loop(Looper.java:132)
10-28 11:38:51.612: E/AndroidRuntime(589): at android.app.ActivityThread.main(ActivityThread.java:4123)
10-28 11:38:51.612: E/AndroidRuntime(589): at java.lang.reflect.Method.invokeNative(Native Method)
10-28 11:38:51.612: E/AndroidRuntime(589): at java.lang.reflect.Method.invoke(Method.java:491)
10-28 11:38:51.612: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-28 11:38:51.612: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-28 11:38:51.612: E/AndroidRuntime(589): at dalvik.system.NativeStart.main(Native Method)
10-28 11:38:57.272: I/Process(589): Sending signal. PID: 589 SIG: 9

bowserj wrote:

Commented out the code that creates an Action Bar specific menu for now. Honeycomb and Ice Cream Sandwich uses the Action Bar instead of using a Menu.