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

All resources are not released in Service.onDestory #265

Closed
GoogleCodeExporter opened this issue Apr 22, 2015 · 1 comment
Closed

All resources are not released in Service.onDestory #265

GoogleCodeExporter opened this issue Apr 22, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Install Mozc 2.16.2007.103 to Nexus 5 / Android 5.0.1 (LRX22C)
2. Install AOSP keyboard (based on android-5.0.2_r1)
   https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/android-5.0.2_r1
3. Make sure that only Mozc and AOSP keyboard are enabled.
4. Tap any text field to show the keyboard.
5. Dump memory resources of Mozc with adb as follows.
   adb shell dumpsys meminfo org.mozc.android.inputmethod.japanese
6. Tap the Globe key again and again to rotate keyboards between Mozc and AOSP 
keyboard.
7. Dump memory resources of Mozc with adb again.

What is the expected output?
Memory resources is not steadily increasing.

What do you see instead?
Views count and GL memory increase in proportion to the iteration count.

Please use labels and text to provide additional information.

Here are some outputs of 'adb shell dumpsys meminfo' command.

====  Initial  =============================================================

Applications Memory Usage (kB):
Uptime: 816734 Realtime: 816725

** MEMINFO in pid 7815 [org.mozc.android.inputmethod.japanese] **
                   Pss  Private  Private  Swapped     Heap     Heap     Heap
                 Total    Dirty    Clean    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------   ------
  Native Heap    21360    21312        0        0    27255    27255    20872
  Dalvik Heap    13882    13504        0        0    35524    27555     7969
 Dalvik Other      860      732        0        0
        Stack      436      436        0        0
       Ashmem      128       72        0        0
    Other dev     6498     4424        4        0
     .so mmap     9857      704     2864        0
    .apk mmap     4566        0     4344        0
    .ttf mmap      275        0       56        0
    .dex mmap     4483        0     3952        0
    code mmap     1383        0      284        0
   image mmap     1210      960        8        0
   Other mmap      979        4      480        0
     Graphics    39808    39808        0        0
           GL    15540    15540        0        0
      Unknown     2880     2880        0        0
        TOTAL   124145   100376    11992        0    62779    54810    28841

 Objects
               Views:      277         ViewRootImpl:        3
         AppContexts:        4           Activities:        2
              Assets:        4        AssetManagers:        4
       Local Binders:       17        Proxy Binders:       19
    Death Recipients:        0
     OpenSSL Sockets:        0

 SQL
         MEMORY_USED:        0
  PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0


 Asset Allocations
    zip:/data/app/org.mozc.android.inputmethod.japanese-1/base.apk:/assets/subset_font.otf: 68K


====  One iteration  =======================================================

Applications Memory Usage (kB):
Uptime: 934683 Realtime: 934675

** MEMINFO in pid 7815 [org.mozc.android.inputmethod.japanese] **
                   Pss  Private  Private  Swapped     Heap     Heap     Heap
                 Total    Dirty    Clean    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------   ------
  Native Heap    23119    23072        0        0    29540    29540    20635
  Dalvik Heap    13626    13244        0        0    38213    27750    10463
 Dalvik Other      980      980        0        0
        Stack      440      440        0        0
       Ashmem      128       72        0        0
    Other dev     7966     4584        4        0
     .so mmap    10521      704     3484        0
    .apk mmap     4595        0     4348        0
    .ttf mmap      275        0       56        0
    .dex mmap     5483        0     4952        0
    code mmap     1484        0      288        0
   image mmap     1887     1080        0        0
   Other mmap     1001        4      492        0
     Graphics    39808    39808        0        0
           GL    18064    18064        0        0
      Unknown     2880     2880        0        0
        TOTAL   132257   104932    13624        0    67753    57290    31098

 Objects
               Views:      280         ViewRootImpl:        3
         AppContexts:        5           Activities:        2
              Assets:        4        AssetManagers:        4
       Local Binders:       22        Proxy Binders:       22
    Death Recipients:        0
     OpenSSL Sockets:        0

 SQL
         MEMORY_USED:        0
  PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0


 Asset Allocations
    zip:/data/app/org.mozc.android.inputmethod.japanese-1/base.apk:/assets/subset_font.otf: 68K


====  Two iterations  ======================================================

Applications Memory Usage (kB):
Uptime: 948418 Realtime: 948410

** MEMINFO in pid 7815 [org.mozc.android.inputmethod.japanese] **
                   Pss  Private  Private  Swapped     Heap     Heap     Heap
                 Total    Dirty    Clean    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------   ------
  Native Heap    23331    23284        0        0    29599    29599    20576
  Dalvik Heap    13570    13188        0        0    39727    27621    12106
 Dalvik Other      932      932        0        0
        Stack      444      444        0        0
       Ashmem      128       72        0        0
    Other dev     9540     4808        4        0
     .so mmap    10521      704     3484        0
    .apk mmap     4595        0     4348        0
    .ttf mmap      275        0       56        0
    .dex mmap     5483        0     4952        0
    code mmap     1485        0      288        0
   image mmap     1887     1080        0        0
   Other mmap     1001        4      492        0
     Graphics    39808    39808        0        0
           GL    21048    21048        0        0
      Unknown     2880     2880        0        0
        TOTAL   136928   108252    13624        0    69326    57220    32682

 Objects
               Views:      325         ViewRootImpl:        3
         AppContexts:        6           Activities:        2
              Assets:        4        AssetManagers:        4
       Local Binders:       27        Proxy Binders:       24
    Death Recipients:        0
     OpenSSL Sockets:        0

 SQL
         MEMORY_USED:        0
  PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0


 Asset Allocations
    zip:/data/app/org.mozc.android.inputmethod.japanese-1/base.apk:/assets/subset_font.otf: 68K


====  Many iterations  =====================================================

Applications Memory Usage (kB):
Uptime: 970908 Realtime: 970900

** MEMINFO in pid 7815 [org.mozc.android.inputmethod.japanese] **
                   Pss  Private  Private  Swapped     Heap     Heap     Heap
                 Total    Dirty    Clean    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------   ------
  Native Heap    25263    25216        0        0    32089    32089    19110
  Dalvik Heap    22306    21924        0        0    42615    36595     6020
 Dalvik Other     1136     1136        0        0
        Stack      484      484        0        0
       Ashmem      128       72        0        0
    Other dev    32022    20600        4        0
     .so mmap    10521      704     3484        0
    .apk mmap     4603        0     4348        0
    .ttf mmap      275        0       56        0
    .dex mmap     5531        0     5000        0
    code mmap     1518        0      300        0
   image mmap     1886     1080        0        0
   Other mmap     1001        4      492        0
     Graphics    39808    39808        0        0
           GL    50760    50760        0        0
      Unknown     2880     2880        0        0
        TOTAL   200122   164668    13684        0    74704    68684    25130

 Objects
               Views:      775         ViewRootImpl:        3
         AppContexts:       16           Activities:        2
              Assets:        4        AssetManagers:        4
       Local Binders:       34        Proxy Binders:       44
    Death Recipients:        0
     OpenSSL Sockets:        0

 SQL
         MEMORY_USED:        0
  PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0


 Asset Allocations
    zip:/data/app/org.mozc.android.inputmethod.japanese-1/base.apk:/assets/subset_font.otf: 68K

Original issue reported on code.google.com by [email protected] on 1 Jan 2015 at 9:13

Attachments:

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r474.

Original comment by [email protected] on 1 Jan 2015 at 9:29

  • Changed state: Fixed

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

No branches or pull requests

1 participant