Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leaks de.westnordost.streetcomplete.MainActivity instance #807

Closed
matkoniecz opened this issue Jan 27, 2018 · 4 comments
Closed

leaks de.westnordost.streetcomplete.MainActivity instance #807

matkoniecz opened this issue Jan 27, 2018 · 4 comments
Labels
bug upstream result from an upstream issue

Comments

@matkoniecz
Copy link
Member

Leak detection enabled in Dev mode regularly detects that Main activity is leaked, but as it was happening in my fork build I was not reporting it.

Today I confirmed that it happens also in Dev build of unmodified SC.

Is it something unimportant (leaked memory is below 100kb, usually around 30kb and not very often), or something already investigated and turned out to be unfixable?

Would it be useful to provide loss produced by leak detection tool?

@westnordost
Copy link
Member

Yes, it would.

@matkoniecz
Copy link
Member Author

matkoniecz commented Jan 28, 2018

posted to https://gist.github.com/matkoniecz/b2c28afaf9e9e9378624cc812e9d65e8 (485 KB one was unusually large)

First was triggered by activities like rotating phone, browsing quests (without solving them) and switching to other apps without other activity that seems relevant

Second was triggered by activities like browsing quests (without solving them) and switching to other apps without other activity that seems relevant

@matkoniecz
Copy link
Member Author

leak was triggered on SC trunk, revision 9f25eeb

@westnordost
Copy link
Member

Actually, this screenshot from the LeakCanary app is the most useful thing. Usually, it is immediately apparent from the "stack trace" what is the problem.
That trace seems to be included in the log you posted as well, if I understand it right...

In de.westnordost.streetcomplete.debug:4.0-beta1:400.
* de.westnordost.streetcomplete.MainActivity has leaked:
* GC ROOT com.mapzen.tangram.MapController.mapView
* references android.opengl.GLSurfaceView.mContext
* leaks de.westnordost.streetcomplete.MainActivity instance

then it seems the leak is caused by tangram's MapView. I checked if the MapFragment correctly forwards the calls to onDestroy, onResume, onPause etc. to the MapView. It does, so there is no error in StreetComplete.
If the leak is reproducable, it should be reported to Tangram-Es.

@riQQ riQQ added the upstream result from an upstream issue label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream result from an upstream issue
Projects
None yet
Development

No branches or pull requests

3 participants