Another reason you could be getting a null pointer that you did not list is "You are passing a null object into a function that is expecting a non null object." and this is what you are doing. Like...