Search Issue Tracker

By Design

Votes

0

Found in

2019.2.0b2

Issue ID

1159837

Regression

No

[IL2CPP] Application crashes at vdso while creating WeakReference when built with IL2CPP & C++ Compiler Configuration = Debug

IL2CPP

-

To reproduce:
1. Open attached project
2. Make sure player settings are set as below:
Scripting Backend = IL2CPP
C++ Compiler Configuration = Debug
3. Build and run to the device

Actual result: application crashes
Expected result: the application should not crash

Reproduced in:2017.4.29f1; 2018.4.2f1;2019.1.7f1; 2019.2.0b6; 2019.3.0a6

Tested with:
VLNQA00123, Google Pixel 2 XL (Pixel 2 XL), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00266, Xiaomi Mi A2 (Mi A2), Android 8.1.0, CPU: Snapdragon 660, GPU: Adreno (TM) 512
VLNQA00093, Samsung Galaxy S6 edge (SM-G925F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760

Note: does not reproduce with Mono Scripting Backend
Note: does not reproduce with C++ Compiler Configuration set to Release or Master
Note: logcat attached

  1. Resolution Note:

    The code in this case is hitting an unsupported feature in IL2CPP. The script code calls the WeakReference constructor with a second argument of true (this is the trackResurrection parameter). IL2CPP does not support resurrection of WeakReference objects. See the Microsoft documentation for more details:

    https://docs.microsoft.com/en-us/dotnet/api/system.weakreference.-ctor?view=netframework-4.8#System_WeakReference__ctor_System_Object_System_Boolean_

    Please pass this argument with a value of false to work around this problem.

Comments (1)

  1. NeverTrustShadows

    Nov 29, 2021 06:57

    Isn't there any crash log or something associated with this issue? That title really doesn't help, it feels like a clickbait as it is.

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.