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

NPE when launching CourseDetailActivity #244

Open
abhijeetviswa opened this issue Sep 14, 2020 · 0 comments
Open

NPE when launching CourseDetailActivity #244

abhijeetviswa opened this issue Sep 14, 2020 · 0 comments

Comments

@abhijeetviswa
Copy link
Member

abhijeetviswa commented Sep 14, 2020

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.

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

No branches or pull requests

1 participant