Laws of physics will dictate what causes a crash. How each rider violates these laws will be different. Having crashed twice on the track (one with CSS, another on my own). I got to learn about the limits the hard way
sometimes it's rider error, other times it's environment or equipment (rain, new pavement, cold tires, etc...). But at the end it's a rider's responsibility to be environmentally aware.
Errors are easy to spot if someone is about to crash. But a distinction needs to be made whether it's a one-off error or a repeated error. For example, on the track I find myself experimenting with shifting/braking techniques. If someone sees me they would say I'm going to crash. But I'm intentionally making mistakes to see what works best for me.
Red flags would be any of the below in a repeated fashion:
wrong line into and out of a turn.
bad vision, not seeing what's coming. Bad reference point, etc...
choppy on brakes/throttle/clutch.
body position (crossed up, etc...).
Overly aggressive riding/passing. Ambition outweighs skill
Physical readiness. Tired, lack of focus, etc...
A crash will be inevitable when any of the above is combined.