Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Getting a Callback after Fragment has been detached #449

Open
akshaydewan opened this issue Jan 8, 2016 · 0 comments
Open

Getting a Callback after Fragment has been detached #449

akshaydewan opened this issue Jan 8, 2016 · 0 comments

Comments

@akshaydewan
Copy link

Hi,

We're using robospice-spring-android version 1.4.11 on a project. We're seeing that we sometimes get a network callback on a detached Fragment, which leads to a NullPointerException in the code. As suggested in the Wiki, we have tied the SpiceManger to the Fragment lifecycle and not the Activity lifecycle.

This problem is very hard to reproduce and happens very rarely. Our hunch is that it may be due to a race condition in the framework, but we haven't been able to narrow it down.

As a workaround, we are checking for Fragment.isAdded() in our callbacks.

Has anyone faced a similar issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant