Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.3.X, 2022.1.X
Votes
8
Found in
2019.4
2020.3
2021.2
2021.2.15f1
2022.1
2022.2
Issue ID
1411455
Regression
No
[IL2CPP] Calling .GetHashCode on instances of empty structs does not return the same value in IL2CPP builds
Reproduction steps:
1. Open the attached project "My project.zip"
2. Make sure the Scripting Backend is set to IL2CPP
3. Build and run on an Android device
4. Observe the AndroidLogcat logs
Expected result: Empty Struct GetHashCode returns True
Actual result: Empty Struct GetHashCode returns False
Reproducible with: 2019.4.37f1, 2020.3.31f1, 2021.2.16f1, 2022.1.0b12, 2022.2.0a8
Reproducible with these devices:
VLNQA00176, Xiaomi Redmi 4 (Redmi 4), Android 6.0.1, CPU: Snapdragon 430 MSM8937, GPU: Adreno (TM) 505
----------, Huawei - (ELS-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00264, Samsung Galaxy S10+ (SM-G975F), Android 10, CPU: NOT FOUND, GPU: Mali-G76
Notes:
-Following the same steps with Mono results in the Empty Struct GetHashCode to return True which is the expected result
-Everything seems to be fine for structs with fields
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 on UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
- Root motion is not reapplied when transitioning from an animation without root motion to an animation with root motion
Resolution Note (fix version 2022.1):
Fixed in Unity 2022.1.1f1
Resolution Note (fix version 2021.3):
Fixed in 2021.3.4f1
Resolution Note (fix version 2020.3):
Fixed in Unity 2020.3.35f1