Sorry, no fix in here, had a quick look through your sketch and didn't see anything obvious but I also found this: http://miscsolutions.wordpress.com/2011/10/16/five-things-i-never-use-in-arduino-projects/
This mentions that due to String allocating dynamically, over time you might actually run into memory fragmentation that causes allocation to fail. I wonder if this is partially responsible?
Sorry, no fix in here, had a quick look through your sketch and didn't see anything obvious but I also found this: http://miscsolutions.wordpress.com/2011/10/16/five-things-i-never-use-in-arduino-projects/
This mentions that due to String allocating dynamically, over time you might actually run into memory fragmentation that causes allocation to fail. I wonder if this is partially responsible?