Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2018.3.0b9
Issue ID
1104214
Regression
No
[IL2CPP] The Obfuscator plugin causes Build to fail and prints unclear Stack Trace
To reproduce:
1. Download attached project "ObfuscationRepro3 2.zip" and open in Unity
2. Press File > Build Settings...
3. Switch platform to Standalone, iOS or Android
4. Set Scripting Backend to IL2CPP
5. Press the Build button
6. Observe that Build fails
7. Inspect Console
Expected results: You will see a proper Stack Trace and you can backtrace what's going wrong
Actual results: You will see an unclear Stack Trace:
IL2CPP error for type 'PROJECTNAME.Exercise.ExerciseEvent' in PROJECTPATH/Assets/Libraries/MusicRepresentations/Exercise/ExerciseEvent.cs:82
Additional information: The given key was not present in the dictionary.
il2cpp.exe didn't catch exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Unity.IL2CPP.Metadata.VTableBuilder.OverrideInterfaceMethods(Dictionary`2 interfaceOffsets, List`1 slots, Dictionary`2 overrides, Dictionary`2 overrideMap)
Notes:
- If you change Scripting Backend to Mono everything will work fine
- Building with Obfuscation disabled works fine, so this is clearly an error there, but it'd be nice to get a better error message
- Could not check on Unity 2018.1 and 2018.3.0b12 because project becomes corrupted
Reproduced on Unity 2017.4.0f1, 2017.4.16f1, 2018.2.18f1, 2018.3.0b9 and 2019.1.0a10
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
- "IndexOutOfRangeException" and "NullReferenceException" are thrown and Element disappears from UI Builder when undoing rename of element in "Open Instance in Context" menu
- Select Scriptable Object window freezes and becomes unresponsive when currently opened UXML Template is selected for binding's Data Source
- [Linux] “ReleaseButton expects buttonId >= 0” error is thrown when importing Assets via drag and drop
- Asset gets unselected and added Subgraphs list item is not undone when performing Undo in Heatmap with Default Values asset Inspector
- Black square “shadow” artifacts visible when using Screen Space Reflections without maximum smoothing
Resolution Note:
IL2CPP is not a good IL verification tool. It assumes it gets valid IL as input. Instead, I'd recommend using peverify, which is an IL verification tool, to ensure that the obfuscated assembly is valid IL. In this case, the input IL to IL2CPP is not valid, hence the error.