-
Notifications
You must be signed in to change notification settings - Fork 986
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
Memory leaks, the ticket to end all tickets #335
Labels
Comments
spyhunter99
added a commit
that referenced
this issue
Jun 22, 2016
…is the blocking item at the moment
spyhunter99
added a commit
that referenced
this issue
Jun 25, 2016
spyhunter99
added a commit
that referenced
this issue
Jun 29, 2016
spyhunter99
added a commit
that referenced
this issue
Jun 29, 2016
spyhunter99
added a commit
that referenced
this issue
Jun 29, 2016
spyhunter99
added a commit
that referenced
this issue
Jun 29, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 1, 2016
# Conflicts: # osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java also fixes for more memory leaks in FolderOverlay
spyhunter99
added a commit
that referenced
this issue
Jul 1, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 1, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 1, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 5, 2016
… after running much longer tests, it revealed that there was still another leak with the ExampleActivity which is now fixed NOJIRA - removing the silly copy sources task in favor of a source redirector (gradle build only) NOJIRA - adding Leak Canary and ACRA for leak testing and crash logging
spyhunter99
added a commit
that referenced
this issue
Jul 5, 2016
…pears to be a timing issue. This patch should resolve it and reduce the wait time
spyhunter99
added a commit
that referenced
this issue
Jul 5, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 5, 2016
spyhunter99
added a commit
that referenced
this issue
Jul 6, 2016
# Conflicts: # OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/SampleFactory.java
near ready for merging |
spyhunter99
added a commit
that referenced
this issue
Jul 9, 2016
# Conflicts: # OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/SampleFactory.java # osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/IFilesystemCache.java # osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/SqlTileWriter.java # osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java
This was referenced Sep 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This ticket shall cover the multitude of memory leaks within osmdroid. These leaks (typically) only occur when destroying and creating the mapview multiple times in a session. Related tickets #57 #328 #318 #283 and probably many others.
I've been silently working on this issue for a few days. Here's a few notes on the issue.
The AS 2.1 and newer apparently no longer has the memory and cpu telemetry in the IDE. Grrr
Finding root causes of leaks is a real pain with lots of guessing and checking
Leaks behave differently on different versions of android.
Many of the leaks, but not all, are really on present issues for those that run osmdroid in a fragment
Many of the leaks only affect the sample application. But if the sample app "is the right way do use osmdroid", then we should definitely fix it.
To setup the test environment, I've been modifying the unit tests to run the same example fragment 100 times with memory counters on start and stop. I've also adding instrumentation to the aar library to keep counters of OOM exceptions, which is used to force and earlier termination of the tests. In the future, it may be useful to developers that use osmdroid to detect error conditions. Currently, many of the internal error states simply are not accessible programmatically anywhere.
This ticket also reduces the number of static variables used within many of the overlay classes to enable those variables to be GC'd. It also covers the LRUCache which doesn't get purged when the mapview is destroyed, which is clearly a problem.
More information to come
The text was updated successfully, but these errors were encountered: