Got this same problem with my S6. Brought my phone also (twice) to a Samsung repair center. Still have the same problems you're experiencing with your S5. :(
Hey moderators,
Can someone please approve my post in "Samsung Android Phones" > "Samsung Galaxy S6" > "Samsung Galaxy s6 restarting itself, apps crashing"? It had a Youtube link in it with this problem what we have.
Thanks in advance.