From time to time I have strange effects that go undiscovered for a while. And I seem to remember I've posted this to the old VAST Forum a few years ago.
So sometimes getters return the contents of a wrong instance variable. The source code looks good, and simply entering a blank character to the method and recompiling it heals the problem. I haven't been able to reproduce the problem reliably, but I suspect its has to do with the "Rename Variable As... with Accessors" refactoring. I haven't tried this time, but next time I'll try reloading the methods from envy into a new image to see if this is problem persists. Not sure what exactly that would tell me about my Refactoring theory. So far I haven't seen the same problem with setters... All I can tell is that in an inspector, the contents of an affected inst var is okay, but sending the sender returns the contents of another inst var. The getter of the other inst var is not necessarily returning the value of the affected inst var...
Has anybody seen this as well? This effect shows up every three or four months or so, so I'd say it's rare, but it is "interesting".
BTW: Is there an easy way to see what inst var a method refers to? Inspecting a CompiledMethod doesn't show (art least not in a way that jumps right at me) what I was looking for. Do I need to read the byte codes? If so, how can I do that (I know the Browsers were updated to show them, but forgot how to load/activate that).
Joachim