0

IL2CPP encountered a managed type which it cannot convert ahead-of-time

Juliean 7 months ago updated 2 days ago 2

Here at work we are regularly encountering startup errors when building for the IL2CPP-platform. App hangs directly after unity logo fades, error log shows the following output (only in the device logs):

Crashlog.txt

This is usually resolved by reverting some of our recent changes, ie. we had to remove an app-rating plugin once, or the other time we actually had to convert a timeline animation to a regular animator. None of which actually involves any heavily generic or otherwise nested types that should cause this issue.

Now aside from resolving the actual reason, would it be at all possible to instrument this error condition with more information? We'd be interested in the actual type that is causing this problem, so that we will have to spend less time trying to find out what caused the error this time.

(As a side note, we had a very persistent occurance of this error lately, which was only resolved by updating bolt from 1.4.2 to 1.4.4, only to reappear a week afterwards as of today. Also, its happening on both iOS and Android, and we do perform the AotPrebuild often, which is usually the catalyst for the error appearning - meaning it will just stop working after we updated the AotStubs with the prebuild step)

Thanks!

Bolt Version:
1.4.4
Unity Version:
2018.4.2f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Same happens to me!

log.txt

In my case, removing Odin Inspector resolve the problem 1 week ago, but the problem happens without Odin Inspector today.

Is it Full Serializer problem?

https://github.com/jacobdufault/fullserializer/issues/157

Interesting, we are using Odin Inspector as well.

I was able to circumenvent the issue way simplier though. We are now shipping a custm debug-build of Bolt from Source. That somehow seems to fix the issue as well. Custom release-build only seems to work sporadically. Thankfully in our case we are not experiencing any performance issues even on our low-end target hardware, so that may be a thing can consider doing as well.