ProfilerReader
ProfilerReader copied to clipboard
null exception in Unity 2021.1.0f1
When using Unity 2021.1.0f1, analyzing log is failed with exceptions like this:
System.NullReferenceException: Object reference not set to an instance of an object
at UTJ.ProfilerReader.Analyzer.MainThreadCategoryAnalyzeToFile.SetupCategories () [0x00070] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\Analyzer\Impl\MainThreadCategoryAnalyzeToFile.cs:88
at UTJ.ProfilerReader.Analyzer.MainThreadCategoryAnalyzeToFile.CollectData (UTJ.ProfilerReader.BinaryData.ProfilerFrameData frameData) [0x00000] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\Analyzer\Impl\MainThreadCategoryAnalyzeToFile.cs:63
at UTJ.ProfilerReader.UI.AnalyzeToCsvWindow.ExecuteFrame () [0x000b0] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\GUI\AnalyzeToCsvWindow.cs:102
UnityEngine.Debug:LogError (object)
UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:ExecuteFrame () (at Library/PackageCache/com.utj.profilerreader@a2480d8041/Editor/GUI/AnalyzeToCsvWindow.cs:106)
UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:UpdateThread () (at Library/PackageCache/com.utj.profilerreader@a2480d8041/Editor/GUI/AnalyzeToCsvWindow.cs:66)
System.Threading.ThreadHelper:ThreadStart ()
System.NullReferenceException: Object reference not set to an instance of an object
at UTJ.ProfilerReader.Analyzer.MainThreadCategoryAnalyzeToFile.CollectThread (UTJ.ProfilerReader.BinaryData.ThreadData thread, UTJ.ProfilerReader.Analyzer.MainThreadCategoryAnalyzeToFile+FrameByCategory frameByCategory) [0x0001f] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\Analyzer\Impl\MainThreadCategoryAnalyzeToFile.cs:56
at UTJ.ProfilerReader.Analyzer.MainThreadCategoryAnalyzeToFile.CollectData (UTJ.ProfilerReader.BinaryData.ProfilerFrameData frameData) [0x0003d] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\Analyzer\Impl\MainThreadCategoryAnalyzeToFile.cs:73
at UTJ.ProfilerReader.UI.AnalyzeToCsvWindow.ExecuteFrame () [0x000b0] in D:\Projects\Unity Test Project\ProfilerBinaryTest-2021\Library\PackageCache\com.utj.profilerreader@a2480d8041\Editor\GUI\AnalyzeToCsvWindow.cs:102
UnityEngine.Debug:LogError (object)
UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:ExecuteFrame () (at Library/PackageCache/com.utj.profilerreader@a2480d8041/Editor/GUI/AnalyzeToCsvWindow.cs:106)
UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:UpdateThread () (at Library/PackageCache/com.utj.profilerreader@a2480d8041/Editor/GUI/AnalyzeToCsvWindow.cs:66)
System.Threading.ThreadHelper:ThreadStart ()
And some part of output csv are empty/broken.
I tested latest version with 2021.2.0b14 and Null reference exceptions are gone. But some of profiler value is negative. Ex) Physics or PlayerLoop columns in _category_mainThread_frame.csv.