Moxy icon indicating copy to clipboard operation
Moxy copied to clipboard

NPE in MvpDelegate.onAttach in 1.5.5

Open asfdfdfd opened this issue 5 years ago • 4 comments

implementation "com.arello-mobile:moxy:1.5.5"
implementation "com.arello-mobile:moxy-android:1.5.5"
kapt "com.arello-mobile:moxy-compiler:1.5.5"

MvpAndroidXFragment is just Kotlin clone of MvpAppCompatFragment for AndroidX — https://gist.github.com/asfdfdfd/87552746c9182f6b7311f3d9ce6272a6, but this issue has appeared sometimes before migrating to Android X.

Here you could find shared Crashlytics record — http://crashes.to/s/d4ea6c01c8b

Also i'm attaching txt dump of this record to the issue — com.mirrorai.app_issue_1975_crash_5C1233CA02D700016492338D211553E3_DNE_1_v2.txt

I could not reproduce crash on my devices. It is super rare but i observe it from time to time.

asfdfdfd avatar Dec 13 '18 21:12 asfdfdfd

Please provide your implementations of fragment and presenter.

VovaStelmashchuk avatar Dec 14 '18 09:12 VovaStelmashchuk

Actually stack trace is not pointed to one of my fragments and presenters (except of MvpAndroidXFragment that is attached).

But it is pointed on androidx.fragment.app.FragmentStatePagerAdapter.

I have one FragmentStatePagerAdapter. Do you want implementation of Fragment/Presenter where adapter is placed or one of adapter's child or all children of adapter?

asfdfdfd avatar Dec 14 '18 10:12 asfdfdfd

Actually stack trace is not pointed to one of my fragments and presenters (except of MvpAndroidXFragment that is attached).

But is is pointed on androidx.fragment.app.FragmentStatePagerAdapter.

I have one FragmentStatePagerAdapter. Do you want implementation of Fragment/Presenter where adapter is placed or one of adapter's child or all children of adapter?

Do you trying to update adapter items? FragmentStatePagerAdapter have some old bug with tags of restored fragments https://issuetracker.google.com/issues/36956111. Maybe this will help you https://github.com/inloop/UpdatableFragmentStatePagerAdapter

alxgord avatar Jan 03 '19 10:01 alxgord

Do you trying to update adapter items?

No. I replace entire adapter.

asfdfdfd avatar Jan 12 '19 19:01 asfdfdfd