I was getting this same error (our maintenance script stopped running after a server crash). I was able to fix this by checking our mysql tables. turns out a few were corrupted. i did a repair and started getting stats again. hope that helps someone.