Don't know what is wrong with your camera, but bad electrical contacts/batteries make cameras do strange things like making bad pictures or shutting off with the lens out.
Would suspect a bad or corrupted memory card. Had this problem with a slow PNY SD memory card. It would skip and not record part of the video I was taking.
To turn the camera off, remove the batteries. Digital cameras reset to original settings if batteries are removed for one minute. Time varies with function/camera. Check display/setup menu for non-auto functions and date/time. Remove extra memory to eliminate this as a possible problem. Insert fully charged/cleaned batteries and restart camera. The ultimate non-physical repair for software-using devices is reset by removing power ... VCR/DVD players one month.
Most NiMH rechargeable batteries lose charge and should be recharged when not used after two weeks, but Duracell new formula 2000mAh NiMH batteries hold charge one year when not used. Also, 2000mAh batteries seem to have a longer life. Did not like these batteries at first, but have 12 over five years old and all are still as good as new.
Higher mAh batteries (about half as old) still work well in flashlights, but won't start my camera. The next link is about prolonging the life of lithium-based batteries which last from two to three years, but are very expensive. A Sony series G rechargeable 960mAh lithium-ion battery is $49.88 at Walmart.
http://www.batteryuniversity.com/parttwo-34.htm ...
A friend asked me to clean and charge her new 2000mAh Duracell batteries as described in the last link. Those batteries are still going strong after four months of normal use and have not been recharged.
Camera reports batteries low, but is it low charge or bad electrical contacts? Overcharging can ruin good batteries! The secret to making digital cameras work better is having good electrical contacts between batteries and camera.
Click this link for complete instructions on cleaning camera and battery electrical contacts.
http://www.google.com/base/a/4210404/D13701973093918363271
Digital cameras require lots of power. Bad electrical contacts can cause lots of problems so battery and camera contacts must be cleaned properly. Batteries may be fully charged, but camera will indicate "low" if contacts are not really good. The LCD screen is a low steady load, but when lens extension, optical zoom, focus, and flash charging are added in the capture mode; the load is very heavy. Bad contacts make cameras do strange things like making bad pictures or shutting off with the lens out.
CAUTION Do not overcharge! Batteries can be damaged. Use an automatic two or more hour Energizer Compact smart charger with temperature monitor, trickle charge technology, and safety timer ($9.76) at Walmart. Use pre-charged 2000mAh Duracell ($12.97) or RayOVac ($5.97) batteries (both hold charge one year) and a full cycle charge. To preserve battery charge, use the viewfinder.
NiMH batteries should be recharged when camera reports batteries low. Old batteries can discharge over night, but may provide normal service immediately after being charged. Battery pairs no longer usable in cameras may work well in flashlights. Do not drop batteries or allow voltage below one volt.
CAUTION To prevent memory card corruption, keep batteries charged and don't delete. Wait for lights to stop flashing then turn camera off before removing memory. For card readers, double click Safely Remove Hardware. Select, then click Stop and OK.
Never touch battery ends or camera electrical contacts. Oil from fingers will contaminate contacts. Use batteries in matched pairs of same brand and rating. Do not mix old and new batteries. New will only do as well as old.
Click this link for other camera tips and complete instructions on cleaning camera and battery electrical contacts.
http://www.google.com/base/a/4210404/D13701973093918363271