malware-dev / MDK-SE

Malware's Development Kit for SE
MIT License
1.02k stars 123 forks source link

Crash: "an unexpected error occurred during the attempt to analyze the solution" #275

Closed exo-pla-net closed 1 year ago

exo-pla-net commented 2 years ago

System.NullReferenceException: Object reference not set to an instance of an object. at Malware.MDKServices.HealthAnalysis.GetProjects(IEnumerable1 projects) at Malware.MDKServices.HealthAnalysis.GetProjects(IEnumerable1 projects) at Malware.MDKServices.HealthAnalysis.AnalyzeAsync(Solution solution, HealthAnalysisOptions options) at MDK.MDKPackage.d__42.MoveNext() in D:\Repos\SpaceEngineers\MDK-SE\Source\MDK\MDKPackage.cs:line 209

exo-pla-net commented 2 years ago

Notes:

malware-dev commented 2 years ago

Strange - what is different with that solution? And that's from the MDK source and has nothing to do with anything you have 🙂

exo-pla-net commented 2 years ago

It could have been solar radiation that corrupted a bit somewhere in the .sln.

Only half-joking.

In the new solution, the only change was that I didn't select the "Trim" option for any of the Projects.

exo-pla-net commented 2 years ago

The same error has resurfaced in my new Solution:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Malware.MDKServices.HealthAnalysis.GetProjects(IEnumerable`1 projects)
   at Malware.MDKServices.HealthAnalysis.GetProjects(IEnumerable`1 projects)
   at Malware.MDKServices.HealthAnalysis.AnalyzeAsync(Solution solution, HealthAnalysisOptions options)
   at MDK.MDKPackage.<OnSolutionLoaded>d__42.MoveNext() in D:\Repos\SpaceEngineers\MDK-SE\Source\MDK\MDKPackage.cs:line 209
exo-pla-net commented 2 years ago

Once again, making a new solution and copy-pasting the contents of all of my .cs files into new projects fixed the error/crashing.

malware-dev commented 2 years ago

Next time, please upload the failing project.

malware-dev commented 1 year ago

Since I haven't received any failing projects again I'll assume this is no longer a problem.