My mid 2009 15" Macbook Pro (2.53 Ghz) has recently been shutting down at random. Doesn't matter if plugged into battery or not.
Terminal has diagnosed the shutdown cause as -102 (there are also a few -128 causes). I can't find what this cause means, does anyone know?
The -128 cause is fairly well known. It's not a precise indicator as there's a number of possible causes for this. However, the most common relate to:
Now, as for the -102 cause, I don't ever recall seeing that as a shutdown cause before. In fact, the only times I've seen a -102 error of any sort is either relating to Scrap Manager errors (which would be unrelated to your situation as it's related to carbon programming), or relating to a memory parity error.
I would run Apple Hardware Test (AHT) to see if it finds any obvious hardware problems.
Run Apple Hardware Test
Your model MBP uses Apple Hardware Test. It would have originally shipped with AHT on a DVD, so you'd need to insert this into your optical drive and follow these steps:
Note 1: that the extended test will take some time. Take a note of the results and report back.
Note 2: If pressing and holding the D key at Step 3 doesn't work, or you can't find the DVD, then at Step 3 press and hold both the OptionD keys instead. This will try and run diagnostics from the internet instead, so you will need to allow more time for it to complete.