4

When using LogCat the logs are shown three times. Can anyone explain why this is happening? A sample of the Log:

04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries

04-24 15:45:30.434: DEBUG/jdwp(351): JDWP shutting down net...

04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries

04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up

04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed

04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up

04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed

04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up

04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed

04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)

04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}

04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}

04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}

04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request

04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms

04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)

04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }

04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9

04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9

04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
Navigatron
  • 2,065
  • 6
  • 32
  • 61

2 Answers2

5

This happened to me a few times. Try resetting the DDMS (it's a hidden option in Eclipse, look for the down arrow next to the "Screenshot" button).

dmon
  • 30,048
  • 8
  • 87
  • 96
0

If you are using libraries like Timber for Logging, check your CustomApplication class. You might be initializing your library multiple times like:

public class CustomApplication extends Application {
  @Override public void onCreate() {
    super.onCreate();

    if (BuildConfig.DEBUG) {
      Timber.plant(new DebugTree());
      Timber.plant(new DebugTree());
    }
  }
}
Saman Sattari
  • 3,322
  • 6
  • 30
  • 46