The error says the context is invalid .So i suppose calling the second time means you are calling the method directly i guess.
As per docs
The current graphics context is nil by default. Prior to calling its drawRect: method, view objects push a valid context onto the stack, making it current.
The context will be valid only in drawRect:
method.You need to call -setNeedsDisplay
on the UIView to update the contents