Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
Votes
0
Found in
2018.4
2019.4
2020.2
2020.2.2f1
2021.1
2021.2
Issue ID
1312890
Regression
No
[Mono] Unity crashes when calling FindObjectsOfType() with a generic abstract class type that derives from MonoBehaviour
How to reproduce:
1. Open the attached "1312890 repro" project
2. Open the "SampleScene" Scene from the Assets folder
3. Enter Play Mode
Expected results: Unity doesn't crash
Actual results: Unity crashes
Reproducible with: 2018.4.32f1, 2019.4.22f1, 2020.2.6f1, 2021.1.0b9, 2021.2.0a7
Notes:
-The issue only reproduces with the Mono Scripting backend (.NET 4.x and .NET Standard 2.0 Api Compatibility levels). Using the IL2CPP Scripting backend with .NET 4.x or .NET Standard 2.0 doesn't reproduce the issue
-On 2019.4 and 2018.4 streams the Editor and Player crash without a stack trace, only this message:
compute_class_bitmap: Invalid type 13 for field EventListener`1[T]:test
Comments (2)
-
zymcxj
Apr 12, 2021 06:45
where is the attached project?
-
Pajlot
Mar 16, 2021 10:57
Thank you very much!
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
- “FocusController has unprocessed focus events.” warnings are thrown after adding iOS, tvOS or visionOS Build Profiles
- Holes and different colors appear on default Tree Materials after applying them to the Tree GameObject and undoing changes
- Error indicating that the Text Asset Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
- Documentation installation shows "Install failed: Validation Failed" when installing Android Build Support module
- Error indicating that the Package Manifest Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
Resolution Note (fix version 2021.2):
Fixed crash that was caused by passing a generic type into FindObjectsOfType
Fixed in 2021.2.0a10
Resolution Note (fix version 2021.1):
Fixed in 2021.1.7f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.10f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.29f1