diff --git a/3rdparty/bzip2/wscript b/3rdparty/bzip2/wscript index e8e81f30..cb4973f0 100644 --- a/3rdparty/bzip2/wscript +++ b/3rdparty/bzip2/wscript @@ -21,8 +21,10 @@ def build(bld): # BZ_VERSION='1.1.0-fwgs' # ) + bz_sources = ['bzip2/blocksort.c', 'bzip2/huffman.c', 'bzip2/crctable.c', 'bzip2/randtable.c', 'bzip2/compress.c', 'bzip2/decompress.c', 'bzip2/bzlib.c'] + bld.stlib( - source = bld.path.ant_glob(['bzip2/*.c']), + source = bz_sources, target = 'bzip2', # use = 'bz_version.h', features = 'c', diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index e41a5537..0bc0976c 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -104,6 +104,51 @@ const char *ns_strings[NS_COUNT] = "Server", }; +void bz_internal_error( int errcode ); +void bz_internal_error( int errcode ) +{ + Con_Printf( S_ERROR "bzip2/libbzip2: internal error number %d.\n" + "This is a bug in bzip2/libbzip2, %s.\n" + "Please report it at: https://gitlab.com/bzip2/bzip2/-/issues\n" + "If this happened when you were using some program which uses\n" + "libbzip2 as a component, you should also report this bug to\n" + "the author(s) of that program.\n" + "Please make an effort to report this bug;\n" + "timely and accurate bug reports eventually lead to higher\n" + "quality software. Thanks.\n\n", + errcode, BZ2_bzlibVersion( )); + + if (errcode == 1007) { + Con_Printf( + "\n*** A special note about internal error number 1007 ***\n" + "\n" + "Experience suggests that a common cause of i.e. 1007\n" + "is unreliable memory or other hardware. The 1007 assertion\n" + "just happens to cross-check the results of huge numbers of\n" + "memory reads/writes, and so acts (unintendedly) as a stress\n" + "test of your memory system.\n" + "\n" + "I suggest the following: try compressing the file again,\n" + "possibly monitoring progress in detail with the -vv flag.\n" + "\n" + "* If the error cannot be reproduced, and/or happens at different\n" + " points in compression, you may have a flaky memory system.\n" + " Try a memory-test program. I have used Memtest86\n" + " (www.memtest86.com). At the time of writing it is free (GPLd).\n" + " Memtest86 tests memory much more thorougly than your BIOSs\n" + " power-on test, and may find failures that the BIOS doesn't.\n" + "\n" + "* If the error can be repeatably reproduced, this is a bug in\n" + " bzip2, and I would very much like to hear about it. Please\n" + " let me know, and, ideally, save a copy of the file causing the\n" + " problem -- without which I will be unable to investigate it.\n" + "\n" + ); + } + + Sys_Error( "bzip2/libbzip2: internal error number %d\n", errcode ); +} + /* =================================