On Fri, 2006-12-29 at 20:20 -0700, Richard wrote:
When doing makedoc= to get a help file, I get a failed assertion:
assert(t<80);
after it reads in the one-byte length of an ID. The value comes back as 118. (The length of the id field in the structure is 81 bytes, so...) This is while formatting page 234, line 47, so its quite a ways into the document.
The assertion is in the PD_GET_CONTENT case of print_doc_get_info.
I added an assertion in the help compiler to assert that the length of IDs it writes out are < 80 and that assertion didn't fail.
Unless you've defined XFRACT, SHOW_ERROR_LINE will be defined in hc.c. This and the fact that is sounds like you have gotten way past the place where hc.exe runs, would indicate the problem isn't here.
So that tells me that the help file is most likely correct, but the new fractint code is doing something wrong when reading it. I've bumped into a couple of these situations where offsets are computed from magic numbers relating to the size of 16-bit ints instead of using sizeof(int).
The code that reads in the help file is in help.c.
It looks like hc.c is writing out 4-byte integers everywhere that it used to write out 2-byte integers because it uses sizeof() to compute lengths of data to be written.
Take a look at lines 802 and 1560 in help.c (there is a caste to different integer types on these lines). We could be asking to allocate more memory than we can physically get. Jonathan