Search Issue Tracker


Fixed in 2021.3.9f1, 2022.1.16f1, 2022.2.0b8, 2023.1.0a6



Found in


Issue ID




[IL2CPP] New() operator causes a NullReferenceException error in a build



Reproduction steps:
1. Open the attached project “ReproducibleExample (2).zip”
2. Go to Build Settings and enable Development Build
3. Set Scripting Backend to IL2CPP
4. Build And Run the project

Expected result: The build doesn’t have any errors
Actual result: The build has an error - “NullReferenceException: Object reference not set to an instance of an object.
at ProjectRunner.ShowInfo () \[0x00000] in <00000000000000000000000000000000>:0”

Reproducible with: 2021.3.4f1
Could not test with: 2019.4.40f1, 2020.3.36f1, 2021.1.28f1, 2022.1.5f1, 2022.2.0a17 (namespace error)

Reproducible on: macOS 12.4

  1. Resolution Note (fix version 2022.2.0b8):

    Fixed in: 2022.2.0b8

  2. Resolution Note (fix version 2021.3.9f1):

    Fixed in: 2021.3.9f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.