Home | History | Annotate | Download | only in manual
      1 <!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      2 <html>
      3 <head>
      4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
      5 <meta http-equiv="content-style-type" content="text/css">
      6 <link rel="stylesheet" type="text/css" href="style.css">
      7 <title>ProGuard Limitations</title>
      8 </head>
      9 <body>
     10 
     11 <script type="text/javascript" language="JavaScript">
     12 <!--
     13 if (window.self==window.top)
     14   document.write('<a class="largebutton" target="_top" href="../index.html#manual/limitations.html">ProGuard index</a> <a class="largebutton" target="_top" href="http://www.saikoa.com/dexguard">DexGuard</a> <a class="largebutton" target="_top" href="http://www.saikoa.com/">Saikoa</a> <a class="largebutton" target="other" href="http://sourceforge.net/projects/proguard/">Sourceforge</a>')
     15 //-->
     16 </script>
     17 <noscript>
     18 <a class="largebutton" target="_top"  href="../index.html#manual/limitations.html">ProGuard index</a>
     19 <a class="largebutton" target="_top"  href="http://www.saikoa.com/dexguard">DexGuard</a>
     20 <a class="largebutton" target="_top"  href="http://www.saikoa.com/">Saikoa</a>
     21 <a class="largebutton" target="other" href="http://sourceforge.net/projects/proguard/">Sourceforge</a>
     22 </noscript>
     23 
     24 <h2>Limitations</h2>
     25 
     26 When using ProGuard, you should be aware of a few technical issues, all of
     27 which are easily avoided or resolved:
     28 <p>
     29 <ul class="spacious">
     30 
     31 <li>For best results, ProGuard's optimization algorithms assume that the
     32     processed code never <b>intentionally throws NullPointerExceptions</b> or
     33     ArrayIndexOutOfBoundsExceptions, or even OutOfMemoryErrors or
     34     StackOverflowErrors, in order to achieve something useful. For instance,
     35     it may remove a method call <code>myObject.myMethod()</code> if that call
     36     wouldn't have any effect. It ignores the possibility that
     37     <code>myObject</code> might be null, causing a NullPointerException. In
     38     some way this is a good thing: optimized code may throw fewer exceptions.
     39     Should this entire assumption be false, you'll have to switch off
     40     optimization using the <code>-dontoptimize</code> option.</li>
     41 
     42 <li>ProGuard's optimization algorithms currently also assume that the
     43     processed code never creates <b>busy-waiting loops</b> without at least
     44     testing on a volatile field. Again, it may remove such loops. Should this
     45     assumption be false, you'll have to switch off optimization using
     46     the <code>-dontoptimize</code> option.</li>
     47 
     48 <li>If an input jar and a library jar contain classes in the <b>same
     49     package</b>, the obfuscated output jar may contain class names that
     50     overlap with class names in the library jar. This is most likely if the
     51     library jar has been obfuscated before, as it will then probably contain
     52     classes named 'a', 'b', etc. Packages should therefore never be split
     53     across input jars and library jars.</li>
     54 
     55 <li>When obfuscating, ProGuard writes out class files named
     56     "<code>a.class</code>", "<code>b.class</code>", etc. If a package contains
     57     a large number of classes, ProGuard may also write out
     58     <b>"<code>aux.class</code>"</b>. Inconveniently, Windows refuses to create
     59     files with this reserved name (among a few other names). It's generally
     60     better to write the output to a jar, in order to avoid such problems.</li>
     61 
     62 </ul>
     63 
     64 <hr />
     65 <address>
     66 Copyright &copy; 2002-2014
     67 <a target="other" href="http://www.lafortune.eu/">Eric Lafortune</a> @ <a target="top" href="http://www.saikoa.com/">Saikoa</a>.
     68 </address>
     69 </body>
     70 </html>
     71