Why is my client saying "A fatal error occured. Bitcoin can no longer continue safely and will quit. "? i am running bitcoin client on OSX. I am by no stretch of the imagination any good at using terminal. I had over 300 btc in there and my computer went black and now client keeps giving me this message "A fatal error occured. Bitcoin can no longer continue safely and will quit.

EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in Runaway exception
"
I can pay somebody to help me fix this problem. dont want to lose the coins i have there. thanks. you'll have to bear with me though. not too good at this.
That alone doesn't provide enough information to know which database file the error is occurring with.   The debug.log might give a more precise indication.

If it is a problem with the blockchain, that is easily resolved.  If the problem occurred after your computer crashed, that is likely what happened. 

First though check to eliminate that the problem is that your hard drive partition is filled with no disk space remaining.  That probably isn't the case on your Mac, but just in case, check first.

So, after making yet another backup up your wallet.dat, then you can do this to get a new copy of the blockchain:

These instructions are for mac.  For Linux and Windows the directory names would be different.

 $ cd ~/Library/Application Support 
 $ mv Bitcoin Bitcoin-bak
 $ mkdir Bitcoin
 $ cd Bitcoin
 $ cp ../Bitcoin-bak/wallet.dat .


Then launch Bitcoin-Qt as normal.  It will re-download the blockchain.  This could take 24 hours or more, depending on a number of factors.

You might speed that up a bit by getting the blockchain as-of block 170,000 from here:


http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain


After it downloads, extract those files into your new ~/.bitcoin directory.

If after Bitcoin-qt downloads the blockchain to the most recent block and everything works fine (shows your wallet balance and transactions properly), you can then remove the .bitcoin-bak directory:

$ cd ~/Library/Application Support 
$ rm -rf Bitcoin-bak


Also, the blockchain download is faster if you are on the most recent release of Bitcoin-Qt, v0.6.3.