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

Fix attribute application analysis could fail if there are wrong assemblies loaded #2496

Merged

Conversation

zvirja
Copy link
Contributor

@zvirja zvirja commented Sep 3, 2021

Link to issue(s) this covers

Problem

Scenario:

  • Load System assembly together with e.g. unknown assembly which IL Spy cannot read (so it shows error in a tree)
  • Find any attribute and Analyze it
  • In the Analysis window expand "Applied To" analysis.

The following error occurs:
image

Solution

The AnalyzerScope.GetAllModules() was not expected to return null modules as I can see by the usages around. So I fixed that by filtering out invalid modules from Assembly List

@zvirja zvirja changed the title Return valid modules only Fix attribute application analysis could fail if there are wrong assemblies loaded Sep 3, 2021
@siegfriedpammer siegfriedpammer merged commit 62e6223 into icsharpcode:master Sep 3, 2021
@siegfriedpammer
Copy link
Member

Thank you very much for fixing this!

@zvirja zvirja deleted the fix-null-module-enumeration branch September 3, 2021 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants