LibFIles::ReadOffsets not having the count be the same as files
I've been recently having an error where the assert for LibFiles::ReadOffsets in LibFilesLinker.cpp has been failing for an unknown reason, normally only occuring when using one of the *compiles.bat systems, I'm partially inquiring as to if anyone else has noticed this and if there's any easy way to debug what or where the root cause can be, if need be I'll bisect the entire git repository for this.
i saw something weird the other day, but I don't know where it was or what it was, and when I tried to replicate it the problem went away. That was when using the BUILD.BAT script.
count has to match files.size();
files is populated in ReadNames() in the same file. So that is what count has to match...
ReadNames and ReadOffsets are called in sequence like this:
if (!files.ReadNames(stream, header.filesInModule))
return false;
if (fseek(stream, header.offsetsOffset, SEEK_SET))
return false;
if (!files.ReadOffsets(stream, header.filesInModule))
return false;
so that kinda indicates that either the header structure is getting corrupted somehow so that the 'count' argument for the two calls doesn't match, or there is bad code generation for one of those two functions... maybe some printfs would clarify which is happening...
This issue appears to have been resolved between commits 50e02d0115c9d25ada05c54e7354ecf69bde6b43 and 41f715d40e8ea50f96082fc120d71a21663a6ebd
I will investigate likely next week which commit it was so I can figure out what went wrong because it's working and nothing seems to have touched it
EDIT: I'm not confused because the commit I thought had the known issue doesn't?!? I'm investigating how far back I have to go to get errors at the moment but I'm not happy at being this confused for little to no reason.
EDIT 2: Found a broken commit, will bisect Soon:tm: when I find the time, I updated the commit in the original message
git bisect
should find the issue for you most easily.
any news on this?
I honestly completely forgot about this. I don't think I see the issue anymore but I haven't tested much lately as I've been focusing on implementing #embed slowly but surely
ok. I forgot you were working on #embed...
Im going to close it, please reopen if the issue resurfaces.