Search Issue Tracker
By Design
Votes
1
Found in
2018.2.0a5
2018.3.0b10
Issue ID
1109313
Regression
No
[iOS][IL2CPP] DescriptorValidationException is thrown when using the C# Protobuf library and compiling the Code
To reproduce:
1. Download attached project “2018.3.0b10.zip" and open in Unity
2. Open “SampleScene” scene
3. Enter Play mode and observe that Console prints two Logs:
Message:
UnityEngine.Debug:Log(Object)
Test:Start() (at Assets/Test.cs:17)
{ "code": "PIT-000", "msg": "GetError is returning a custom error" }
UnityEngine.Debug:Log(Object)
Test:Start() (at Assets/Test.cs:18)
4. Exit Play mode
5. Build for iOS
6. Deploy the Xcode project to iOS Device
7. Observe that DescriptorValidationException is thrown in Console
Notes:
- This issue does not appear on Windows and macOS Standalone (IL2CPP)
- Could not check on Unity 2018.1 and earlier than 2018.2.0a5 because project becomes corrupted
Tested with:
- iPhone 7s Plus, iOS: 12.0 - Reproduced
- iPhone X, iOS: 11.3.1 - Reproduced
Reproduced on Unity 2018.2.0a5, 2018.2.20f1, 2018.3.1f1 and 2019.1.0a13
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
- Duplicate External Textures start appearing when a Texture created with "CreateExternalTexture" is modified causing Memory Usage spikes on VisionOS
- Silent crash when using a "Blend Shape" in a "Skinned Mesh Renderer" to move vertices to Vector3.positiveInfinity, and "Occlusion Culling" is baked
- Some Prefab Source and Override content bounds are misaligned
- The Package Manager's "install packages by..." panels break when Domain Reload is triggered, and the panel is open
- Crash with multiple stack traces when leaving a docked VFX Graph open
Resolution Note:
The problem here is that part of the Google.Protobuf.dll assembly which is used only via reflection is removed by the Unity managed bytecode stripping process. For IL2CPP, Unity always enables managed bytecode stripping, so you will need to indicate that the Google.Protobuf.dll assembly should not be modified.
This is possible by placing a link.xml file in the Assets/ folder of the project with the following content:
<linker>
<assembly fullname="Google.Protobuf" preserve="all"/>
</linker>
You can find out more information about the link.xml file here: https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html