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 in CategoryNode #36

Closed
roundhill opened this issue Aug 9, 2013 · 2 comments
Closed

NPE in CategoryNode #36

roundhill opened this issue Aug 9, 2013 · 2 comments

Comments

@roundhill
Copy link
Contributor

@maxme any thoughts on this one?

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.wordpress.android/org.wordpress.android.ui.posts.SelectCategoriesActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.wordpress.android.models.CategoryNode.createCategoryTreeFromDB(CategoryNode.java:84)
at org.wordpress.android.ui.posts.SelectCategoriesActivity.populateOrFetchCategories(SelectCategoriesActivity.java:99)
at org.wordpress.android.ui.posts.SelectCategoriesActivity.onCreate(SelectCategoriesActivity.java:75)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
... 11 more
@maxme
Copy link
Contributor

maxme commented Aug 9, 2013

That could happen if a category have a parent with an invalid category id. Is this code already released ?

@roundhill
Copy link
Contributor Author

Yeah, I think it is pretty rare though. I will get the fix pulled in to the next release.

roundhill added a commit that referenced this issue Aug 9, 2013
fix #36: NPE - category have a parent with an invalid category id
mufela added a commit to mufela/WordPress-Android that referenced this issue Dec 5, 2016
aforcier added a commit that referenced this issue Nov 11, 2020
f9d0196b83 Run unit tests in CI (#42)
da6e11beb1 Add CI step to run the tests
d0e8cdbb40 Remove trailing whitespaces from CircleCI config
2aade32249 Merge pull request #39 from wordpress-mobile/fix-bintray-upload-missing-artifacts
a4fd2e4ab4 Adds components.release to Bintray publication
b3921b9359 Merge pull request #38 from wordpress-mobile/updates-from-wpandroid-with-gradle-6
4c5e2bcb83 Updates from wpandroid with gradle 6
853a26bdc3 Merge pull request #37 from wordpress-mobile/update-version-to-1.29
2b28190305 Update version to 1.29
a6401c4dc0 Merge pull request #36 from wordpress-mobile/upgrade-version-to-1.28
f79ccd177d Update version number to 1.28
d70f573de8 Merge pull request #35 from wordpress-mobile/merge/wpandroid-12813
0ee53abc26 Adds DisplayUtils.getDisplayPixelWidth
806693e808 Merge pull request #34 from wordpress-mobile/manually-update-changes-from-wpandroid
0d527acf54 Update gradle wrapper files
a396ad49ef Manually applied consolidated changes from WPAndroid
a28f653460 Merge pull request #33 from wordpress-mobile/merge/WordPress-Android/12569
6caa352edd Bumping utils version.
87167d8bbd Limit storage percentage to 100%

git-subtree-dir: libs/utils
git-subtree-split: f9d0196b83addc26eab2447cc962d489824f5bcf
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

2 participants