Unity Issue Tracker - SubScene baking breaks with the "SelectManagedFn failed to cast Unity.Burst.FunctionPointer" warning when reloading domain with multiple workers
Fixed
UUM-87193
SubScene baking breaks with the "SelectManagedFn failed to cast Unity.Burst.FunctionPointer" warning when reloading domain with multiple workers
Unity: Mono
Fixed
6.1.X
6.0.X
2022.3.X
Fixed InvalidCastExceptions occasionally being thrown by entity workers after a domain reload.
Fixed InvalidCastExceptions occasionally being thrown by entity workers after a domain reload.
Fixed InvalidCastExceptions occasionally being thrown by entity workers after a domain reload.
Reproduction steps:
1. Open the attached “repro_IN-88591“ project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. In the Editor window overlay, select “REPRODUCE THE BUG → EXECUTE“
4. Observe the Console
Expected result: No warnings appear
Actual result: “[Worker<…>] SelectManagedFn failed to cast Unity.Burst.FunctionPointer`1[Unity.Entities.SystemBaseRegistry+ForwardingFunc]. BurstFn: <…>.Forwarding Func: Unity.Entities.SystemBaseRegistry+ForwardingFunc. Falling back to managed delegate. Please report this as a bug using Help > Report a Bug...“ warning appears
Reproducible with: 1.8.18 (2022.3.52f1, 6000.0.27f1, 6000.1.0a4)
Couldn’t test with: 1.8.18 (2021.3.46f1) - Not able to launch the project due to compilation errors while downgrading
Reproducible on: Windows 10 (22H2)
Not reproducible on: No other environments tested
Notes:
If the warning doesn’t appear, repeat the 3rd step
The reproduction rate varies: reporter’s rate is around 80%, my rate while testing is around 30%
My hardware: Intel i9-10980HK, RTX 3080 (used core count: 16)
According to the reporter, to maximize the chance of reproduction, ensure you use a CPU with a high core count
Make sure that the “Desired Import Worker” count is high in the “Project Settings… -> Editor -> Asset Pipeline”
According to the reporter, the “Exception thrown during SubScene import: System.InvalidCastException: Specified cast is not valid.“ error sometimes appears instead of the “SelectManagedFn failed to cast Unity.Burst.FunctionPointer“ warning
Prioritise and Follow this issue
Have a workaround or additional info about this issue?