This repository was archived by the owner on Apr 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
This repository was archived by the owner on Apr 19, 2018. It is now read-only.
java.lang.NullPointerException when clicking on ActionBar MenuItem #902
Copy link
Copy link
Closed
Description
I recently upgraded to v4.3.0, and am seeing an odd NullPointerException
when clicking on a MenuItem
.
The device is a Samsung Galaxy S, running JB from CyanogenMod 10 (as it's the only way I can get JB on this old device). Fresh OS install, completely stock otherwise.
The full stack trace looks like:
04-18 17:02:46.255: E/AndroidRuntime(3919): FATAL EXCEPTION: main
04-18 17:02:46.255: E/AndroidRuntime(3919): java.lang.NullPointerException
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.MenuItemImpl.toString(MenuItemImpl.java:496)
04-18 17:02:46.255: E/AndroidRuntime(3919): at java.lang.StringBuilder.append(StringBuilder.java:202)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:201)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:980)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:547)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.view.View.performClick(View.java:4204)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.view.View$PerformClick.run(View.java:17355)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.os.Handler.handleCallback(Handler.java:725)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.os.Handler.dispatchMessage(Handler.java:92)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.os.Looper.loop(Looper.java:137)
04-18 17:02:46.255: E/AndroidRuntime(3919): at android.app.ActivityThread.main(ActivityThread.java:5226)
04-18 17:02:46.255: E/AndroidRuntime(3919): at java.lang.reflect.Method.invokeNative(Native Method)
04-18 17:02:46.255: E/AndroidRuntime(3919): at java.lang.reflect.Method.invoke(Method.java:511)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
04-18 17:02:46.255: E/AndroidRuntime(3919): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
04-18 17:02:46.255: E/AndroidRuntime(3919): at dalvik.system.NativeStart.main(Native Method)
After attaching the debugger, the culprit line seems to be:
if (BuildConfig.DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);
in method public final boolean onMenuItemSelected(int featureId, android.view.MenuItem item)
When inspecting the item
property, I see a com.sun.jdi.InvocationException occurred invoking method.
Any thoughts?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels