I just found that ProGuard removed a .wait() call which I used to synchronize threads, which lead to a race condition which lead to a day of happy debugging :) Anyway...
I tracked it down to following piece of proguard configuration:
-assumenosideeffects public class android.util.Log {
<methods>;
}
I want to understand WHY this happened. I am not sure why assuming that removal of Log class has no side effects leads to removal of .wait() on different class/object.
I saw ProGuard optimization also remove #wait() calls where Eric explains that such things may happen. However, he doesn't explain why.
Also, I found example how to remove Logs here (http://proguard.sourceforge.net/index.html#manual/examples.html). So, I can replace this piece of proguard of configuration (but it's not the point of this question).
Your original configuration matches all methods of Log (explicit or inherited), including Object#wait(). It tells ProGuard that the wait() method has no side-effects and that it can be removed without harming the program. This is obviously not true, as you have noticed. With -assumenosideeffects, you should always explicitly list the methods that are safe to remove.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With