pwittchen / ReactiveNetwork

Android library listening network connection state and Internet connectivity with RxJava Observables
http://pwittchen.github.io/ReactiveNetwork/docs/RxJava2.x/
Apache License 2.0
2.53k stars 276 forks source link

Error: IntentReceiverLeaked: Activity #419

Open adaonder opened 4 years ago

adaonder commented 4 years ago

Android 8.1. Device: Hytera PNC550

Log

2020-03-23 08:16:57.548 2717-2717/com.globme.timeware E/ActivityThread: Activity com.globme.timeware.activity.BootstrapActivity has leaked IntentReceiver com.github.pwittchen.reactivenetwork.library.rx2.network.observing.strategy.MarshmallowNetworkObservingStrategy$4@d9d1f53 that was originally registered here. Are you missing a call to unregisterReceiver()? android.app.IntentReceiverLeaked: Activity com.globme.timeware.activity.BootstrapActivity has leaked IntentReceiver com.github.pwittchen.reactivenetwork.library.rx2.network.observing.strategy.MarshmallowNetworkObservingStrategy$4@d9d1f53 that was originally registered here. Are you missing a call to unregisterReceiver()? at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:1351) at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1132) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1421) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1394) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1382) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:609) at com.github.pwittchen.reactivenetwork.library.rx2.network.observing.strategy.MarshmallowNetworkObservingStrategy.registerIdleReceiver(MarshmallowNetworkObservingStrategy.java:116) at com.github.pwittchen.reactivenetwork.library.rx2.network.observing.strategy.MarshmallowNetworkObservingStrategy.observeNetworkConnectivity(MarshmallowNetworkObservingStrategy.java:73) at com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork.observeNetworkConnectivity(ReactiveNetwork.java:92) at com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork.observeNetworkConnectivity(ReactiveNetwork.java:73) at com.globme.common.activity.AbstractActivity.onResume(AbstractActivity.java:100) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1356) at android.app.Activity.performResume(Activity.java:7131) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3559) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3624) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2865) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1592) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6518) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

pwittchen commented 4 years ago

Thanks for reporting this issue. Can you provide any steps to reproduce? When this problem occur? It seems to be the same issue as in #412