We tried upgrading our project from 2017.3 to 2018.1 today. After upgrading and fixing some shader upgrade errors, we get an unknown IL2CPP error. We’re using the new 4.x runtime, but the error persists in 3.5. The Mono build of the project is working fine, with both versions of the runtime.
The biggest problem is, the error displayed is an error in the error-displaying code of IL2CPP. So we have no idea which assembly is breaking the build or why. AFAIK the IL2CPP program does not output its internal logs anywhere, so we can’t see what is breaking. The process builds the assemblies, goes through stripping but fails for unknown reasons when trying to generate C++ code.
Error message returned by editor:
https://pastebin.com/raw/yXu14sfz
EDIT:
Further investigation, after decompiling il2cpp reveals this exception being thrown:
https://pastebin.com/raw/jDhuEPAp
Still don’t know which assembly causes this.
EDIT 2:
This is the code that is causing the error:
https://pastebin.com/raw/FfTuB8Mx
Can someone tell me IL2CPP doesn’t accept this in 2018.1?