Skip to content
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

NullReferenceException in TaskItem.GetMetadataEscaped #3193

Open
KirillOsenkov opened this issue Apr 13, 2018 · 1 comment
Open

NullReferenceException in TaskItem.GetMetadataEscaped #3193

KirillOsenkov opened this issue Apr 13, 2018 · 1 comment
Labels

Comments

@KirillOsenkov
Copy link
Member

This Roslyn CI build has the BinaryLogger crashed while getting metadata from a Task Item:
https://ci.dot.net/job/dotnet_roslyn/job/master-vs-deps/job/ubuntu_16_mono_debug_prtest/239/consoleFull#149247994579494335-f7bd-47d0-8771-8661e00c2db2

MSBUILD : error MSB4017: The build stopped unexpectedly because of an unexpected logger failure.
13:16:19 Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.NullReferenceException: Object reference not set to an instance of an object.
13:16:19    at Microsoft.Build.Execution.ProjectItemInstance.TaskItem.GetMetadataEscaped(String metadataName)
13:16:19    at Microsoft.Build.Execution.ProjectItemInstance.TaskItem.GetMetadata(String metadataName)
13:16:19    at Microsoft.Build.Logging.BuildEventArgsWriter.Write(ITaskItem item)
13:16:19    at Microsoft.Build.Logging.BuildEventArgsWriter.WriteItems(IEnumerable items)
13:16:19    at Microsoft.Build.Logging.BuildEventArgsWriter.Write(ProjectStartedEventArgs e)
13:16:19    at Microsoft.Build.Logging.BuildEventArgsWriter.Write(BuildEventArgs e)
13:16:19    at Microsoft.Build.Logging.BinaryLogger.Write(BuildEventArgs e)
13:16:19    at Microsoft.Build.Logging.BinaryLogger.EventSource_AnyEventRaised(Object sender, BuildEventArgs e)
13:16:19    at Microsoft.Build.Evaluation.ProjectCollection.ReusableLogger.AnyEventRaisedHandler(Object sender, BuildEventArgs e)
13:16:19    at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseAnyEvent(Object sender, BuildEventArgs buildEvent)
@KirillOsenkov
Copy link
Member Author

From eyeballing http://source.dot.net/#Microsoft.Build/Instance/ProjectItemInstance.cs,ece1baeb960ed0c0 I don't see a location where we could NullRef.

This may be an OOM condition when the runtime failed to allocate due to OOM and we're dying anyway.

Mainly filing for awareness, in case we see this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants