{"record":{"id":"e180013146ac4aaa","repo":"Unity-Technologies/UnityCsReference","slug":"builtinbakedreflectionsystem","errorCode":null,"errorMessage":"BuiltinBakedReflectionSystem","messagePattern":"BuiltinBakedReflectionSystem","errorType":"exception","errorClass":"ObjectDisposedException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/Camera/BuiltinBakedReflectionSystem.bindings.cs","lineNumber":49,"sourceCode":"\n        bool disposed { get { return m_Ptr == IntPtr.Zero; } }\n\n        BuiltinBakedReflectionSystem()\n        {\n            m_Ptr = Internal_GetPtr();\n        }\n\n#pragma warning disable UA5000 // The Avoid Finalizer Analyzer produces compile errors for any new finalizers. This pre-existing finalizer declaration has been suppressed, but should be rewritten if possible.\n        ~BuiltinBakedReflectionSystem()\n        {\n            Dispose(false);\n        }\n#pragma warning restore UA5000\n\n        public void Tick(SceneStateHash dependencies, IScriptableBakedReflectionSystemStageNotifier handle)\n        {\n            if (disposed)\n                throw new ObjectDisposedException(\"BuiltinBakedReflectionSystem\");\n\n            m_Handle = handle;\n            Assert.IsNotNull(m_Handle);\n\n            Internal_Tick(dependencies);\n        }\n\n        public void SynchronizeReflectionProbes()\n        {\n            if (disposed)\n                throw new ObjectDisposedException(\"BuiltinBakedReflectionSystem\");\n\n            Internal_SynchronizeReflectionProbes();\n        }\n\n        public void Clear()\n        {\n            if (disposed)","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Camera/BuiltinBakedReflectionSystem.bindings.cs#L31-L67","documentation":"Thrown by BuiltinBakedReflectionSystem.Tick() when the instance's 'disposed' flag is true. This is the standard ObjectDisposedException pattern: after Dispose has run (including via the finalizer), any further use of the object is rejected. Tick is the per-stage update entry point used by the reflection baking pipeline.","triggerScenarios":"Calling Tick(dependencies, handle) on a BuiltinBakedReflectionSystem instance that was already disposed (Dispose(true/false) ran, setting disposed=true). Typically a stale reference retained after the baking system was torn down.","commonSituations":"Caching the reflection system reference across an editor state change that disposes it; using a reference captured before a domain reload; logic that does not clear its handle when Dispose is called.","solutions":["Track disposal state alongside the reference and stop calling Tick after Dispose.","Re-acquire the BuiltinBakedReflectionSystem instance from its owning system instead of reusing a stale reference.","Null/disposed-check before invoking Tick (or wrap in try/catch for ObjectDisposedException)."],"exampleFix":"// before\nsystem.Tick(deps, handle); // may throw if disposed\n\n// after\nif (!systemIsDisposed)\n    system.Tick(deps, handle);","handlingStrategy":"validation","validationCode":"if (!systemDisposed) system.Tick(deps, handle);","typeGuard":null,"tryCatchPattern":"try { system.Tick(deps, handle); } catch (ObjectDisposedException) { /* re-acquire system */ }","preventionTips":["Invalidate cached references on Dispose.","Re-acquire the baking system from its pipeline before use.","Avoid retaining references across domain reloads."],"tags":["unity","rendering","reflection","objectdisposed","lifecycle"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}