Hi! I recently get this error and I was able to fix it.
The problem is that WordPress doesn’t really generate the thumbnails due a low memory limit: you can upload fully the original picture, but ajax crashes when it tries to generate thumbnails. I didn’t realized it until I explored the upload folder and the posts galleries.
Simply put something like php_value memory_limit 128M
inside the .htaccess, and regenerate the thumbnails (or upload all pics again).