Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Sharabaddin/a4a75521887b9490ac67b4dfb501a455 to your computer and use it in GitHub Desktop.
Save Sharabaddin/a4a75521887b9490ac67b4dfb501a455 to your computer and use it in GitHub Desktop.
Crash MediaPlayer when GC
10-16 16:30:21.094 12741-12741/com.sharabaddin.aprivate.automaticvoicerecorderrefactor I/ActivityManager: Timeline: Activity_idle id: android.os.BinderProxy@41e49f08 time:66818500
10-16 16:30:22.604 12741-12741/com.sharabaddin.aprivate.automaticvoicerecorderrefactor I/ActivityManager: Timeline: Activity_idle id: android.os.BinderProxy@41e49f08 time:66820012
10-16 16:30:23.434 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.434 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.434 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.444 12741-12741/com.sharabaddin.aprivate.automaticvoicerecorderrefactor D/dalvikvm: GC_FOR_ALLOC freed 582K, 9% free 7845K/8596K, paused 42ms, total 53ms
10-16 16:30:23.444 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.454 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaRecorderJNI: finalize
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaRecorderJNI: release
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.464 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaRecorderJNI: finalize
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaRecorderJNI: release
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.474 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.484 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.484 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.504 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor W/MediaPlayer-JNI: MediaPlayer finalized without being released
10-16 16:30:23.504 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: setListener
10-16 16:30:23.504 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.544 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: destructor
10-16 16:30:23.544 12741-12750/com.sharabaddin.aprivate.automaticvoicerecorderrefactor V/MediaPlayer[Native]: disconnect
10-16 16:30:23.604 12741-12741/com.sharabaddin.aprivate.automaticvoicerecorderrefactor I/ActivityManager: Timeline: Activity_idle id: android.os.BinderProxy@41e49f08 time:66821017
10-16 16:30:24.664 12741-12741/com.sharabaddin.aprivate.automaticvoicerecorderrefactor I/ActivityManager: Timeline: Activity_idle id: android.os.BinderProxy@41e49f08 time:66822079
@Sharabaddin
Copy link
Author

Sharabaddin commented Oct 16, 2017

Fast Solve: MediaPlayer must declare in field class(not in inner method) and static(maybe for u its not must)!
Explainand and detail: https://stackoverflow.com/questions/15023037/garbage-collection-causes-mediaplayer-finalized-without-being-released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment