yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.64k forks source link

Exception: System.NullReferenceException #472

Closed ramanasuri closed 8 years ago

ramanasuri commented 8 years ago

I have created a ConfuserEx project and while protecting getting the following exception: [DEBUG] WPF found, enabling compatibility. [ERROR] Unknown error occurred. Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Confuser.Renamer.Analyzers.LdtokenEnumAnalyzer.Analyze(ConfuserContext context, INameService service, ProtectionParameters parameters, IDnlibDef def) in c:\Projects\confuserex\Confuser.Renamer\Analyzers\LdtokenEnumAnalyzer.cs:line 55 at Confuser.Renamer.AnalyzePhase.Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, IDnlibDef def, Boolean runAnalyzer) in c:\Projects\confuserex\Confuser.Renamer\AnalyzePhase.cs:line 133 at Confuser.Renamer.AnalyzePhase.Execute(ConfuserContext context, ProtectionParameters parameters) in c:\Projects\confuserex\Confuser.Renamer\AnalyzePhase.cs:line 55 at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action1 func, Func1 targets, ConfuserContext context) in c:\Projects\confuserex\Confuser.Core\ProtectionPipeline.cs:line 138 at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context) in c:\Projects\confuserex\Confuser.Core\ConfuserEngine.cs:line 219 at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in c:\Projects\confuserex\Confuser.Core\ConfuserEngine.cs:line 173 Failed at 11:30 AM, 0:03 elapsed.

I have taken the latest source from the git for both confuserex and dnlib but still getting the error. while debugging I found "instr.Operand" is null in LdtokenEnumAnalyzer.cs:line 55.

Can someone help ?

Thanks and Regards

ramanasuri commented 8 years ago

Sorry, the error was due to , one of the the candidate file was already obfuscated. Hence the issue. Now sorted