Could it be a broken battery? I had a galaxy s3 with broken battery connectors and it did a similar thing
open