Sounds like another battery defect problem... Mine started acting that way when my S4 was just two months old. A factory reset didn't help and if the battery failed me during the reset, I could have bricked my phone. Samsung has acknowledged the presence of the problem as it is quite widespread. You can Google and see articles about it. Battery is under warranty for 6 months. You can have them replaced by Samsung. Either way, you need to replace the battery ASAP or the thing could leak and explode.
Sent from my GT-I9505 using Tapatalk