Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Bolt AOT pre-build causes Unity to hang and lose connection to license server

Discussion in 'Editor & General Support' started by nickfourtimes, Aug 10, 2020.

  1. nickfourtimes


    Oct 13, 2010

    We're using Bolt (v1.4.12) for one of our projects and testing out some builds for both consoles and WebGL. These platforms require us to run the Bolt AOT pre-build every time we make a new build.

    Running the pre-build takes a long time (which might be expected on a project of our size), and creates an AotStubs.cs file on the order of 24.5K lines. When control returns to Unity, however, the editor is extremely laggy to the point of being unusable. On inspecting the editor.log output, I see hundreds if not thousands of the following lines:

    [LicensingClient] ERROR Failed to send request while resolving entitlements [Licensing::Module] License is not active (com.unity.editor.ui). HasEntitlements will fail.

    This causes us to have to force-quit Unity. When the editor is started up again, it's no longer sluggish, and we can proceed with a console/WebGL build. However, when that build is complete, our Bolt scripts no longer work (even for a simple test graph, such as lerping the camera BG colour back and forth). On WebGL (in the JS console), I get the following error:

    Code (CSharp):
    1. Failed to deserialize behaviour.
    2. System.Runtime.Serialization.SerializationException: Deserialization into 'Bolt.FlowMachine' failed. ---> System.InvalidOperationException: Internal Deserialization Error - Object definition has not been encountered for object with id=21; have you reordered or modified the serialized data? If this is an issue with an unmodified Full Serializer implementation and unmodified serialization data, please report an issue with an included test case.
    3.   at Ludiq.FullSerializer.Internal.fsCyclicReferenceManager.GetReferenceObject (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0
    4.    --- End of inner exception stack trace ---
    5.   at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x00000] in <00000000000000000000000000000000>:0
    6. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    This may be two separate errors, but I'm listing them here because they seem related for us: Unity becoming unresponsive after an AOT prebuild (losing its License Server connection); and Bolt not working on WebGL/console builds. Has anyone seen anything similar?

    As mentioned above, this is Bolt v1.4.12, and Unity 2019.4.0f1.
  2. nickfourtimes


    Oct 13, 2010
    A small update...

    I duplicated our main project and began to trim out a lot of excess assets, leaving us with the "lerping BG colour" scene (a very simple Bolt graph, to provide a baseline), and another "minigame" scene, with many, more-complicated Bolt graphs (making use of plugins such as Rewired).

    Running the AOT pre-build no longer causes Unity to hang afterwards, indicating that project size may be a factor here. Then, running the lerping-colour scene on both consoles and WebGL worked!

    However, both WebGL and console builds of the minigame scene continue not to work, and notably the WebGL build gives us the same deserialization error mentioned in the previous post.

    This does appear to be two separate issues now:
    • Running the Bolt AOT pre-build on larger project somehow loses Unity's connection to the license server, which then causes Unity to stall and spit out a continuing stream of error messages to editor.log
    • Running Bolt on WebGL/console platforms, with a certain configuration of plugins, causes a deserialization error, which is the primary error I'd like to figure out.