Hi, One of my users reported a strange issue today (the app in question is here: market://details?id=com.ptashek.bplog). The general layout is a TabActivity hosting three tabs, each populated using an Intent.
>From the error report sent via Android Market (platform == "Droid") it seems there is a "divide by zero" exception raised on line 216 in IconMenuView.java, as seen here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/com/android/internal/view/menu/IconMenuView.java;h=bba2ee27556214a9d28605bda26d6bd36d41f48e;hb=1a3786a3e34112e3e68e6a9b07ba72802867a002 As I understand it this should happen only if I would try to show a menu without actually adding any menu items to it, right? I am populating/managing my menus in the target activities using onPrepareOptionsMenu() and onCreateOptionsMenu(). I have tested my app extensively on all SDKs from 1.5 to 2.2 (including plenty of "random abuse" by the "Click Monkey") and this issue never came up, and so far none of my users have reported this kind of error (until today). I don't think this is caused by any of my code as such, but then again I am new to Android and maybe have missed something obvious/obscure. I'd appreciate any hints/pointers etc. :) Thanks in advance! Here's the entire logcat from the actual error report: java.lang.ArithmeticException: divide by zero at com.android.internal.view.menu.IconMenuView.layoutItemsUsingGravity(IconMenuView.java: 216) at com.android.internal.view.menu.IconMenuView.layoutItems(IconMenuView.java: 192) at com.android.internal.view.menu.IconMenuView.onMeasure(IconMenuView.java: 469) at android.view.View.measure(View.java:7964) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java: 3023) at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) at android.view.View.measure(View.java:7964) at android.view.ViewRoot.performTraversals(ViewRoot.java:763) at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4363) at java.lang.reflect.Method.invokeNative(Method.java:-2) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(NativeStart.java:-2) /Lukasz -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en