Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference #328

Open
codeguru42 opened this issue Feb 3, 2016 · 2 comments

Comments

@codeguru42
Copy link
Member

Google Play Crash Report

Device: RCT6773W42B

Android Version: 5.0

App Version: 15 (Lite)

User Message: baseball card light stopped working

Stack Trace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{bbct.android/bbct.android.lite.provider.LiteActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2491)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2564)
    at android.app.ActivityThread.access$800(ActivityThread.java:170)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1441)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5576)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at android.app.Activity.stopManagingCursor(Activity.java:2068)
    at bbct.android.common.activity.BaseballCardList.swapCursor(BaseballCardList.java:329)
    at bbct.android.common.activity.BaseballCardList.applyFilter(BaseballCardList.java:322)
    at bbct.android.common.activity.BaseballCardList.onCreateView(BaseballCardList.java:126)
    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
    at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
    at bbct.android.common.activity.MainActivity.onStart(MainActivity.java:61)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1228)
    at android.app.Activity.performStart(Activity.java:6057)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2447)
    ... 10 more
@codeguru42
Copy link
Member Author

codeguru42 commented Aug 9, 2016

Google Play Crash Report

Device: 10 Viking Pro (RCT6303W87DK)

Android Version: Android 5.0

App Version: 17 (Lite)

User Message: none

Stack Trace:

 java.lang.RuntimeException: Unable to start activity ComponentInfo{bbct.android/bbct.android.lite.provider.LiteActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2491)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2555)
    at android.app.ActivityThread.access$800(ActivityThread.java:170)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1441)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5567)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at android.app.Activity.stopManagingCursor(Activity.java:2068)
    at bbct.android.common.activity.BaseballCardList.swapCursor(BaseballCardList.java:348)
    at bbct.android.common.activity.BaseballCardList.applyFilter(BaseballCardList.java:341)
    at bbct.android.common.activity.BaseballCardList.onCreateView(BaseballCardList.java:145)
    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
    at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
    at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
    at bbct.android.common.activity.MainActivity.onStart(MainActivity.java:105)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1228)
    at android.app.Activity.performStart(Activity.java:6057)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2447)
    ... 10 more

codeguru42 added a commit to codeguru42/bbct that referenced this issue Sep 6, 2016
codeguru42 added a commit that referenced this issue Sep 6, 2016
Issue #328: Fix `NullPointerException` in `BaseballCardList.swapCursor()`
@codeguru42
Copy link
Member Author

Need to write tests for this. I will make a release anyway since the test suite in such a sorry state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant