Skip to content

fix(P76): guard GLTF instantiation from asset bundle#9402

Closed
eordano wants to merge 1 commit into
decentraland:devfrom
eordano:chore/clean-gltf-ab-instantiate-guard
Closed

fix(P76): guard GLTF instantiation from asset bundle#9402
eordano wants to merge 1 commit into
decentraland:devfrom
eordano:chore/clean-gltf-ab-instantiate-guard

Conversation

@eordano

@eordano eordano commented Jul 17, 2026

Copy link
Copy Markdown
Member

UNITY-EXPLORER-P76 (4911 evts/68 users — #1 issue): EcsSystemException [CreateGltfAssetFromAssetBundleSystem]. The success branch of ConvertFromAssetBundle calls Utils.TryCreateGltfObject (Object.Instantiate + GetComponentsInChildren), which can throw when the asset bundle's underlying Unity object was destroyed/unloaded (ref-counted bundle evicted) — TryGetAsset only checks the C# list, not Unity-liveness, so it hands back a fake-null object. The throw escaped Update and surfaced as a wrapped EcsSystemException. Wrap in try/catch and emit a failed StreamableLoadingResult (mirroring the existing else-branch), which downstream finalize systems already handle. Uses only symbols already in scope (no new usings). Unverified (no Unity build).

UNITY-EXPLORER-P76 (4911 evts/68 users — decentraland#1 issue): EcsSystemException
[CreateGltfAssetFromAssetBundleSystem]. The success branch of ConvertFromAssetBundle
calls Utils.TryCreateGltfObject (Object.Instantiate + GetComponentsInChildren),
which can throw when the asset bundle's underlying Unity object was destroyed/unloaded
(ref-counted bundle evicted) — TryGetAsset only checks the C# list, not Unity-liveness,
so it hands back a fake-null object. The throw escaped Update and surfaced as a wrapped
EcsSystemException. Wrap in try/catch and emit a failed StreamableLoadingResult (mirroring
the existing else-branch), which downstream finalize systems already handle. Uses only
symbols already in scope (no new usings). Unverified (no Unity build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>



Production evidence (decentraland Sentry, archive snapshot 2026-07-17):
- UNITY-EXPLORER-P76: 5999 events / 71 users, last seen 2026-07-17
@eordano
eordano marked this pull request as ready for review July 17, 2026 13:03
@eordano
eordano requested review from a team as code owners July 17, 2026 13:03
@eordano eordano added the force-build Used to trigger a build on draft PR label Jul 17, 2026
@eordano

eordano commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Superseded by #9416 — branch moved into the org repo so CI workflows get repository secrets.

@eordano eordano closed this Jul 17, 2026
@eordano
eordano deleted the chore/clean-gltf-ab-instantiate-guard branch July 17, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

force-build Used to trigger a build on draft PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant