Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4
2020.1.8f1
2020.3
2021.1
2021.2
Issue ID
1321210
Regression
No
FieldOffset "Reference typed field has explicit offset that is not pointer-size aligned" error doesn’t point the location
Full Title: FieldOffset "Reference typed field has explicit offset that is not pointer-size aligned" error doesn’t point the location in the script
Reproduction steps:
1. Open the attached "1321210test.zip" project and enter the "SampleScene"
2. Press play
3. Observe the console
Expected result: The error in the console points to the faulty line in the script
Actual result: The error doesn't point to any line in the script
Reproducible with: 2018.4.33f1, 2019.4.23f1, 2020.3.3f1, 2021.1.1f1 2021.2.0a11
Error:
TypeLoadException: Reference typed field 'aa' has explicit offset that is not pointer-size aligned.
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (2021.2.X):
This is a runtime error not a compile time error. We currently report the field with the invalid layout. We cannot report file or line number information as a) debug information is tied to methods, not field declarations b) we may not be running with debug information available.