Have you already added this line to your config.php file? If not, please add the following line to your config.php file under the <?php line:
PHP Code:
define('SKIP_DS_ERRORS', true);
Have you tried Maintenance > General Update Tools > Rebuild Custom Avatars?
Are avatars stored in the database or filesystem? Have you tried changing that and then seeing if it fixes the issue?