
0
Cannot Reproduce
Missing AOT Stub
Since updating to Bolt 1.3 our WebGL build is not being built correctly by our build server. We're calling PreCloudBuild and it seems to be failing with this error:
build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] ArgumentException: Version string portion was too short or too long. build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at System.Version+VersionResult.SetFailure (System.Version+ParseFailureKind failure, System.String argument) [0x00016] in /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs:499 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at System.Version+VersionResult.SetFailure (System.Version+ParseFailureKind failure) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs:492 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at System.Version.TryParseVersion (System.String version, System.Version+VersionResult& result) [0x00029] in /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs:387 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at System.Version.Parse (System.String input) [0x00023] in /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs:362 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at System.Version..ctor (System.String version) [0x00014] in /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs:92 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at AncientLightStudios.uTomate.UTils.MigrateActionIfRequired[T] (T action, System.String versionIntroducingTheChange, System.Action`1[T] migration) [0x00022] in /FuzzyCI/BackEnd/Branches/Dev/workspace/BES-BF-WEB/Bestwood.unity/Assets/FuzzyCI/Common/uTomate/Editor/UTils.cs:431 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] at AncientLightStudios.uTomate.UTSetPlayerSettingsPcMacAction.OnEnable () [0x00024] in /FuzzyCI/BackEnd/Branches/Dev/workspace/BES-BF-WEB/Bestwood.unity/Assets/FuzzyCI/Common/uTomate/Editor/Actions/UTSetPlayerSettingsPcMacAction.cs:196 build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.075] UnityEditor.AssetDatabase:LoadMainAssetAtPath(String) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.WhereSelectArrayIterator`2:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.<OfTypeIterator>d__33`1:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.SelectManySingleSelectorIterator`2:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.<OfTypeIterator>d__33`1:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] Ludiq.<Concat>d__0`1:MoveNext() (at C:\Users\lazlo\Projects\Ludiq\Ludiq.Core\Runtime\Utilities\LinqUtility.cs:16) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] Ludiq.<FindAllProjectStubs>d__2:MoveNext() (at C:\Users\lazlo\Projects\Ludiq\Ludiq.Core\Editor\Platforms\AotPreBuilder.cs:95) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.DistinctIterator`1:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.SelectEnumerableIterator`2:ToArray() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.Buffer`1:.ctor(IEnumerable`1) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] System.Linq.<GetEnumerator>d__3:MoveNext() build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] Ludiq.AotPreBuilder:GenerateStubScript(String, IEnumerable`1) (at C:\Users\lazlo\Projects\Ludiq\Ludiq.Core\Editor\Platforms\AotPreBuilder.cs:187) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.076] Ludiq.AotPreBuilder:GenerateStubScript(String) (at C:\Users\lazlo\Projects\Ludiq\Ludiq.Core\Editor\Platforms\AotPreBuilder.cs:66) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] Ludiq.AotPreBuilder:PreCloudBuild() (at C:\Users\lazlo\Projects\Ludiq\Ludiq.Core\Editor\Platforms\AotPreBuilder.cs:250) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] <Execute>c__Iterator0:MoveNext() (at Assets/FuzzyCI/Custom/Editor/Scripts/UTBoltAOTBuild.cs:19) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] AncientLightStudios.uTomate.<ExecutePath>c__Iterator1:MoveNext() (at Assets/FuzzyCI/Common/uTomate/Editor/AutomationPlan/UTAutomationPlan.cs:139) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] AncientLightStudios.uTomate.<ExecutePath>c__Iterator1:MoveNext() (at Assets/FuzzyCI/Common/uTomate/Editor/AutomationPlan/UTAutomationPlan.cs:139) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] AncientLightStudios.uTomate.UTomateRunner:ContinueRunning() (at Assets/FuzzyCI/Common/uTomate/Editor/UTomateRunner.cs:185) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:127) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077] (Filename: /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/version.cs Line: 499) build 30-Apr-2018 09:04:36 [2018-04-30 08:04:36.077]
Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Customer support service by UserEcho
I can reproduce this by running it in the editor with the configuration set to by calling PreCloudBuild() on an editor script
Hi Real World,
It seems like the error is coming from uTomate, not Bolt:
Please forward this bug report to them!
Ok. I think you're right, that may be a red herring as the AOT file is generated but it's failing on WebGL still because of missing AOT values and I was wrong, it's also failing on iOS. Heres the error I get from WebGL
Just to clarify this has only started happening since I updated to 1.3 from 1.2.4
Is it VisualMenuManager+MenuTransitionRules that it can't find? If so then thats an enum and its in the list of defined types
Are you sure the AOT pre-build completes without any error?
That seems like a missing AOT stub.
I'm logging a message before and after PreCloudBuild and between the two calls there are no error reported. The AOT file is generated it's just missing this enum. Is there any way I can force this? I've got a submission to the app store coming up very soon and my iOS and WebGL builds are both unplayable at the moment
The method it can't find is:
Which is a really complicated way of saying that the method in question has this signature:
Can you find where you'd be using such a method in your graphs? It would help us debug what's causing the AOT pre-build to skip it. Likewise, if you find what SomeMethod is called, check if it's actually being skipped in the AotStubs.cs file.
Looking at the pre-1.3 AOT file and the newest AOT file side by side, it seems to confirm that the function is
This function isn't in the newest AOT file but it was in the old one
Which is a direct call to a C# function. I had stopped using that and started moving to a new system where I call a custom unit instead so I've only managed to find one place where this still existed in a macro and only one place further where this macro was being used. I've fixed both and yet the error persists...
Ok, I've cleared that error by finding a macro asset that didn't get removed from the build server despite it being removed from source control. That still doesn't fully explain the problem away however as surely the AOT generation should pick it up? If Unity is finding it and trying to call it then surely the AOT should be picking it up too? I don't know why it stopped being included in the generated file after the 1.3 upgrade.
Aside from that, I'm no further forward because now I'm getting this error
Hm, it does sound like AOT pre-build is having a hard time.
Is this error only happening on cloud build, or do you also get it when building manually?
Also, when exactly is the error occurring? What is the stack trace?
I havent tried building for device manually yet as it takes a while and I've been busy getting on top of other issues. I'll try as soon as I can.
The error seems to occur as its loading in the scene with my graph in it. The stack trace doesnt look very helpful either
So building locally seems to work but so does building on our build server if we nuke the checkout completely before starting. If we do an update and rebuild then the error comes back. It's always the same one now about
I've turned off AOT safe mode from the Ludiq project settings and the error seems to have gone... for now
I see. Make sure your VCS system doesn't somehow delete Ludiq.Core/Generated/AotStubs.cs. If it does, the AOT pre-build step is basically cancelled.
The AotStubs file exists at the end of the build process and is identical to the one built locally
Aaaaand the problems back. Safe Mode setting hasnt changed. All that changed between a working and broken build was I switched to a development build and then back to a submission build
Is there somewhere I can figure out what its struggling to find the AOT stub for? It sounds like a simple boolean type, but surely you dont need a stub for a bool?
I know this is one of those bugs you would rather went away because its probably impossible to reproduce but I am really at a loss here. I've just discovered that Android wasn't running IL2CPP. Turning this on has introduced the same AOT boolean error on those builds too. This is despite the build being on a completely different machine (Windows rather than Mac). One build fails, the next may be fine. There's no logic to it that I can see. If there was some way to force this boolean stub into AOT stubs just to make it be quiet I'd be over the moon
You can force add your own AOT stubs sure, just create any new script file with a single static class marked with the [Preserve] attribute. Then, follow the conventions from the existing AOTStubs.
If you're certain that for some reason the missing one is :
Then you can create a stub for a StaticFunctionInvoker<bool>.
But I'd be more interested in figuring out why the stub doesn't get generated in the first place.
Can you find a place, somewhere in your graphs, where you invoke a static function with zero arguments that returns a bool? This would be the missing stub, and maybe we can infer why it doesn't get auto-generated.
There are 4 different cases where I call a static function that take no parameters and returns a bool. Any way to narrow it down?
Well you can look in the AOTStubs.cs file which of these four do get generated (the comment above the stub is the method/property name). If none of them get generated, we know we have a problem for these in general.
I'll look out in builds that fail to see if there's any difference. I just generated AOT on my PC and all 4 were present but as I said, this issue is intermitent
One other thing you could try in that case is adding the [Preserve] attribute to the stubs generated for these methods. Usually, I never found this to be necessary, but maybe for some reason the Unity code stripping is more aggressive in your project. I'll make sure to automatically add [Preserve] to both the root class and all the method stubs in v.1.4.
Ok just had it happen again. Compared the stubs file to a working build and there are a LOT of missing functions. Guess this one is just the first one it hits when loading the graphs.
I can't see any connection between all the missing functions though. There are static ones, non static ones, functions that exist in a macro and functions that dont
Are you still generating this via cloud build?
If so, let's take a step back to isolate the issue.
If it works, then we can incrementally start changing step 2, then step 3, and seeing where it breaks.
Seeing as you didn't reply in over a month, I'm closing this bug report. Let me know if you manage to isolate the issue.
Having cleared the error from the original post I can no longer see any errors between AOT build starting and ending