Thanks mettelus for that. I did you points 1, 2 & 4. Still no different.
I tried reinstalling Sonar - no different
I made each track into one clip - just in case my 502 takes was too much. No different
I saved the file as a template, deleted all the content and now it works fine. I shall just have to have separate files for each bit of my piece, and make them only long enough before it causes a problem again.
To answer your point 3: I can arm the track and I can hear the sound. As soon as I hit R, there is no more sound on that track until I stop recording. Then the sound returns. Meanwhile it has recorded what I played, even though I couldn't hear it. This happens whichever track I'm recording on.
But at least I can get it working again - all seems a bit fragile though. I never remember having problems like this when I last did stuff with Sonar a few years ago, although I now have a different computer, if that makes a difference.