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 looking up a word #19

Closed
caarmen opened this issue Sep 11, 2016 · 2 comments
Closed

NullPointerException looking up a word #19

caarmen opened this issue Sep 11, 2016 · 2 comments
Labels

Comments

@caarmen
Copy link
Owner

caarmen commented Sep 11, 2016

Seen on the Play Store console, on an LGK410 for ATT, Android 6.0

Caused by: java.lang.NullPointerException: Attempt to read from field 'android.widget.TextView ca.rmen.android.poetassistant.databinding.FragmentResultListBinding.tvListHeader' on a null object reference
    at ca.rmen.android.poetassistant.main.dictionaries.ResultListFragment.query(ResultListFragment.java:156)
    at ca.rmen.android.poetassistant.main.dictionaries.Search.search(Search.java:93)
    at ca.rmen.android.poetassistant.main.MainActivity.onNewIntent(MainActivity.java:1157)
    at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1213)
    at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1225)
    at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2563)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3103)
    ... 10 more
@caarmen caarmen added the bug label Sep 18, 2016
@caarmen
Copy link
Owner Author

caarmen commented Sep 18, 2016

Got this when opening the app from the wotd notification.

09-18 15:47:03.241 17849 17849 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to read from field 'android.widget.TextView ca.rmen.android.poetassistant.databinding.FragmentResultListBinding.tvListHeader' on a null object reference
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at ca.rmen.android.poetassistant.main.dictionaries.ResultListFragment.query(ResultListFragment.java:156)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at ca.rmen.android.poetassistant.main.dictionaries.Search.search(Search.java:93)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at ca.rmen.android.poetassistant.main.MainActivity.onNewIntent(MainActivity.java:1157)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1215)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1227)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2582)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3133)
09-18 15:47:03.241 17849 17849 E AndroidRuntime: T>>>>>>... 10 more

@caarmen
Copy link
Owner Author

caarmen commented Sep 18, 2016

Steps to reproduce:

  • Go to settings
  • change theme
  • enable word of the day
  • click on the wotd notification
  • 💥

caarmen added a commit that referenced this issue Sep 18, 2016
Scenario:
* open settings
* change the theme setting
  - The activity stack is recreated
* turn on the Wotd setting
  - A new Wotd notificaiton appears
* tap on the Wotd notification
  - The app goes to the MainActivity with onNewIntent().  The ViewPager doesn't seem to be completely initialized yet.  In this case, we wait for it to be laid out (and thus, it appears, the fragments created) before we try to make the fragments query.
caarmen added a commit that referenced this issue Sep 18, 2016
@caarmen caarmen closed this as completed Sep 18, 2016
@caarmen caarmen mentioned this issue Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant