Unity-Technologies / ProjectAuditor

Project Auditor is an experimental static analysis tool for Unity Projects.
Other
795 stars 64 forks source link

NullReferenceException on MonoCecilHelper.IsOrInheritedFrom method #142

Closed IJEMIN closed 1 year ago

IJEMIN commented 1 year ago

Describe the bug

NullReferenceException invoked when try to analyze code issues.

To Reproduce Steps to reproduce the behavior:

  1. Open Project Auditor Window
  2. Select Code Module in Modules field from window.
  3. Press Analyze
  4. Code analyze failed. There is no entry in Code view. And error in console view

Object reference not set to an instance of an object Unity.ProjectAuditor.Editor.CodeAnalysis.MonoCecilHelper.IsOrInheritedFrom (Mono.Cecil.TypeReference typeReference, System.String typeName)

Expected behavior Code compilation finished without error and user can see code analysis on Code view.

Information (please complete the following information):

IJEMIN commented 1 year ago

Update: it only happens in latest main branch. Didn't happen in release/0.8.4-preview branch

mtrive commented 1 year ago

@IJEMIN thanks for reporting. I was able to reproduce the exception and we will have a fix shortly.

mtrive commented 1 year ago

This should be fixed now. Thanks again for the bug report.