0
Fixed

AOT Prebuild Error - Object reference not set to an instance of an object

HeathClose 1 year ago updated by Lazlo Bonin (Lead Developer) 4 months ago 5

I get an error during AOT prebuild...

NullReferenceException: Object reference not set to an instance of an object
Bolt.Expose+d__25.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Framework/Codebase/Expose.cs:49)
System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
System.Linq.Enumerable+d__32`1[TResult].MoveNext () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
Ludiq.LinqUtility+d__0`1[T].MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Utilities/LinqUtility.cs:15)
Ludiq.AotPreBuilder+d__2.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Documentation/XmlDocumentation.cs:302)
System.Linq.Enumerable+DistinctIterator`1[TSource].MoveNext () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].ToArray () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
System.Linq.Buffer`1[TElement]..ctor (System.Collections.Generic.IEnumerable`1[T] source) (at <10ab7516b28e47f29e5315b70b0be54c>:0)
System.Linq.OrderedEnumerable`1+d__3[TElement].MoveNext () (at <10ab7516b28e47f29e5315b70b0be54c>:0)
Ludiq.AotPreBuilder.GenerateStubScript (System.String scriptPath, System.Collections.Generic.IEnumerable`1[T] stubWriters) (at <379f2ffdf0aa45ccb90edeb7a4df7300>:0)
Ludiq.AotPreBuilder.GenerateStubScript (System.String path) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/GenerateDocumentationWindow/GenerateDocumentationPage.cs:90)
Ludiq.AotPreBuildPage.OnContentGUI () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:539)
UnityEngine.Debug:LogException(Exception)
Ludiq.AotPreBuildPage:OnContentGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:539)
Ludiq.Page:DrawContent()
Ludiq.SinglePageWindow`1:OnGUI()
Ludiq.WrappedEditorWindow:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Bolt Version:
1.4.1b
Unity Version:
2018.2.18f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by HeathClose 1 year ago
Pending Review

Hi HeathClose, 

Thanks for the report, sorry you're experiencing this issue.

From the stack trace, it appears that an Expose unit is not getting defined before you run AOT Pre-Build, which shouldn't be happening. Are you getting other errors when loading your project that could be related?

Console is completely blank on load and completely blank on play

+1
Answered

Thanks for the additional info. I cannot understand why Expose would have null members at that point, but I added more error recovery logic to it for v.1.4.1b5.