I'm working on a ViewModel framework for android that depends on Roboguice. I inject values into an activity's ViewModel at the same time in the activity's lifecycle every time I launch an activity that follows this pattern. This works 99.95% of the time. All of my injections are populated the way I expect and life is wonderful. Then, the other 0.05% of the time a variable will have a null supplied for it's injection, and code that assumed proper injection starts throwing NullPointerExceptions. If the user closes the activity and reopens it, everything works; all of the variables were injected as expected.
This appears to only happen when our application is running in "offline mode", which uses a series of supporting objects that increase our memory usage by about 7MB, putting us at 20MB or more depending on the situation. While there is room for improvement here, I wouldn't expect it to be causing the issue.
My questions are:
What could cause Roboguice to inject nulls in place of easily injectable concrete classes?
How does Roboguice behave if allocated memory is high?
Thanks for your time,
Trey