Canon sx50
NOT ALWAYS - but sometimes, as I turned off my camera, pictures taken through CHDK [only] erased automatically
Can you give more details about how you're using the camera? I assume you're not using CHDK RAW or DNG as that makes little sense on the sx50. Are you using a script?
Have you tried a different SD card? Did you try checking the card on a computer after the files disappeared (with a utility like chkdsk if you're using Windows)?