On the Canon website you can find the following announcement to:
"It was confirmed that occur with some digital compact cameras the IXUS 255 HS model battery contact failure. Below this issue and the services provided by Canon in greater detail.
Cause
When using the above products with the supplied Battery Pack NB-4L battery, a contact failure lead to the following operating errors. This is even the case when the camera battery is fully charged.
-It Appears the message directly charge the battery (Charging the battery).
-The Camera sometimes does not turn on.
-The Camera turns off during operation.
Useful Information:
Products Affected
Some compact digital cameras of the model IXUS 255 HS are affected.
This problem affects cameras with a 0, 1, 2 or 3 in the sixth position of the serial number.
(Serial numbers of affected cameras) xxxxx0xxxxxx xxxxx1xxxxxx xxxxx2xxxxxx xxxxx3xxxxxx (x stands for product-specific numbers.)
Solution:
Affected products are repaired free of charge regardless of warranty status, if it is confirmed that battery contact errors.
Bring in a repair request your camera and Battery Pack NB-4L.