Closed GoogleCodeExporter closed 9 years ago
The brackets on <CppImplementationDetails> are part of the name of the
namespace. Did you try if this works:
<SkipNamespace name="<CrtImplementationDetails>" />
Original comment by webbi...@gmail.com
on 27 Nov 2010 at 3:01
I tried that and it broke the XML serializer class. I do not think the syntax
is valid for xml: '<' embedded inside quotes. I assume the filter will work
then if i can find the code that does the string compare and make is less
'strict'.
Original comment by star...@cox.net
on 27 Nov 2010 at 5:15
Ok, you are right. '<' is not allowed in XML attributes.
But you can escape it like you would do in normal XML text:
<SkipNamespace name="<CrtImplementationDetails>" />
or use wildcards for the offending characters:
<SkipNamespace name="?CrtImplementationDetails?" />
If you want to do more complex matching use regular expressions. A name in
SkipXXXX elements is parsed as regular expression if it starts with a '^'
character.
Original comment by webbi...@gmail.com
on 27 Nov 2010 at 5:40
Unfortunately, This did not solve the crash.
However, The first problem with filtering has been solved using these
<SkipNamespace name="?CrtImplementationDetails?" />
<SkipNamespace name="?CppImplementationDetails?" />
<SkipType name="*gcroot*" skipMethods="true" />
To filter out these...
1. <CppImplementationDetails>
2. <CrtImplementationDetails>
3. gcroot<System::String ^>
The real Issue, the crash in Mono.dll, appears to be unrelated.
I have attached the crash dump and exception info, as well as a tester.exe and
the associated obfuscat.xml.
Hopefully this is enough to repro the problem.
Exception Info:
Message "Object reference not set to an instance of an object."
Source "Mono.Cecil.dll"
StackTrace "
at Mono.Cecil.TypeSpecification.get_FullName()\r\n
at Mono.Cecil.ReferenceType.get_FullName()\r\n
at Mono.Cecil.TypeSpecification.get_FullName()\r\n
at Mono.Cecil.ModType.get_FullName()\r\n
at Mono.Cecil.ReflectionWriter.CompleteMethodSig(IMethodSignature meth,
MethodSig sig)\r\n
at Mono.Cecil.ReflectionWriter.GetMethodDefSig(IMethodSignature meth)\r\n
at Mono.Cecil.ReflectionWriter.VisitMethodDefinition(MethodDefinition
method)\r\n
at Mono.Cecil.ReflectionWriter.CompleteTypeDefinitions()\r\n
at Mono.Cecil.StructureWriter.TerminateAssemblyDefinition(AssemblyDefinition
asm)\r\n
at Mono.Cecil.AssemblyDefinition.Accept(IReflectionStructureVisitor
visitor)\r\n
at Mono.Cecil.AssemblyFactory.WriteAssembly(AssemblyDefinition asm,
BinaryWriter bw)\r\n
at Mono.Cecil.AssemblyFactory.SaveAssembly(AssemblyDefinition asm, Stream
stream)\r\n
at Mono.Cecil.AssemblyFactory.SaveAssembly(AssemblyDefinition asm, String
file)\r\n
at Obfuscar.Obfuscator.SaveAssemblies() in
E:\\Dev\\SVN\\Obfuscar\\Obfuscator.cs:line 129"
*** Obfuscator.cs ***
AssemblyFactory.SaveAssembly( info.Definition, outName ); //Exception Here
All parameters within info.Definition and outName appear valid?
Compiled with VS2005, using C++ .Net.
<zip attached contains tester.exe and .xml>
Thanks again for your awesome support.
Original comment by star...@cox.net
on 27 Nov 2010 at 7:29
Attachments:
I was able to reproduce this problem. The crash happens in the Cecil library
even when no obfuscation is done at all.
Obfuscar uses Cecil version 0.6 by now. The current version is 0.9 which is a
complete rewrite of the library.
The API has changed and I am currently porting Obfuscar to this version. I did
a simple test with your assembly and it seems to handle it without crashing.
I think the best thing is to wait until the port to Cecil 0.9 is ready. I hope
that I will have something working this week.
Original comment by webbi...@gmail.com
on 29 Nov 2010 at 8:10
I just uploaded version 2.0.0 of Obfuscar. It uses the 0.9 version of Cecil.
I tried this version on your test assembly. It seems to get saved correctly.
The result starts and shows its GUI.
Original comment by webbi...@gmail.com
on 3 Dec 2010 at 3:54
The latest update to SVN binaries worked perfectly.
All our obfuscation issues are now resolved!
Thanks for your incredible support.
beta: SVN C# source wont compile though, needs update ? :)
***Obfuscator.cs *** line 37 using Mono.Collections.Generic; // undef'd
Original comment by st...@starraudio.com
on 3 Dec 2010 at 6:50
I removed the "using Mono.Collections.Generic" from SVN.
It had no effect. Jumped in when I was testing something.
Original comment by webbi...@gmail.com
on 3 Dec 2010 at 8:04
Original issue reported on code.google.com by
star...@cox.net
on 26 Nov 2010 at 8:53