Shutdown Cause: -102 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:


problems with RAM
that your battery is past its life cycle
the SMC initiating a shutdown due to a sensor reading (e.g. excessive temperature)


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:


Shut down your MacBook Pro 
Restart your MacBook Pro
Press and hold the D key before the gray startup screen appears.
After a while, Apple Hardware Test (AHT) will start.
When prompted, select your language and click the right arrow. 
When the AHT console appears, you can choose to run Basic tests by clicking the Test button. However, I suggest you select the "Perform extended testing" checkbox before you click the Test button.
Your test results will appear in the window in the bottom-right of the console.


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.