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

There is an NPE in MenuPresenter if i try to start the sample mail app (but not only there) #315

Open
HowardSchmaeu opened this issue May 30, 2018 · 3 comments

Comments

@HowardSchmaeu
Copy link

may is the same like #298 but i don't know.
First i got this problem in my own code and then i just download the actual Mosby Source to debug it but then i got the same in the sample mail app
I got THIS if i try to start the sample mail app:

java.lang.NullPointerException: Attempt to invoke interface method 'com.hannesdorfmann.mosby3.sample.mail.menu.MenuPresenter com.hannesdorfmann.mosby3.sample.mail.menu.MenuComponent.presenter()' on a null object reference at com.hannesdorfmann.mosby3.sample.mail.menu.MenuFragment.createPresenter(MenuFragment.java:91) at com.hannesdorfmann.mosby3.sample.mail.menu.MenuFragment.createPresenter(MenuFragment.java:44) at com.hannesdorfmann.mosby3.mvp.delegate.FragmentMvpViewStateDelegateImpl.createViewIdAndPresenter(FragmentMvpViewStateDelegateImpl.java:340) at com.hannesdorfmann.mosby3.mvp.delegate.FragmentMvpViewStateDelegateImpl.onCreate(FragmentMvpViewStateDelegateImpl.java:116) at com.hannesdorfmann.mosby3.mvp.MvpFragment.onCreate(MvpFragment.java:98) at com.hannesdorfmann.mosby3.sample.mail.base.view.BaseLceFragment.onCreate(BaseLceFragment.java:45) at com.hannesdorfmann.mosby3.sample.mail.base.view.AuthFragment.onCreate(AuthFragment.java:45) at android.support.v4.app.Fragment.performCreate(Fragment.java:2246) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1377) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1650) at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1906) at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3698) at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:111) at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:350) at android.support.v4.app.BaseFragmentActiv

@pawelnbd1992
Copy link

Someone fixed this issue ? @sockeqwe give me a hint where to look error.

@HowardSchmaeu
Copy link
Author

okay ... today i found an issue what may depends on THAT issue here or is the root... i don't know but may it helps to find something.

i had the problem that my Fragment or better the Base Class calls the onDestroyView() on a not expected point. i use almost the same Base Class like this from the origin:

BaseViewStateFragment

i was a bit confused because i had not this issue in all my other 2 mosby projects. After a bit investigation i changed back this project to mosby 2 because that was the only different to the other projects.

And voila it just works. it did NOT call onDestroyView()

I've NO Idea why and where it comes from but now it works.

@sockeqwe : may it helps to find the real root :)

@leslieam
Copy link

java.lang.NullPointerException: Presenter returned from createPresenter() is null.
I've got the same issue when I switch to 3.1.0 or 3.1.1. It worked on mosby 3.0.1.

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

3 participants