Search Issue Tracker

Fixed in 1.4.4

Votes

1

Found in [Package]

1.4.3

Issue ID

1295553

Regression

No

NullReferenceException is thrown when calling Sqlite.dll method that uses IntPtr as a parameter with Burst Compilation enabled

Package: Burst

-

How to reproduce:
1. Open the attached project (case-1295553.zip)
2. Make sure that Burst Compilation is enabled (Jobs -> Burst -> Enable Compilation)
3. Open the SampleScene
4. Enter Play Mode
5. In the Game View click the buttons 'Run' and 'Run with IntPtr'

Expected result: no exceptions occur when running both methods that are called by the buttons
Actual result: depending on the Burst version both methods or only 'Run with IntPtr' causes a NullReferenceException (or other exceptions)

Reproducible with: 2018.4.29f1, 2019.4.16f1, 2020.1.16f1, 2020.2.0b14, 2021.1.0a8 (1.1.1, 1.4.3)

Notes:
- The issue does not occur when Burst Compilation is disabled
- Full exception: 'System.NullReferenceException: Object reference not set to an instance of an object'
- In version 1.3.1 'Run' method works as expected while in 1.3.0 it causes NullReferenceException as well
- Version 1.1.1 throws these exceptions when trying to run both methods: 'InvalidOperationException: Burst compilation cannot be scheduled during a domain reload' and 'Assertion failed on expression: 'exception == SCRIPTING_NULL''
- In 2021.1 this exception is thrown as well: 'UnityEngine::UnityException: get_isPaused can only be called from the main thread'
- In 2018.4 this exception is thrown when entering Play Mode: 'InvalidOperationException: Burst failed to compile the function pointer `Int32 DoGetCSRTrampoline()`'

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.