I would say that the flash is draining you battery causing the flash to die. I'm surprised that your camera just hasn't turned off. You should just get a spare battery or two depending on the amount of time you need to shoot.