Search Issue Tracker

By Design

Votes

0

Found in

2018.4

2019.4

2019.4.1f1

2020.1

2020.2

2021.1

Issue ID

1299248

Regression

No

Crash on (mono-2.0-bdwgc) mono_gc_run_finalize non-deterministically when running a script that calls out to a native DLL

Mono

-

How to reproduce:
1. Open the attached project from "New Unity Project.zip"
2. Enter Play Mode
3. Click Button until the crash occurs (2 - 5 times)

Reproducible with: 2018.4.30f1, 2019.4.17f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a10

First lines of stack trace:
0x00007FFA72323F44 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\gc.c:257] mono_gc_run_finalize
0x00007FFA7251D9A2 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\external\bdwgc\finalize.c:1300] GC_invoke_finalizers
0x00007FFA723230B9 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\gc.c:959] finalizer_thread
0x00007FFA722E6368 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\threads.c:1042] start_wrapper_internal
0x00007FFA722E60F6 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\threads.c:1101] start_wrapper
0x00007FFAD0387C24 (KERNEL32) BaseThreadInitThunk
0x00007FFAD228D4D1 (ntdll) RtlUserThreadStart

  1. Resolution Note:

    This was due to a memory corruption caused by passing a managed array of too small a size to native code for use as a buffer.

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.