Some people are missing the point of my post. I don’t care about the scenarios that might or might not lead up to a CTD event happening. It seems such a random thing I don’t think they can be attributed to any one thing.
I am more interested (as a programmer) in why one ever happens at all. I am thinking, perhaps naively, that the OS, the programming language, and then finally the programmer should prevent any CTD ever happening. Primarily, I think the OS should be doing this. I certainly try to prevent as many problems as possible and then if an error does occur, to provide to the user as much useful information as possible. In my 40 years of programming I don’t recall a CTD in any of my software. Or indeed, of it even being a possibility. I don’t even know how I could force such a thing. I admit that I have never programmed in C, C# or C++ (except for one small embedded job), so my experience there is limited. But that is why I am asking here - perhaps someone who is a programmer in those languages can tell me.
I think that the answer given earlier seems correct. If you are interfacing with DirectX and the like, then you are perhaps losing a lot of the protections of the OS and your programming libraries.