desword / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
1 stars 0 forks source link

java.lang.NullPointerException when devoding in DEBUG mode (-d) #655

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. apktool d -d *.apk ./decode_debug >> decode_debug.logs 2>&1

What is the expected output? What do you see instead?

Received multiple errors of this type:
Error occured while disassembling class 
Landroid.support.v4.app.FragmentActivity; - skipping class
java.lang.NullPointerException
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeAgetObject(MethodAnalyzer.java:2508)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:785)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:338)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:310)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:186)
    at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:49)
    at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
    at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:74)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:89)
    at brut.apktool.Main.cmdDecode(Main.java:146)
    at brut.apktool.Main.main(Main.java:77)

What version of the product are you using? On what operating system?
latest version (1.5.2) on ubuntu 14.04; java 1.8

Please provide any additional information below.
when decoding without the DEBUG option it worked properly 

Original issue reported on code.google.com by cyber.do...@gmail.com on 13 Jul 2014 at 12:28

GoogleCodeExporter commented 9 years ago
btw, I tried to clone the repository and find the error in MethodAnalyzer but 
the sources differ from the line numbers from the error output.

Original comment by cyber.do...@gmail.com on 13 Jul 2014 at 12:31

GoogleCodeExporter commented 9 years ago

Original comment by connor.tumbleson on 14 Jul 2014 at 2:13