CalebFenton / simplify

Android virtual machine and deobfuscator
Other
4.45k stars 438 forks source link

Dex Writing Error : New Issue related to #150 #163

Open apkunpacker opened 3 years ago

apkunpacker commented 3 years ago

classes.dex.zip Error is same as of https://github.com/CalebFenton/simplify/issues/150 writing dex after simplification but with different type

java -jar simplify.jar --max-call-depth 999 --max-address-visits 999 --max-method-visits 999 --ignore-error classes.dex 

.....
 Optimizations:                                                        
  constantized ifs = 0                                           
  constantized ops = 2                                            
  dead assignments removed = 3                                    
  dead ops removed = 0                                            
  dead results removed = 1                                        
  nops removed = 0                                                
  peephole optmizations = 0                                       
  unreflected fields = 0                                          
  unreflected methods = 0                                         
  useless gotos removed = 0                               
Simplification complete:                                                
  total classes = 38                                             
  total methods = 3                                               
optimized methods = 415                                         
  failed methods = 72                                             
  run time = 142047 ms                                    
Total optimizations:                                                    
  constantized ifs = 268                                          
  constantized ops = 327                                          
  dead assignments removed = 349                                  
  dead ops removed = 239                                          
  dead results removed = 288                                      
  nops removed = 268                                              
  peephole optmizations = 0                                       
  unreflected fields = 0                                          
  unreflected methods = 0                                         
  useless gotos removed = 0                               
Writing output to classes_simple.dex                            
Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract!                         
   at java.base/java.util.TimSort.mergeHi(Unknown Source)          
   at java.base/java.util.TimSort.mergeAt(Unknown Source)          
   at java.base/java.util.TimSort.mergeCollapse(Unknown Source)                                                                    
   at java.base/java.util.TimSort.sort(Unknown Source)             
   at java.base/java.util.Arrays.sort(Unknown Source)              
   at java.base/java.util.ArrayList.sort(Unknown Source)           
   at java.base/java.util.Collections.sort(Unknown Source)         
   at org.jf.dexlib2.writer.DexWriter.writeStrings(DexWriter.java:415)                                                             
   at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:312)                                                                  
   at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:300)                                                                  
   at org.cf.simplify.Launcher.run(Launcher.java:148)              
   at org.cf.simplify.Main.main(Main.java:13)