The IDE you're using might give you a hint. It's likely a pointer / reference issue, to where, the array would need filling, the method uses the array, but it is never filled, the array remains empty at the time of being called.