Unity Bug

Vector reflection fails despite link.xml stripping preservation

pdabrowski 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 9


As mentioned in the header, i've encountered a problem with running a build that was made via IL2CPP scripting backend. I made the AOT pre-build part, the AOT stubs where created, but I still recieve an error: "JIT is not supported on this standalone build" (and a lots of deserialization errors) after running the build.

Output log from the build: output_log.txt

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Satisfaction mark by pdabrowski 2 years ago
Pending Review

Hi Prezemyslaw,

Sorry about the issue and thanks for the report.

Can you update to the latest Bolt version (v.1.4.6) and test whether the issue has been resolved?

There have been many fixes since v.1.4.0f10.

Thank you for the reply! Ok, I'll try it, and report back. 
I was hestitant to uprage to the lastest version, because I have a lot of game logic tied with Bolt (especially custom units), so I was afraid of some breaking changes. But I might as well give it a try, because this IL2CPP is a priority by now.

Ok, I tried an update to 1.4.6 .Net 4. Here is what I got:

- The error regarding JIT/AOT detection has dissapeared, which is nice.
- I still got an issue regarding the deserialization process. After reading the output_log_1.4.6.txt I've got some clues, but I don't have an idea how to fix that. Here are some selected fragments, which I think, point to the problem

Deserialization Failure Data

Object References:
0: Item [-1027796217]

"type": "ItemAmountValues",
"value": {
"item": 0
<= (Line 78) I think this is the problem.

In the graph, I have a class named ItemAmountValues, which has a field called "Item". It is a reference to a scriptable object. So I tried to edit this Item class, added the [Serializable] attribute, and added [Inspectable] to all the fields, but it didn't solve my problem, it still serializes as 0.

But maybe, the problem lies elsewhere.

Hi Przemyslaw,

Thanks for updating, I'm glad the process went well. For future reference, we follow semantic versioning (http://semver.org) so patch releases (the P in M.m.P) should always be backwards compatible and safe to update.

The deserialization data you pointed out seems fine to me. 0 actually refers to the object reference above (0: Item[...]), which is your ScriptableObject.

You are however still getting the same error as before, only lower: 

Attempting to call method 'System.Reflection.MonoProperty::GetterAdapterFrame<Ludiq.Graph,UnityEngine.Vector2>' for which no ahead of time (AOT) code was generated.

This is odd because any method inside the Ludiq assemblies should be preserved by the Link.xml file.

Can you:

  1. Run Tools > Ludiq > AOT Pre-Build
  2. Upload the linker file located at Assets/Ludiq/Ludiq.Core/Generated/link.xml


Thank you for the quick reply, and clarification!

Here is the file: link.xml

Need More Information

Hi Przemyslaw,

First, I apologize for the very late reply on this.

The link.xml file you uploaded seems good, I don't see why Unity would strip Vector2 from the player with that file in the project.

The issue seems somehow related to this one on the Unity issue tracker, and although they mention having fixed it, commenters say it reappeared: https://issuetracker.unity3d.com/issues/uwp-executionengineexception-is-thrown-on-system-dot-reflection-dot-monoproperty-getteradapterframe

Can you try updating to Unity 2018.4 LTS (again, this should be a forward-compatible update) and see if the issue persists?

If it does, I will need to ask you for clear reproduction steps from a blank project to recreate the issue on our end.

So, this issue seems to be related to Unity? Ok, I'll try to update the engine and will be back with more info.

Ok, updated to 2018.4.9f1 LTS and it worked fine. Thank you for your help!

Unity Bug

Glad that fixed it! :)