Savegame here:
http://simutrans-forum.de/forum/index.php?page=Thread&postID=95846#post95846
What happens: bz2_read_bla returns an erorr code -4 (data corrupt). The fillbuffer-thread errors out. The reading thread waits infinitely for the fillbuffer thread to continue.
I do not have a quick patch :/ I think the fillbuffer thread should somehow signal the occurance of an error (setting buf_len to -1 ?). The reading thread should then react with a dbg->fatal error.
It should ideally work the same whether it is multi threaded, single threaded or unbuffered, bzipped or gzipped. As it is, read() may return either 0 or -1 on error.
There is also how to handle errors during writing. This will be a bit strange, since the error will be reported at different places depending on threading. With threading it will be detected at writing som later data, or during the final flush.
hopefully fixed in r6601