Not a Bug

Strange error in AOT build - MissingValuePortInputException

Max Ivanchenko 2 years ago updated by Ani rudhan 4 months ago 10

Hi! I faced with strange error during build in device (in Unity everything is OK)

1) Everything worked fine in game

2) I've updated unity to 2019.2.2 and updated bolt to 1.4.6 + Google resolver + Google Play Services

3) The code is almost the same but During the play on device could fireup this error:

MissingValuePortInputException: Missing input value for 'input'.
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Flow.GetValue (Bolt.ValueInput input) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Flow.GetValue (Bolt.ValueInput input, System.Type type) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.SetMember.Assign (Bolt.Flow flow) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at System.Func`2[T,TResult].Invoke (T arg) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Flow.InvokeDelegate (Bolt.ControlInput input) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Flow.Invoke (Bolt.ControlOutput output) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Flow.Invoke (Bolt.ControlOutput output) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Timer.Update (Bolt.Flow flow) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at Bolt.Timer.TriggerUpdate (Ludiq.GraphReference reference) [0x00000] in <00000000000000000000000000000000>:0 
09-03 17:40:28.141: E/Unity(21861):   at System.Action`1[T].Invoke (T obj

I Can't figure out what node missing the input

AOT list was created as usually. And there no Math.infinity function as in similar topic here in forum.

May be now there is something else that we shouldn't use in code?


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Max,

Are you using any other constant like Deg2Rad or Rad2Deg? They all suffer from the same problem as Mathf.Infinity unfortunately.

Lazlo, I rebuild the game several times and found the code which causes the error. This code is worked on old .Net version or old Unity, and after I updated all, it creates errors. I can't set the new color to particles!?

Hi Max,

I'll have to try and reproduce this issue, I see no problem with constants though.

Just to make sure, did you run AOT Pre-Build before building?

Sure, I made AOT a lot of times.. and this code works in Unity, and worked before.. the problem appears after update and only on device (without AOT other game features won't work)

there are lines in AotStubs:


but I also noticed lines like:


"_ctor" seems strange for me..

- Any way, if I've just delete the code I've mentioned - all is work! 

Hi Max,

You're saying you deleted the "_ctor" lines and everything started working again? I wouldn't understand why :S

Oh, sorry - I mean code/flow in the screen. without it all is working as should)

Working on Fix

Hi Max,

I've been able to reproduce the issue in Unity 2019.2.1.

Interestingly, I haven't been able to reproduce it in Unity 2018.4.

I will try updating to the latest Unity 2019.2.6 and see if they issued a fix along the way.

Otherwise, I'll have to file a differential report to get them to have a look.

Not a Bug

Hi Max,

I figured out what is going on.

When updating the test project to 2019.2, I forgot to add ParticleSystem.MinMaxGradient to the Unit Options Wizard. You likely had the same issue!

This in turn led it to not generate the AOT stubs required for the implicit conversion between Color and MinMaxGradient, which you use between the last two units at the end of your graph.

If you don't have a line that says UnityEngine.ParticleSystem.MinMaxGradient.op_Implicit in your AotStubs file, it means you have the same issue.

To fix it, just:

  1. add ParticleSystem.MinMaxGradient to your Unit Options wizard
  2. generate
  3. run AOT Pre-Build
  4. build

In summary, when using implicit or explicit conversion operators, you must have the type defining the operator in your Unit Options Wizard. Otherwise, Bolt cannot infer the use of the operator from the connection alone. This is arguably something that I could invest time in fixing, but because it's such an edge case, I won't for now. It's an edge case because usually, you wouldn't even have access to the type with the operator if you hadn't added it in your unit options in the first place. That kind of error can only happen when upgrading a project and not keeping the same unit options.

Thanks you Lazlo for your work! All is work now..

but, I checked it lot of times - I have the ParticleSystem.MinMaxGradient in the Unit Options Wizard.

but DON'T have the UnityEngine.ParticleSystem.MinMaxGradient.op_Implicit line in the AotStubs!

so I deleted AotStubs file manually and redo it. And only after that I've got the line and bug was fixed.

may be it will help somehow in other cases...


I have a problem, where the start colour in the particle system does not change color when build and run. AOT pre-build was done. 

Is there anyway to fix the issue?