Skip to content

NPE when launching CourseDetailActivity #244

@abhijeetviswa

Description

@abhijeetviswa

Stack trace:

ComponentInfo{crux.bphc.cms/crux.bphc.cms.activities.CourseDetailActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String crux.bphc.cms.models.enrol.SearchedCourseDetail.getShortName()' on a null object reference
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7356)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String crux.bphc.cms.models.enrol.SearchedCourseDetail.getShortName()' on a null object reference
       at crux.bphc.cms.activities.CourseDetailActivity.onCreate(CourseDetailActivity.java:69)
       at android.app.Activity.performCreate(Activity.java:7824)
       at android.app.Activity.performCreate(Activity.java:7813)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
       ... 11 more

Interestingly enough, when I relaunched the app, I had to login again. I'm not sure if this problem was caused by an invalid token or if this caused the token to be invalidated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions