NullReferenceException when creating log from app
See original GitHub issueIf I open a solution and run it directly from the app, the resulting log file is full of the following exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Build.Logging.StructuredLogger.ItemGroupParser.ParsePropertyOrItemList(String message, String prefix, StringCache stringTable) in C:\MSBuildStructuredLog\src\StructuredLogger\Construction\ItemGroupParser.cs:line 30
at Microsoft.Build.Logging.StructuredLogger.MessageProcessor.AddItemGroup(BuildMessageEventArgs args, String prefix, NamedNode containerNode) in C:\MSBuildStructuredLog\src\StructuredLogger\Construction\MessageProcessor.cs:line 154
at Microsoft.Build.Logging.StructuredLogger.MessageProcessor.Process(BuildMessageEventArgs args) in C:\MSBuildStructuredLog\src\StructuredLogger\Construction\MessageProcessor.cs:line 46
at Microsoft.Build.Logging.StructuredLogger.Construction.MessageRaised(Object sender, BuildMessageEventArgs args) in C:\MSBuildStructuredLog\src\StructuredLogger\Construction\Construction.cs:line 345
If I use the Build Logging window from inside VS, the resulting log files from the same project appear to be fine.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Null reference exception in exception logging masking true ...
Exceptions in multithreaded application. 3 · Mutex could not be created. ASP.NET · 1 · Why ApplicationException is thrown? 6 · Exception ......
Read more >Object Reference Not Set to an Instance of an Object
NullReferenceException errors are responsible for a good percentage of all ... log viewer, and Prefix is now a native application for Windows and...
Read more >NullReferenceException Class (System)
Recording the bad data in a log file or in the application UI might be all you have to do. You can recover...
Read more >Debugging System.NullReferenceException - elmah.io Blog
Logging and monitoring for null reference exceptions are a must. While some developers tempt to create control flow from exceptions (no-one ...
Read more >NullReferenceException in ApplicationInsightsLogger.Log ...
Log when exception contains a Data entry with a null value #1436 ... AggregateException: An error occurred while writing to logger(s).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pushed a new release. Thanks for investigating this!
Oh, of course.
ItemGroupParser
is part of the logger, so that would explain why I wasn’t hitting a breakpoint when opening the log. That would also explain why the binlog from VS didn’t have the problem either.That appears to have fixed it!