Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
apkunpacker opened this issue Aug 16, 2021 · 0 comments
Open

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

apkunpacker opened this issue Aug 16, 2021 · 0 comments

Comments

@apkunpacker
Copy link

classes.dex.zip
Error is same as of #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) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant