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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
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.