I took my Canon Powershot G12 out of my bag, I turned the camera on the lens partially extended but would not focus, zoom or retract when turned off. On the screen it displayed Lens Error.I had not dropped or banged the camera and it had been working immediately prior to putting in the bag.
I just found a fix. Hold down the shutter release, then turn the camera on. The lens retracted and Bingo now works normally. This fix may work for other camera in the G range.
The last time that happened on a G9 it cost £250 to repair via insurance.