Search Issue Tracker
Fixed in 0.50.0-preview.24
Votes
0
Found in [Package]
1.5.0-pre.3
Issue ID
1302586
Regression
No
Burst throws an error when Debug.Log and GetComponent are called inside Entities.ForEach loop
Reproduction steps:
1. Open the user's attached project
2. Open BurstBug Script and uncomment 12 line
3. Save the script and observe the Console window
Expected result: No errors
Actual result: Error appears
Reproducible with: 1.4.0-pre.1 - 1.5.0-pre.3 (2019.4.18f1, 2020.2.2f2, 2021.1.0b2)
Could not test with: 2018.4.30f1 (could not downgrade)
Workaround: Accessing through `ComponentDataFromEntity` directly:
```
var cdfe = GetComponentDataFromEntity<Rotation>(true);
Entities
.WithReadOnly(cdfe)
.ForEach((Entity e) =>
{
Debug.Log("blah");
var c = cdfe[e];
})
.ScheduleParallel();
```
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash with multiple stack traces when playing video on a render texture with low-end graphics devices
- Circle handle of the Game view scale slider bar disappears when the scale is set to 1x
- Asset Bundles non-deterministic behavior with CRCs and hash when a video has Transcoding enabled and Sprite Atlas has an override option enabled
- [Quality Hackweek] Errors "InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread" and "NullReferenceException" shown when switching build platforms with Muse Texture package installed
- "Importer(DefaultImporter) generated inconsistent result for asset" warnings are thrown when reimporting the "URP" texture
Resolution Note (fix version 0.50.0-preview.24):
Fixed in: 0.50.0-preview.24