-
Notifications
You must be signed in to change notification settings - Fork 841
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
Mosby 3.1.0 NPEs in Activity#onDestroy() #290
Comments
Hey thanks for reporting. How do you use your ViewGroup, do you remove that one manually? How can I reproduce this bug? Did it work in 3.0.4? |
So far only seen this is crash reports sent via automated tooling, no repro cases reported. I'll try to cook up one in near future. Didn't receive such crash reports before Mosby 3.1.0 update and that lead me to believe it's related as there were lifecycle-related changes (such as The app itself is large with tens of developers contributing. In most places the UI is based on Also noting that I posted the wrong code snippet. It does have a typo, but the crash is in the next private method. Sorry about that. |
Ok, finally got some time to debug this deeper. No original repro steps known but here's something that produces similar stacktraces:
Here's a sample activity that demonstrates the above:
|
…e cleanup + fixed some typos
I see, thanks for the detailed report |
Anything new regarding this issue? I think that I just hit the same bug in v 3.1.0, but with MviPresenter and the Conductor library:
My app has a complex routing with several nested routers in Conductor and this crash happens when the app is resumed after a long time in background into state with backstack bigger then one. Then after tapping the back it does not pop the backstack but crashes. It can be reproduced with the "Don't keep activities" enabled in the debug options in the phone's settings. Then navigating to some screen where the backstack grows and minimizing the app (i.e. press home) will crash the app, sometimes :/ |
A similar error happens when you call |
I will work on this kind of issues this weekend
Daniel Rampelt <notifications@github.com> schrieb am Do., 29. März 2018,
20:55:
… A similar error happens when you call finish for an activity in onCreate,
it tries to delete a null presenter in onDestroy and crashes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#290 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjnrhB-LFSwnhhJPZdgshgXm7IZqH9gks5tjS4pgaJpZM4Q9cib>
.
|
…inish() is called in Activity.onCreate() #290§
…inish() is called in Activity.onCreate() #290
when the new update will be released? I am also getting this exception on crashlytics on some users: Caused by java.lang.NullPointerException |
I'm also detecting this crash from time to time and on Crashlytics. @sockeqwe Are going to release a new update anytime soon? Thanks! |
Working on it, along migrating to android x |
Is there a chance to get this fixed without tying it to the conversion to androidx? We are seeing crashes as well. |
Use latest snapshot 3.1.1-SNAPSHOT (see README)
Keith Naas <notifications@github.com> schrieb am Fr., 16. Nov. 2018, 16:41:
… Is there a chance to get this fixed without tying it to the conversion to
androidx? We are seeing crashes as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#290 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjnruqdbBGcIrU_o0r_zNj1bVOaW75Uks5uvtyygaJpZM4Q9cib>
.
|
Version 3.1.1-SNAPSHOT still fails |
Reproducable on 3.1.1 release. ViewGroupMviDelegateImpl |
Thanks for reporting. Will check this later this week. Just to be clear: it causes to crash in both cases:
|
I don't know actually. Stacktrace do not include either:
|
After upgrading app to Mosby 3.1.0 crash analytics have started displaying crashes like:
Do not have the specific repro steps available yet, but reading the source in
ViewGroupMvpDelegateImpl
:To me this looks like the code is assuming too much about the fragment/activity lifecycle - the fragment lifecycle has not reached
MvpFragment#onCreate()
where the presenter is created but the the activity gets destroyed for some other reason, andpresenterDestroeyed
defaults tofalse
.For what it's worth, there's also a typo in
presenterDestroeyed
.The text was updated successfully, but these errors were encountered: