Repository navigation
Conversation
Every format used the mapping name COMMONLIB_IDDB_OFFSETS_<version>, and FMemoryMap opens an existing mapping of that name before mapping its own file. v2 loaders keep sorted id/offset pairs there, while v5 maps the raw file and reads a u32 array after the header. If a plugin whose loader got a v2 table created the mapping first, every v5 plugin read that pair table as offsets: half of the valid ids came back as 0 ("Failed to find offset") and the other half as wrong addresses. In the other order the v2 plugin could not map its table.
Use COMMONLIB_IDDB_OFFSETS_V5_<version> for v5, and fail with a clear message if the mapped header does not match the file.
Contributor
|
If CompaSSE is breaking other plugins, then CompaSSE needs to be updated to not do that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A v5 plugin can read another plugin's v2 id/offset table as its offset array, because every format shares one mapping name. That gives "Failed to find offset" for ids that are in the Address Library, or silently wrong addresses.
Reported on Base Object Swapper's page on 1.7.104 (Nexus thread):
As powerof3 pointed out there, 401203 is in the 1.7.104 database: the official
versionlib-1-7-104-0.binmaps it to0x31DFB70.Why
load_v2,load_v0andload_v5all useCOMMONLIB_IDDB_OFFSETS_<game version>, andFMemoryMap::createopens an existing mapping of that name before mapping its own file. So the first plugin to load decides what every later plugin reads.{ id, offset }pairs there. v5 maps the raw file and readsdata + 0x60as astd::uint32_tarray.REL/IDDB.cpp(459): race compatibility-skse.dll Failed to find offset ... invalid ID: 400475 ... 1.7.104.0, gone after removing CompaSSE (comment). An earlier report of every SKSE plugin failing this way was traced by its author to "outdated custom data that CompaSSE.exe builds for !CompaSSE.dll to utilize when it runs old mods alongside new ones" (comment).load_v5does: of the 435,162 ids in the file, 217,576 read as 0 (the error above; 401203 is one of them) and 217,586 read as a wrong non-zero offset, which is worse because nothing reports it.Changes
load_v5uses its own name,COMMONLIB_IDDB_OFFSETS_V5_<game version>, so v5 plugins share a mapping only with each other.load_v5checks that the mapped header matches the file it read, and fails with a message that says the mapping came from another plugin instead of the misleading "needs to be recompiled".v0/v2 keep the old name, so they still share with older builds of the same format.
Testing