Do you find that when you are tuning the guitar, the strings don't always change in pitch smoothly, but tend to jump. If this has been happening, have a look at the grooves in the nut (the white grooved bone or plastic bar which guides the strings to the tuning pegs(You could call it fret zero). If a string is snagging there, it will put a lot of strain on it as you tune it up to pitch. It may sometimes break at the nut but not always. I find that from time to time it is a good idea to take an old string, and run it backwards and forwards several times in the groove to clean the run of the string. This may solve your problem.
One or two words of caution. You don't want to overdo the cleaning process. If you make the grooves too wide or too deep, you can upset the setup of the guitar, and replacing the nut is never straightforward. It has to be cut to that the strings are just the right height above the fretboard, and this takes time and patience to get just right. With a 12 string, it will take at least twice as long!