Share

ProGuard Java Optimizer and Obfuscator

Subscribe

Proplem with Optimization

  1. 2009-09-29 08:23:54 UTC

    Hello,

    I have a problem with feature optimize of proguard. It removes my code and make me some problem ~~. Could anyone help me to solve that problem. I use proguard version 4.3 and also check with ver 3.9.

    Here is my code:(It's so dummy ~~)

    duraTime = duration;

    new Thread() {

    public void run()
    {
    
                long startTime = System.currentTimeMillis();
                long curTime = 0;
                boolean isOff = false ;
                Sound.On();
                while(!isOff)
                {
                    curTime = System.currentTimeMillis();
                    if(curTime > startTime + duraTime)
                        isOff = true;
                }
                Sound.Off();
            }
    

    }.start();

    And the code after optimize (I use JAD to decompile byte code)

    duraTime = i; (new Thread() {

            public final void run()
            {
                Sound.On();
                Sound.Off();
            }
    
        }
    

    Seem the loop had been removed * _ *.

    Thanks for read it Seal

  2. 2009-09-29 23:01:08 UTC

    Cfr. ProGuard manual > Troubleshooting > Problems at run-time > Disappearing loops

    The program runs a lot faster without that busy-waiting loop! You'll have to find a better way to pause, or remove the options -assumenosideeffects ...,or switch off optimization in ProGuard.

  3. 2009-09-30 02:38:48 UTC

    Thanks , I didn't read the troubleshooting first ~~

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.