Kernel panics; Apple hardware test error codes... Bad memory?
It sounds like some sort of RAM issue for sure, and there are a few memtest based programs out there to try and run and see if you run into problems. Rember is a gui based memtest, and applejack is a fairly well known utility script that also contains it.
I dont know why you only got the error with a specific configuration of ram, but with 8GB of addressable space it can take a while to find the bad guy.
I agree with hobs. I recently had a similar problem - random KPs that didn't point to any single process. I tracked it down using Prime95. It has a stress test which according to their README indicates that any errors are almost certainly tied to a hardware problem. Swapping RAM and running the test I was able to confirm that my 3rd party RAM was bad. I should note, Apple's hardware test never found a problem, nor did I find one with memtest (but I probably gave up too soon).
I found my old stock RAM that came with my Mac and swapped it out and the kernel panics and app crashing stopped. I used it for a few days just to be sure. Then I went back and stuck in only one of the third party 4GB sticks and within an hour I had a few app crashes and a kernel panic. Then I swapped it with the other third party 4GB stick and after a week of use, it seems to be in working condition fortunately.
So ultimately, the answer is the app crashing and kernel panics were definitely due to faulty RAM.