New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata step failed YamlDotNet.Core.YamlException: Type Microsoft.CodeAnalysis.CSharp.Symbols.ArrayTypeSymbol+SZArray is invisible #280

Closed
jpelouse opened this Issue Apr 29, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@jpelouse

jpelouse commented Apr 29, 2016

After making some changes to the documentation the docfx build step (version 1.6) failed with the following exception:

System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
 at Microsoft.DocAsCode.EntityModel.Plugins.BuildConceptualDocument.Build(FileModel model, IHostService host)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.RunBuildSteps(IEnumerable`1 buildSteps, Action`1 action)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.<>c__DisplayClass15_0.<BuildArticle>b__0(FileModel m)
 at Microsoft.DocAsCode.Plugins.DocumentExceptionExtensions.<>c__DisplayClass2_0`1.<RunAll>b__0(TElement s)
 at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
 at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
 at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
 --- End of inner exception stack trace ---
 at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
 at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
 at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
 at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
 at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
 at Microsoft.DocAsCode.Plugins.DocumentExceptionExtensions.RunAll[TElement](IReadOnlyList`1 elements, Action`1 action, Int32 parallelism)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.BuildCore(InnerBuildContext buildContext, DocumentBuildContext context)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.Build(DocumentBuildParameters parameters)
 at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory)
 at Microsoft.DocAsCode.SubCommands.BuildCommand.BuildDocument(String baseDirectory, String outputDirectory)
 at Microsoft.DocAsCode.SubCommands.BuildCommand.Exec(SubCommandRunningContext context)
 at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)
 ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
 at Microsoft.DocAsCode.EntityModel.Plugins.BuildConceptualDocument.Build(FileModel model, IHostService host)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.RunBuildSteps(IEnumerable`1 buildSteps, Action`1 action)
 at Microsoft.DocAsCode.EntityModel.Builders.DocumentBuilder.<>c__DisplayClass15_0.<BuildArticle>b__0(FileModel m)
 at Microsoft.DocAsCode.Plugins.DocumentExceptionExtensions.<>c__DisplayClass2_0`1.<RunAll>b__0(TElement s)
 at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
 at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
 at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

After updating to version 1.8 the following exception occurred within the metadata step. However, with the exception it is hard to figure out what is wrong.

System.AggregateException: One or more errors occurred. ---> Microsoft.DocAsCode.Exceptions.ExtractMetadataException: Error extracting metadata for {"Items":[...]} YamlDotNet.Core.YamlException: Type Microsoft.CodeAnalysis.CSharp.Symbols.ArrayTypeSymbol+SZArray is invisible.
    at Microsoft.DocAsCode.YamlSerialization.TypeInspectors.EmitTypeInspector.GetProperties(Type type, Object container)
    at YamlDotNet.Serialization.TypeInspectors.NamingConventionTypeInspector.GetProperties(Type type, Object container)
    at YamlDotNet.Serialization.YamlAttributesTypeInspector.GetProperties(Type type, Object container)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.YamlSerializer.EmitDocument(IEmitter emitter, IObjectDescriptor graph)
    at Microsoft.DocAsCode.Common.YamlUtility.Serialize(String path, Object graph)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<GetMetadataFromProjectLevelCacheAsync>d__29`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<SaveAllMembersFromCacheAsync>d__25.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__15.MoveNext() ---> YamlDotNet.Core.YamlException: Type Microsoft.CodeAnalysis.CSharp.Symbols.ArrayTypeSymbol+SZArray is invisible.
    at Microsoft.DocAsCode.YamlSerialization.TypeInspectors.EmitTypeInspector.GetProperties(Type type, Object container)
    at YamlDotNet.Serialization.TypeInspectors.NamingConventionTypeInspector.GetProperties(Type type, Object container)
    at YamlDotNet.Serialization.YamlAttributesTypeInspector.GetProperties(Type type, Object container)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject(IObjectDescriptor value, IObjectGraphVisitor visitor, Int32 currentDepth)
    at Microsoft.DocAsCode.YamlSerialization.YamlSerializer.EmitDocument(IEmitter emitter, IObjectDescriptor graph)
    at Microsoft.DocAsCode.Common.YamlUtility.Serialize(String path, Object graph)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<GetMetadataFromProjectLevelCacheAsync>d__29`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<SaveAllMembersFromCacheAsync>d__25.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__15.MoveNext()
    --- End of inner exception stack trace ---
    at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__15.MoveNext()
    --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
    at Microsoft.DocAsCode.SubCommands.MetadataCommand.Exec(SubCommandRunningContext context)
    at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)

@vwxyzh vwxyzh self-assigned this May 3, 2016

@vwxyzh

This comment has been minimized.

Show comment
Hide comment
@vwxyzh

vwxyzh May 3, 2016

Contributor

@jpelouse I think this is a bug about attribute, is there some code like following in your project?

[Foo(typeof(Bar[]))]
Contributor

vwxyzh commented May 3, 2016

@jpelouse I think this is a bug about attribute, is there some code like following in your project?

[Foo(typeof(Bar[]))]
@vwxyzh

This comment has been minimized.

Show comment
Hide comment
@vwxyzh

vwxyzh May 3, 2016

Contributor

fixed in dev branch.

Contributor

vwxyzh commented May 3, 2016

fixed in dev branch.

@jpelouse

This comment has been minimized.

Show comment
Hide comment
@jpelouse

jpelouse May 4, 2016

@vwxyzh We do not have attributes like [Foo(typeof(Bar[]))] within our project. However, we have array signs [] within comments like <see cref="Expression[]"/>. After removing such comments the meta-build finished successfully. Thank you for your help.

jpelouse commented May 4, 2016

@vwxyzh We do not have attributes like [Foo(typeof(Bar[]))] within our project. However, we have array signs [] within comments like <see cref="Expression[]"/>. After removing such comments the meta-build finished successfully. Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment