CesiumGS / CesiumGS/cesium-unity
Investigate "Release of invalid GC handle" errors
- Dominant language
- C#
- Stars
- 535
- Forks
- 132
- Avg merge
- 6h 45m
- Merged PRs (30d)
- 1
Description
Install Unity Hub 3.4.2 and Unity 2021.3.25f1.
Follow the 'Cesium for Unity Quickstart" guide,
https://cesium.com/learn/unity/unity-quickstart/
1) Create a new project, use the "3D Sample Scene (HDRP)" template.
2) Add the Cesium scoped registry to the Project Settings
3) Install Cesium from the Package Manager (Cesium for Unity, Version 1.2.0 - May 09, 2023)
Note a warning in the console:
```
The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered:
Packages/com.unity.render-pipelines.highdefinition/Runtime/RenderPipelineResources/HDRenderPipelineRuntimeResources.asset
Packages/com.cesium.unity/Runtime/Resources/CesiumDefaultTilesetMaterial.mat
Packages/com.cesium.unity/Runtime/Resources/CesiumUnlitTilesetMaterial.mat
```
4) From the main menu, select Cesium -> Cesium to bring up the Cesium window (opens next to hierarchy)
5) Close Unity
6) Open your project again.
You'll see two console errors on startup.
`Release of invalid GC handle. The handle is from a previous domain. The release operation is skipped.`
The error persists every time you open your project and the Cesium Window is present.
Note: This does not happen if using the "3D Sample Scene (URP)" template
Contributor guide
Research direction
Reproduce the issue with Unity 2021.3.25f1, the 3D Sample Scene (HDRP) template, Cesium for Unity 1.2.0, and the Cesium Window open. Compare startup behavior with the URP template and inspect the two console errors after reopening the project. Done means identifying the source of the invalid GC handle errors and confirming they no longer appear in the HDRP setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100