Broken pipe for image thumbnails

While testing Hatta on OS X Tiger (10.4) with Safari 2.0.4 I've encountered the following error when testing out the thumbnail functionality (via Image module):

Traceback (most recent call last):
  File "wsgiref/handlers.pyc", line 94, in run
  File "wsgiref/handlers.pyc", line 135, in finish_response
  File "wsgiref/handlers.pyc", line 218, in write
  File "wsgiref/handlers.pyc", line 274, in send_headers
  File "wsgiref/handlers.pyc", line 200, in send_preamble
  File "socket.pyc", line 297, in write
  File "socket.pyc", line 284, in flush
error: [Errno 32] Broken pipe

So I go to a new png page (test.png) and upload one. Then usually a preview is provided, but this time a generic unknown image icon appears and the above stacktrace happens.

When reenterring the page with broken pipe, the same generic unknown icon apperas and the following stactrace happens:

Traceback (most recent call last):
  File "wsgiref/handlers.pyc", line 94, in run
  File "wsgiref/handlers.pyc", line 134, in finish_response
TypeError: 'NoneType' object is not iterable
localhost - - [01/Nov/2009 14:43:33] "GET /+render/test.png HTTP/1.1" 500 59

Sometimes a warning dialog appears saying "Test content" and having only the OK button.

The same result on Windows, using both Firefox and Chrome, but the Test content dialog appears every time.