Last modified: 2012-02-24 02:51:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33455, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31455 - App crashes on Android 3.2.x
App crashes on Android 3.2.x
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Generic (Other open bugs)
1.0.0 (Android)
All All
: High critical
: ---
Assigned To: Joe Bowser
:
Depends on:
Blocks: 31447
  Show dependency treegraph
 
Reported: 2011-10-07 00:27 UTC by Tomasz Finc
Modified: 2012-02-24 02:51 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: Android
Assignee Huggle Beta Tester: ---


Attachments

Description Tomasz Finc 2011-10-07 00:27:16 UTC
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.
Comment 1 Tomasz Finc 2011-10-07 00:27:34 UTC
First filed at https://github.com/nitobi/Wikipedia/issues/9
Comment 2 Brion Vibber 2011-10-07 05:48:36 UTC
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.
Comment 3 herman wong 2011-10-11 17:31:45 UTC
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.
Comment 5 Brion Vibber 2011-10-28 18:41:27 UTC
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
Comment 7 Joe Bowser 2011-11-01 22:08:02 UTC
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.
Comment 8 Joe Bowser 2011-11-01 23:42:31 UTC
Fixed with this commit: 

https://github.com/nitobi/Wikipedia/commit/e2e13fc832cf48077580af04bf05f18507961e03https://github.com/nitobi/Wikipedia/commit/e2e13fc832cf48077580af04bf05f18507961e03

(Note: I also removed hard-tabs and replaced them with spaces)

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


Navigation
Links