Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

0

Found in

2019.4

2020.3

2020.3.0f1

2021.1

2021.2

Issue ID

1322471

Regression

No

Crash on mono_gc_wbarrier_range_copy when reimporting changed script

Mono

-

How to reproduce:
1. Open the attached project from "case_1322471.zip"
2. Open scene "SeaGauntlet" under "Assets/Scenes"
3. Enter Play Mode
4. Open any script (e.g "DropdownEditor.cs") with VS and add a line of code (e.g. "int b;")
5. Click back on the Editor in order for the recompilation to begin

Reproducible with: 2019.4.23f1, 2020.3.2f1, 2021.1.1f1, 2021.2.0a11
Couldn't test with: 2018.4.33f1 (project serialization issues)

First lines of stack trace:
0x00007ff96adc8608 (mono-2.0-bdwgc) [boehm-gc.c:1741] mono_gc_wbarrier_range_copy
0x000001d17bb410a3 (Mono JIT Code) [DroneManager.cs:41] DroneManager:Update ()
0x000001d17bbf9420 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ff96adde480 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
0x00007ff96ad62902 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
0x00007ff96ad6b95f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke

Note:
1. Couldn't reproduce on a clean project

  1. Resolution Note (2021.2.X):

    Spent some time investigating this. The focal point of the issue is that the user's singleton isn't getting initialized early enough and is being used while it's null after a domain reload. This runs into a bug within mono that deals with the destination of a NativeArray creation being null doesn't have sufficient error checking. Unfortunately we do not have time to address this bug immediately and will investigate once we finish the mono upgrade.

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.