Search Issue Tracker
Not Reproducible
Votes
1
Found in
2018.4
2020.1.5f1
2021.1
Issue ID
1279071
Regression
No
Crash on scripting_field_get_type when a Script has List<> of LayoutKind.Explicit struct with [FieldOffset(1)] ScriptableObject
How to reproduce:
1. Open the attached project (ExplicitLayoutCrash.zip)
2. Attach the 'NewBehaviourScript' as a Component to any GameObject in the opened Scene
Reproducible with: 2018.4.27f1, 2019.4.10f1, 2020.1.5f1, 2020.2.0b3, 2021.1.0a1
First lines of the stacktrace:
0x00007ff60e3a0a2f (Unity) scripting_field_get_type
0x00007ff60e3f64f4 (Unity) LinearCollectionField::LinearCollectionField
0x00007ff60e3acc59 (Unity) EmitSerializationCommandsForLinearCollectionField
0x00007ff60e3f6e0b (Unity) BuildSerializationCommandQueueFor
0x00007ff60e3b017b (Unity) SerializationCache::WriteQueueForTransferSignatureIntoCache
0x00007ff60e3ac549 (Unity) SerializationCache::BuildSerializationCacheFor
Notes
1. Issue doesn't reproduce with other data types: Array, ArrayList, Queue<>, Stack<>, LinkedList<>, Dictionary<>, HashSet<>
2. Issue reproduces only when [FieldOffset(>0)]
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
- TextShadow properties are not applied when displayed in a custom MenuItem Window
- Memory leak occurs when focused on Player while using Direct3D12
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
Resolution Note (2021.2.X):
scripting_class_get_fields In Unity 2021.2 and 2022.1 returns a list of fields, thus this crash is no longer reproducible