Default Gt i-9020 shuts off while shooting with flash

My phone nexus s is shutting off while taking image with flash, and not opening until I press the power button
This problem is occured when my phone's battery is less than 50%.
and when the battery is more than 50% then takes photos with flash.
Please help me that what is thus problem and how to solve it .