Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ahead of time (AOT) code was generated. ( IL2CPP scripting backend) #220

Open
Vah94 opened this issue Dec 23, 2021 · 10 comments
Open

No ahead of time (AOT) code was generated. ( IL2CPP scripting backend) #220

Vah94 opened this issue Dec 23, 2021 · 10 comments

Comments

@Vah94
Copy link

Vah94 commented Dec 23, 2021

Hi guys. Cant run an example on the Android platform after update 2.9.8 (Unity 2020.3.25f1 (64-bit))

ExecutionEngineException: Attempting to call method 'System.Linq.Expressions.Interpreter.LightLambda::MakeRun1<System.Int32,System.Boolean>' for which no ahead of time (AOT) code was generated.

@davideicardi
Copy link
Member

Do you get this error just for a particular expression? Or for all?
Can you provide some way to reproduce the problem locally?

@Vah94
Copy link
Author

Vah94 commented Dec 23, 2021

Hi @davideicardi, an error was acquired for all examples. Is there any way, settings I need to change for the Android build?

@davideicardi
Copy link
Member

davideicardi commented Dec 23, 2021

@Vah94
Sorry, I'm not expert at all on Android platform. I assume that you use it inside Unity. Correct?
Which version?

Can you provide us a way to reproduce the problem in a linux or win machine? Otherwise for us can be difficult to fix the issue.

@metoule
Copy link
Contributor

metoule commented Dec 24, 2021

@Vah94 you said it stopped working after the migration to 2.9.8, did it work with a previous version of DynamicExpresso? If you could find the last version where it worked, it would help us find what could cause the issue.

@Vah94
Copy link
Author

Vah94 commented Dec 24, 2021

The problem can be reproduced by building with an IL2CPP scripting backend.
image

@Vah94
Copy link
Author

Vah94 commented Dec 24, 2021

Hi @metoule, previous version is 2.9.3

@Vah94 Vah94 changed the title ExecutionEngineException: Attempting to call method No ahead of time (AOT) code was generated. ( IL2CPP scripting backend) Dec 24, 2021
@metoule
Copy link
Contributor

metoule commented Jan 3, 2022

Hi @Vah94, happy new year! Just to confirm, it worked with 2.9.3, but failed with 2.9.4?

@Vah94
Copy link
Author

Vah94 commented Feb 9, 2022

TestProject(2D).zip
Hi @metoule :D Could you check the attached project?

@wangjingtiankl
Copy link

Not sure if people are still interested in this topic. I just ran into the same problem. And I found the reason why it happened but could not find any solution. Tried linker.xml as recommended by documentation, it did not work (might be me doing it wrong).

Here is why:
When building with IL2CPP in Unity, some code will be automatically stripped if the engine does not find any usage of the code in your project. If you change to Mono which does not strip any code, it should probably work as fine.

@davideicardi
Copy link
Member

I can try to help, but as you can immagine it can be difficult to understand for us.

Here are the changes between 2.9.3 and 2.9.4: v2.9.3...v2.9.4

@Vah94 Can you confirm that these are the versions affected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants