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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.