Couldn't write state file: '(error-code)'; giving up
From Unofficial BOINC Wiki
Message Type: Error Message
- Improper termination of the BOINC Daemon.
- Improper shutdown of the computer.
- Use of anti-spyware or anti-virus applications.
One of the most likely causes is the use of anti-virus/anti-spyware tools. Turn off the "Real Time Protection" mode (the name may vary depending on the product) and restart the BOINC Client Software.
This message is an a severe error and indicates that all of the re-try actions failed.
 Version Information
 Example Log(s)
 Message Log(s) Needed
Be the First! Zip up and send all TXT and OLD files in your BOINC Directory and then mail them to Chris at: email@example.com
The above EMail address is not correct. Please provide correct EMail address to send information.