Hi Bob,
This could be a script error with TRS2004 as John Whelan has indicated. I at first suspected those two locos you loaded. Have you tried, just for kicks, removing these from Trainz? Sometimes even their presence in the database, chump file, will cause TRS2004 to barf.
With your mention of heat, though I do suspect a hardware issue, and not surprised due to the age of the hardware. I have a hunch this could very well be a RAM (Memory chip) issue. Heat sensitivity usually has to do with thermal-related cracks within the chip substrate, or even a cold solder joint on the DIMM. As things heat up and expand, the metal leads may move even a smidge from the pads causing things to go haywire. I recommend running Memtst86 which is not a stress test like a benchmark tester. It only runs the memory through various binary combinations to force bits to stick or not move. A bit stuck high, for example will not change to a zero when it's supposed to, the same with a bit stuck low, and both can cause odd errors and even crashes. Here's the link before I forget!
http://www.memtest.org/
You need to burn the ISO file to a CD or DVD and reboot. Choose the option (you might have to set this up in your BIOS) to boot from the CD/DVD.
The program will test your memory a few blocks at a time. The test will run until you cancel it and should there be any errors, there will be red, bold, lines that will indicate the address. Finding which DIMM is bad will be up to you. You'll need to test one DIMM at a time to determine which one is flaky. So if there are errors, open up the case, remove all the memory but one. Note, you might need to keep two in there since some motherboards require memory to be in pairs. Test the single DIMM or pair just like you did the full batch. If there are any failures, you've got your buggy items. Which one in a pair? You need to play swaparroo with others to figure that out for the process of elimination.
Why TRS2004 is more sensitive to the flaky memory probably has to do with the way it loaded. Programs load into certain locations in memory, but not always the same location, which explains your good days versus bad ones. If there's a faulty block somewhere, the data gets garbled, meaning what should be a sequence of 1's followed by a long sequence of 0's becomes a single 1 and a single 0 somewhere, causing the program to go off to bit heaven.
You might find this interesting as this sounded oh, so familiar to me.
When I was running TRS2004, I'd go for a drive on a rather extensive route. This was about 1/2 hour into the route and on the mainline east. Everything would be fine until I reached a particular point on the route. Then BANG! BOP! I'm at the desktop with the same error message you have. Poking around the forums, and way back in the long-gone forums, others suggested bad content. I then went through the process of elimination. Anything that looked suspicious was removed to no avail. Eventually, I had an almost bare area on my route, except for trees which were used elsewhere, only to still have the barf and crash to the desktop. Then one day... I had other system errors. I was browsing the forums and had errors when I exited from my browser, then Word, then Excel, then I couldn't run anything. Hmm... I ran Memtst86 and found a bad DIMM, replaced it under warranty no less, and in the end I loaded my backup copy of my route and I was then happily driving past the point of the crash.
Now keep this in mind. Should the memory pass its tests, then it's something else including the power supply, and hopefully not the motherboard. Power supplies can get weak over time as their components age. The biggest culprit is the filter capacitors or voltage regulators (or as my electronics teacher used to say Wolatge Wegulators)! If this doesn't fix it, then it's the motherboard which unfortunately is the heart of the machine and is a new box in general. So, go for the easy stuff first like a memory test.
John