NullPointerException from reference passed by 'this'.
I have an object that receive a callback reference after creation. The callback is set like this:
Tracing the problem I found that 'this' is null when the setCallback method is invoked. Besides the obvious issue of my program not working, I am more concerned with how this has sent shockwaves through my fragile understanding of Java. Namely, how in any way can 'this' be null? Wouldn't that be impossible? I feel like I have discovered a chicken that was not hatched from an egg.
Forgive me for not posting more code, my project is quite large and I'm much more interested in hearing how 'this' can ever be null than knowing what line was at fault.
Thanks for you time,