you can check the software update. and ask the customer care about the update they will give the date or month . you can check in the Samsung website with the live chat option
do one thing go to settings 》 apps 》 camera 》 there you allow all permission.. do the force stop and restart your phone ... if the problem continues.. restore your mobile.
the phone has an option of automatic restart ... at the midnight. . enable it ... there are certain conditions... update the software the one ui 2.0 is running good