radioegor146 / native-obfuscator

Java .class to .cpp converter for use with JNI
GNU General Public License v3.0
499 stars 67 forks source link

issue with that "SYNTHETIC_LOCAL_VARIABLE" thing that i see in my decompiler. #59

Closed cwoodard1121 closed 2 years ago

cwoodard1121 commented 2 years ago

Exception in thread "main" java.lang.VerifyError: Bad local variable type. This comes after another error, when compiling the c++ it says that clocal0 is not defined, i added it as a jvalue but that gave me this other error.

:\b\out\cpp\output\Main.cpp(137,9): error C2065: 'clocal0': undeclared identifier [C:\b\out\cpp\native_library.vcxproj] C:\b\out\cpp\output\Main.cpp(137,38): error C2065: 'clocal0': undeclared identifier [C:\b\out\cpp\native_library.vcxproj]

radioegor146 commented 2 years ago

Can you provide class file? Is VerifyError presented when running java only version?

cwoodard1121 commented 2 years ago

VerifyError occurs when I run the jar that has been obfuscated I will send both the pre obfuscation class file and post. Also, when compiling into a DLL the clocal0 variable is missing which could have something to do with this. https://github.com/cwoodard1121/JNI-Testing Pre and post obfuscation classes, as well as the C++ file is in here.

radioegor146 commented 2 years ago

Can you repeat that with the latest version of obfuscator from the beginning? Also, if you'll attach CLI arguments that you provide to obfuscator, that will help.

cwoodard1121 commented 2 years ago

I will try that soon, the arguments I used were just "java -jar obfuscator.jar input.jar out". "out" is the folder that I want the obfuscated jar and c++ files to go.

cwoodard1121 commented 2 years ago

Thank you so much, the newest update fixed the issue!

cwoodard1121 commented 2 years ago

One more thing, before I was using the plain params flag, the default directory is "/native0/", which doesn't work. I think removing the first / would fix it.