You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [#85] Track dangling references in analyze
Add a dangling_refs table and dangling_refs_view recording references
whose target object was assigned an id but never written to the objects
table because its serialized file was not part of the analyzed input
(partial bundle sets, unity default resources, ContentDirectory builds
without ContentLayout.json). Every object id now resolves to exactly one
of objects or dangling_refs.
Detection runs after all files are processed via a new
ISQLiteFileParser.FinalizeDatabase() hook: the writer reads back the
written object/file ids and records any assigned id with no objects row,
adding a serialized_files row (archive NULL) for each un-analyzed target
file so its name is available. Honors --skip-references. Schema
user_version bumped 4 -> 5.
Existing serialized_files count assertions now count analyzed files only
(equal to the previous golden values, so no ExpectedData regeneration).
* [#85] Don't record null m_GameObject as a dangling ref
The writer resolved a component's m_GameObject PPtr to an object id even
when it was null (m_FileID 0 and m_PathID 0), allocating a phantom
(file, 0) object that no row is ever written for. With dangling_refs
tracking this surfaced as confusing object_id 0 entries pointing at
already-analyzed files.
Only resolve m_GameObject when the PPtr is non-null; otherwise leave the
game_object column empty, as the no-m_GameObject branch already does. A
complete AssetBundle build now has zero dangling_refs, and every dangling
target is reachable through refs, so dangling_refs_view covers them all.
Tests assert dangling_refs has no object_id 0 rows.
* [#85] Skip null-PPtr AssetBundle container entries
Editor-only assets (ShaderSubGraph, .preset) can appear in an
AssetBundle's m_Container with a null PPtr (m_FileID 0 and m_PathID 0)
because they have no runtime object. The non-scene branch resolved that
to a phantom (file, 0) object id and wrote an assetbundle_assets row
pointing at it, which then surfaced as a false dangling reference with
object_id 0 into an already-analyzed file.
Skip container entries whose PPtr is null. assetbundle_asset_view already
dropped these rows via its INNER JOIN, so this only removes rows that
pointed at a non-existent object. Verified on a large Addressables build:
the false object_id 0 dangling refs are gone, leaving only the expected
unity default resources targets.
0 commit comments