Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.4.1f1
2020.2
Issue ID
1258593
Regression
No
[Android] NullReferenceException on Serialization.CodeGenerator.Call due to stripping level being set to low
Reproduction steps:
1. Open the user's attached project "XmlSerializeNullRef.zip"
2. Build for Android
Expected result: Scene displays "Success" text
Actual result: A NullReferenceException text is being shown instead (See attached LogcatNullReference.txt)
Reproduces on: 2018.4.24f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a16
Reproduces with:
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00313, Huawei Y6 Ⅱ Compact (HUAWEI LYO-L01), Android 5.1, CPU: MediaTek MT6735, GPU: Mali-T720
Notes:
-Preserve tags have been added to the "Link.xml"
-Issue does not appear if Stripping Level is set to Disabled
-NullReferenceException is only outputted when building in Mono
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
Resolution Note (2020.2.X):
There is quite a bit of reflection being used in System.Xml and mono and il2cpp work differently here.
In il2cpp in current project the error happens because TestIXmlSerializable.GetSchema() returns new object and does not set Id on it. Change method to return null and "success" is printed on screen.
For mono, disable the stripping. You can't ship new games using mono anyway.