For example there is a program with a virtual ArrayCtrl that takes data from a huge file.
If user selects and copy the data to the Clipboard, program may crash.
Well, I have to say that generally, this is one of areas where I am not really that much sure that used approach (Panic) is correct.
However, somewhat I suspect that here the sensible solution is rather checking the size of selection before starting the process. The advantage is that it would solve "freezing" problem too.
I know that it is not always possible. And sometimes such check is difficult - but making the code "memory exception safe" reliably is much more difficult than that, I am afraid...