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
- 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):
scripting_class_get_fields In Unity 2021.2 and 2022.1 returns a list of fields, thus this crash is no longer reproducible