Sporadically missing instance variable #504

Closed
donv opened this Issue Oct 14, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Owner

donv commented Oct 14, 2013

One of our test cases fails sporadically:

https://github.com/ruboto/ruboto/blob/master/test/activity/startup_exception_activity.rb
https://github.com/ruboto/ruboto/blob/master/test/activity/startup_exception_activity_test.rb

The symptom is that @text_view is nil in onResume. I have verified that onCreate is called, that @text_view is set, and that "self" is the same when onCreate and onResume are called.

I have no idea how @text_view could end up being nil in onResume. Any help is appreciated.

Owner

donv commented Oct 15, 2013

I had a great chat with @headius , and we believe we understand the problem. This is actually the expected behaviour. Because there are no references from Ruby to the Activity, the object proxy can be garbage collected between calls.

I will try to add a reference to relevant instances, and try to drop the references after the object is destroyed.

@ghost ghost assigned donv Oct 15, 2013

@donv donv closed this in e5410fc Oct 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment