rtyley / agit

Agit - Git client for Android
https://play.google.com/store/apps/details?id=com.madgag.agit
GNU General Public License v3.0
510 stars 109 forks source link

Crash @ com.android.internal.view.menu when refreshing a repository #106

Closed jwir3 closed 10 years ago

jwir3 commented 10 years ago

Steps to reproduce:

  1. Clone a personal repository (for me, this meant a repository on a private server that has a self-signed SSL certficate... I'm not sure if this actually has anything to do with the crash). The initial clone worked fine.
  2. Click the refresh button at the top of the nav bar.

Expected Results: In this case, I'd expect nothing to happen, because the repository was just cloned, and no pushes have been made to it since the clone.

Actual Result: Agit crashes due to a NullPointerException.

Stack trace (not that useful):

03-13 19:24:56.772    5145-5145/com.madgag.agit E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.madgag.agit, PID: 5145
    java.lang.NullPointerException
            at com.android.internal.view.menu.MenuItemImpl.toString(MenuItemImpl.java:499)
            at java.lang.StringBuilder.append(StringBuilder.java:202)
            at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:201)
            at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1012)
            at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
            at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
            at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
            at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:546)
            at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)
jwir3 commented 10 years ago

It looks like this happens when I clone a github repo via HTTPS as well. I'm using a debug version (1.29-SNAPSHOT), but I'll try with a version of agit from Google Play.

jwir3 commented 10 years ago

Bisect gives the following:

78dc1e1fb8fa6756497848d37d03c27920f7cbd8 is the first bad commit
commit 78dc1e1fb8fa6756497848d37d03c27920f7cbd8
Author: Roberto Tyley <roberto.tyley@gmail.com>
Date:   Mon Apr 15 22:32:49 2013 +0100

    Upgrade to ABS 4.3.0

    https://github.com/JakeWharton/ActionBarSherlock/blob/master/CHANGELOG.md

:040000 040000 fbc76312b2c12a7748f280a5f4fb56ed0a3cc0b7 ceaf7b71061b32f0eb04fa53b2d432a1feb4aefe M  agit
rtyley commented 10 years ago

Many thanks @jwir3 - I'll release an update to the Play Store as soon as I get a chance to review your other contribution in #103