| 1 |
#include "bzlib.h" |
| 2 |
#include <windows.h> |
| 3 |
|
| 4 |
void bz_internal_error ( int errcode ) |
| 5 |
{ |
| 6 |
char error[2048]; |
| 7 |
|
| 8 |
wsprintf(error, |
| 9 |
"libbzip2: internal error number %d.\n" |
| 10 |
"This is a bug in libbzip2, %s.\n" |
| 11 |
"Please report it to: [email protected]. If this happened\n" |
| 12 |
"when you were using some program which uses libbzip2 as a\n" |
| 13 |
"component, you should also report this bug to the author(s)\n" |
| 14 |
"of that program. Please make an effort to report this bug;\n" |
| 15 |
"timely and accurate bug reports eventually lead to higher\n" |
| 16 |
"quality software. Thanks.\n\n", |
| 17 |
errcode, |
| 18 |
BZ2_bzlibVersion() |
| 19 |
); |
| 20 |
MessageBox(0, error, "Double Commander", MB_OK | MB_ICONERROR); |
| 21 |
|
| 22 |
if (errcode == 1007) |
| 23 |
{ |
| 24 |
wsprintf(error, |
| 25 |
"*** A special note about internal error number 1007 ***\n" |
| 26 |
"\n" |
| 27 |
"Experience suggests that a common cause of i.e. 1007\n" |
| 28 |
"is unreliable memory or other hardware. The 1007 assertion\n" |
| 29 |
"just happens to cross-check the results of huge numbers of\n" |
| 30 |
"memory reads/writes, and so acts (unintendedly) as a stress\n" |
| 31 |
"test of your memory system.\n" |
| 32 |
"\n" |
| 33 |
"I suggest the following: try compressing the file again,\n" |
| 34 |
"possibly monitoring progress in detail with the -vv flag.\n" |
| 35 |
"\n" |
| 36 |
"* If the error cannot be reproduced, and/or happens at different\n" |
| 37 |
" points in compression, you may have a flaky memory system.\n" |
| 38 |
" Try a memory-test program. I have used Memtest86\n" |
| 39 |
" (www.memtest86.com). At the time of writing it is free (GPLd).\n" |
| 40 |
" Memtest86 tests memory much more thorougly than your BIOSs\n" |
| 41 |
" power-on test, and may find failures that the BIOS doesn't.\n" |
| 42 |
"\n" |
| 43 |
"* If the error can be repeatably reproduced, this is a bug in\n" |
| 44 |
" bzip2, and I would very much like to hear about it. Please\n" |
| 45 |
" let me know, and, ideally, save a copy of the file causing the\n" |
| 46 |
" problem -- without which I will be unable to investigate it.\n" |
| 47 |
"\n" |
| 48 |
); |
| 49 |
MessageBox(0, error, "Double Commander", MB_OK | MB_ICONERROR); |
| 50 |
} |
| 51 |
} |