Zip files with comments trip assertion on game startup
|Reported by:||Teiresias||Owned by:|
|Priority:||Nice to Have||Milestone:||Alpha 24|
Placing a .zip file with a "zip file comment" below the
$0AD-HOME/binaries/data/mods/public folder (so the pyrogenesis engine will scan it) causes a startup assertion to fire on all of my machines. On Windows, it said "(error while formatting error message)" while on Linux and FreeBSD it reports an assertion in
archive_zip@500 has tripped.
The attached test.zip file trips the problem on my machines when placed e.g. in
$0AD-HOME/binaries/data/mods/public/simulation/ai, and was built using the
buildzipwithcomment.sh file inside that archive.
Note: The actual zip command was created using the
zipnote utility. The tool crashed on both Linux and FreeBSD for me, so I fetched the source from ftp://ftp.info-zip.org/pub/infozip/src/zip30.tgz and debugged into it. It seems that the
fclose(x); instruction in zipnote.c:666 is trying to close a file already closed in zipnote.c:552, and my stdlibs seem unforgiving to it. So I patched the
zipnote.c and used that to create the comment. That's why the
buildzipwithcomment.sh explicitly calls
(I actually encountered this problem during AI breeding as the jasmine archive is a commented zip file, and destilled it down to the test.zip)