0
Fixed

AOT Pre-Build Error

이승우 2 years ago updated by alex oatridge 2 years ago 6

1. Often the Mac OS crash after AOT pre-build. 

2. Often error log appear after AOT pre-build

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayout.FlexibleSpace () (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:282)
Ludiq.AotPreBuildPage.OnContentGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/AotPreBuildWindow/AotPreBuildPage.cs:64)
Ludiq.Page.DrawContent () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Page.cs:56)
Ludiq.SinglePageWindow`1[TPage].OnGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/SinglePageWindow.cs:69)
Ludiq.WrappedEditorWindow.OnGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:41)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:285)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:278)
UnityEditor.HostView.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:107)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:127)

3. AotStubs.cs error related to Photon Unity Network

Assets/Generated/Ludiq.Core/AotStubs.cs(5167,23): error CS8244: The `default value' operator cannot be applied to an operand of a static type


public static void PhotonNetwork_playerName()
        {
            string accessor = PhotonNetwork.playerName;
            PhotonNetwork.playerName = default(string);
            Ludiq.StaticPropertyAccessor<string> optimized = new Ludiq.StaticPropertyAccessor<string>(default(System.Reflection.PropertyInfo));
            optimized.GetValue(default(string));
            optimized.SetValue(default(PhotonNetwork), default(string));

        }


optimized.SetValue(default(PhotonNetwork), default(string)); << this sentence error

This should probably be 

optimized.SetValue(default(string), default(string));


thanks 

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Fixed in Alpha

The first error is just a harmless GUI error. I'm trying to hunt these down but don't worry, they have no impact.

The second error will be fixed in the next version.

When do you feel that this next version will be updated in the store? I ask since the last version just came out today.

This fix is now released and available on the store (v.1.2.1).

Mac High Sierra - bolt 1.2.1 - Unity 2017.3

I get three errors that look like the ones in this thread when running AOT.


And also a fourth one that I can report in a different thread if you like.


I was up all night trying to track down what could trigger the issues. I created a new empty project and only installed Bolt and Photon. That installation took a bit of fighting as there were some issues with duplicate Newtonsoft.json files and Unity api updates. I finally got AOT to finish after deleting the NewtonSoft.json installed by Photon.
I noticed that when I inspected the AotStubs file, the methods like PhotonNetwork.autoJoinLobby and PhotonNetwork_logLevel are missing. I think this accounts for the missing errors on your end of the testing. On my real project, I do access those inside Bolt graph.

Image of photon use.