Service org.microg.nlp.location.LocationServiceV2 has leaked ServiceConnection org.microg.nlp.location.BackendHelper
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
I noticed this backtrace in logcat when viewing something unrelated, and thought I would report it. I'm running:
ug unified nlp: 0.2.4-8-g2fa70c1
LocalWifiNlpBackend: 1.1.6
LocalGsmNlpBackend: 1.4.7
```
09-10 08:56:36.246 31295 31295 E ActivityThread: Service org.microg.nlp.location.LocationServiceV2 has leaked ServiceConnection org.microg.nlp.location.BackendHelper@9940075 that was originally bound here
09-10 08:56:36.246 31295 31295 E ActivityThread: android.app.ServiceConnectionLeaked: Service org.microg.nlp.location.LocationServiceV2 has leaked ServiceConnection org.microg.nlp.location.BackendHelper@9940075 that was originally bound here
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1093)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:987)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1313)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.app.ContextImpl.bindService(ContextImpl.java:1296)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.content.ContextWrapper.bindService(ContextWrapper.java:610)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.AbstractBackendHelper.bind(AbstractBackendHelper.java:94)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.location.BackendFuser.bind(BackendFuser.java:75)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.location.ThreadHelper.enable(ThreadHelper.java:66)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.location.ThreadHelper.reload(ThreadHelper.java:39)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.location.LocationProviderV2.reload(LocationProviderV2.java:59)
09-10 08:56:36.246 31295 31295 E ActivityThread: at org.microg.nlp.location.AbstractLocationService.onHandleIntent(AbstractLocationService.java:77)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.os.Handler.dispatchMessage(Handler.java:102)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.os.Looper.loop(Looper.java:148)
09-10 08:56:36.246 31295 31295 E ActivityThread: at android.os.HandlerThread.run(HandlerThread.java:61)
09-10 08:56:36.258 31295 31295 E ActivityThread: Service org.microg.nlp.location.LocationServiceV2 has leaked ServiceConnection org.microg.nlp.location.BackendHelper@ba6080a that was originally bound here
09-10 08:56:36.258 31295 31295 E ActivityThread: android.app.ServiceConnectionLeaked: Service org.microg.nlp.location.LocationServiceV2 has leaked ServiceConnection org.microg.nlp.location.BackendHelper@ba6080a that was originally bound here
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1093)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:987)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1313)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.app.ContextImpl.bindService(ContextImpl.java:1296)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.content.ContextWrapper.bindService(ContextWrapper.java:610)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.AbstractBackendHelper.bind(AbstractBackendHelper.java:94)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.location.BackendFuser.bind(BackendFuser.java:75)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.location.ThreadHelper.enable(ThreadHelper.java:66)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.location.ThreadHelper.reload(ThreadHelper.java:39)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.location.LocationProviderV2.reload(LocationProviderV2.java:59)
09-10 08:56:36.258 31295 31295 E ActivityThread: at org.microg.nlp.location.AbstractLocationService.onHandleIntent(AbstractLocationService.java:77)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.os.Handler.dispatchMessage(Handler.java:102)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.os.Looper.loop(Looper.java:148)
09-10 08:56:36.258 31295 31295 E ActivityThread: at android.os.HandlerThread.run(HandlerThread.java:61)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the reported binding path from org.microg.nlp.AbstractBackendHelper.bind at AbstractBackendHelper.java:94 through BackendFuser.java:75, ThreadHelper, LocationProviderV2, and AbstractLocationService.onHandleIntent. Reproduce the lifecycle that emits the logcat warning and determine the expected cleanup; done means the leaked ServiceConnection warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100