Skip to content

NullReferenceException in Renamer #85

@wmjordan

Description

@wmjordan

I'd got a pretty big project, which could throw an exception during protection phase:

[ERROR] Unknown error occurred.
Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Confuser.Renamer.Analyzers.ReflectionAnalyzer.Analyze(INameService nameService, ITraceService traceService, IReadOnlyList`1 moduleDefs, MethodDef method)
   at Confuser.Renamer.AnalyzePhase.Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, IDnlibDef def, Boolean runAnalyzer)
   at Confuser.Renamer.AnalyzePhase.Execute(ConfuserContext context, ProtectionParameters parameters)
   at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action`1 func, Func`1 targets, ConfuserContext context)
   at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context)
   at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token)

Such an exception did not occur on other confuser forks.

The protection rule preset is minimum, with renamer enabled.
Any renamer mode (debug, reversible, etc) can trigger this exception.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions