janvidar / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

InvalidTryException: Multiple overlapping catches #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
Getting an exception when recompiling an app with smali:
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib2.writer.util.TryListBuilder$InvalidTryException: Multiple 
overlapping catches for Ljava/io/IOException; with different handlers

What is the exact smali/baksmali command that you ran?
java -jar smali-2.0.3.jar out

What version of smali/baksmali are you using? What rom are you working
from?
v2.0.3

What is the airspeed velocity of an unladen swallow?

Please provide any additional information below: error messages, symptoms,
etc.
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib2.writer.util.TryListBuilder$InvalidTryException: Multiple 
overlapping catches for Ljava/io/IOException; with different handlers
        at org.jf.dexlib2.writer.util.TryListBuilder$MutableTryBlock.addHandler(TryListBuilder.java:180)
        at org.jf.dexlib2.writer.util.TryListBuilder.addHandler(TryListBuilder.java:311)
        at org.jf.dexlib2.writer.util.TryListBuilder.massageTryBlocks(TryListBuilder.java:69)
        at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:883)
        at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:759)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:214)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:192)
        at org.jf.smali.main.main(main.java:229)

Original issue reported on code.google.com by dongjuna...@gmail.com on 2 Jul 2014 at 6:15

GoogleCodeExporter commented 9 years ago
Are you recompiling the unmodified smali that baksmali produced, or did you 
make changes?

Original comment by jesusfreke@jesusfreke.com on 2 Jul 2014 at 8:19

GoogleCodeExporter commented 9 years ago
I am recompiling the unmodified smali that baksmali produced.

Original comment by dongjuna...@gmail.com on 2 Jul 2014 at 8:32

GoogleCodeExporter commented 9 years ago
What application?

Original comment by jesusfreke@jesusfreke.com on 2 Jul 2014 at 8:35

GoogleCodeExporter commented 9 years ago
I narrowed it down to 2 consecutive lines of smali code that is causing the 
issue:
    .catch Ljava/net/MalformedURLException; {:try_start_10 .. :try_end_17} :catch_18
    .catch Ljava/net/MalformedURLException; {:try_start_10 .. :try_end_17} :catch_49

Does this mean that the app had two different catch blocks for the same 
exception?

Original comment by dongjuna...@gmail.com on 2 Jul 2014 at 10:59

GoogleCodeExporter commented 9 years ago
Perfect, thanks. That should be enough info to reproduce the problem

Original comment by jesusfreke@jesusfreke.com on 3 Jul 2014 at 3:38

GoogleCodeExporter commented 9 years ago
Fixed in 
https://code.google.com/p/smali/source/detail?r=0d8418ff1f253471dc5f579ec5b4976c
08649a09

Original comment by jesusfreke@jesusfreke.com on 22 Jul 2014 at 2:00