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
In DefaultFragmentExecutor.open, fromContext childFragmentManager can be null #33
Comments
Hi, apologies for taking so long to respond to this issue. I believe I changed from commitNow to commit due to some bugs with commitNow. I can't remember exactly what the issue was (and now I'm kicking myself for not writing better commit messages!). Changing back to commitNow might solve your issues. It may also be worthwhile looking into Unfortunately, I'm busy for the next few days and won't get a chance to dig deeper into the issue until the weekend. Over the weekend, I'm intended on refreshing myself on why I changed to commit as opposed to commitNow. I'll also see if I can reproduce a case where childFragmentManager is null - if you have any luck with reproduction steps I'd be very interested in those. Any code that you can share would also be useful. |
@mgod do you have any stack traces you'd be able to share? |
I'm pretty sure these are cases where I'm using child keys in the navigation key, but I haven't been able to reproduce this yet. I'm wondering if |
I have semi-good news! I have a test that can reproduce this stack trace. I don't have a solution yet, but I'm exploring options. If you're interested, here's the test I am using to work on these changes (this is added to "ActivityToFragmentTests.kt"):
|
It looks like changing back to I will make this change and release a new version tomorrow. |
Thank you! I think I've also been seeing the navigation handle bug as well, but have been working around it. |
…e issues raised in #33. Add tests to verify behaviour and prevent regressions related to this issue.
…e issues raised in #33. Add tests to verify behaviour and prevent regressions related to this issue.
I have released Enro 1.3.7, which reverts back to commitNow for fragment transactions and should resolve this issue. |
1.3.7 resolved all the issues I was seeing. Thanks! |
I'm seeing some issues around this line in the library:
Enro/enro-core/src/main/java/dev/enro/core/fragment/DefaultFragmentExecutor.kt
Line 40 in 5464e1f
I haven't been able to find reproduction steps yet, but I'm wondering if it's related to switching this from
commitNow
tocommit
:Enro/enro-core/src/main/java/dev/enro/core/fragment/DefaultFragmentExecutor.kt
Line 75 in 5464e1f
It seems like I run into this in cases where I have several navigation instructions happening in a row, so it seems like maybe child keys are starting to execute before the parent key transaction has finished. I'm inclined to do some experimenting with swapping this back to
commitNow
and see if that stops this crash in production, but I can't figure out why this changed. Was there a bug when usingcommitNow
or is it just avoiding using the slower call?The text was updated successfully, but these errors were encountered: