evant / gradle-retrolambda

A gradle plugin for getting java lambda support in java 6, 7 and android
Apache License 2.0
5.3k stars 449 forks source link

app crash when a breakpoint in lambda code body #230

Open feichangaihu opened 7 years ago

feichangaihu commented 7 years ago

Log.e("cxy","heihei"); LambdaFI fi = () -> { LambdaActivity fi1 = this; Log.e("cxy","heihei"); }; fi.onClick();

public interface LambdaFI { public void onClick(); }

when i set a breakpoint at third line(LambdaActivity fi1 = this;) to debug, the app has crash. what ever third or fouth line , just has a breakpoint in the code body be crash.if i set breakpoint at first or second or sixth is ok. the logcat info is : 01-21 20:43:47.755 777-4520/? I/WindowState: WIN DEATH: Window{ac8f382 u0 com.a5i_mobile.com.networktest/com.a5imobile.networktest.MainActivity} 01-21 20:43:47.762 777-961/? I/WindowState: WIN DEATH: Window{9f9f839 u0 com.a5i_mobile.com.networktest/com.a5imobile.networktest.testrxandroid.RxAndroidMainActivity} 01-21 20:43:47.780 210-210/? I/Zygote: Process 15116 exited due to signal (11) 01-21 20:43:47.783 777-789/? I/ActivityManager: Process com.a5i_mobile.com.networktest (pid 15116) has died 01-21 20:43:47.784 777-789/? W/ActivityManager: Force removing ActivityRecord{ab1c0a6 u0 com.a5i_mobile.com.networktest/com.a5imobile.networktest.testrxandroid.RxAndroidMainActivity t3847}: app died, no saved state 01-21 20:43:47.802 777-789/? I/ActivityManager: Start proc 21260:com.a5i_mobile.com.networktest/u0a246 for activity com.a5i_mobile.com.networktest/com.a5imobile.networktest.MainActivity

feichangaihu commented 7 years ago

i find that's operation run on others phone is no problem except nexus 5 with offical image android 6.0

evant commented 7 years ago

Can you retest with retrolambda 2.5.0 either by setting it explicitly or using 3.5.0 of the gradle-retrolambda plugin?

feichangaihu commented 7 years ago

l'm try the two version, that's problem still exist