5

While developing my app on a Moto G, I often encounter tens of thousands of below messages flooding the log.

E/MM_OSAL (  275): isSamePayload Sync byte(0x47) not found!! m_nCurrOffset=0
E/MM_OSAL (  275): isSamePayload Sync byte(0x47) not found!! m_nCurrOffset=0
... repeated 20000 times in a span of 12 secs
D/WifiStateMachine(1004): processMsg: L2ConnectedState
D/WifiStateMachine(1004): handleMessage: X
D/WifiStateMachine(1004): handleMessage: E msg.what=131155
... repeated 15000+ times all interspersed together

Now, of course I have set Logcat filters but all these messages are filling up the logcat buffer and my own debug messages keep disappearing.

Observations

  • This happens irrespective of using Android Studio or Eclipse. This means the issue is with Logcat and not how the IDE handles it I suppose.
  • According to this question, I am supposed to increase the default logcat buffer size or set it to infinite (0), but this still does not solve due to the sheer rate at which these spams keep piling up.
  • If I reboot the phone, it clears up the logcat only for a few minutes before the spams catch up.

How do I stop these unwanted messages from overflowing Logcat buffers?

Update: Okay I think I have found some clue. The logcat buffer is not getting cleared

$ ./adb logcat -g
/dev/log/main: ring buffer is 256Kb (255Kb consumed), max entry is 5120b, max payload is 4076b
/dev/log/system: ring buffer is 256Kb (0Kb consumed), max entry is 5120b, max payload is 4076b
$ ./adb logcat -c
$ ./adb logcat -g
/dev/log/main: ring buffer is 256Kb (255Kb consumed), max entry is 5120b, max payload is 4076b
/dev/log/system: ring buffer is 256Kb (0Kb consumed), max entry is 5120b, max payload is 4076b

As you can see, the main buffer is not getting cleared - maybe that's the reason my app's messages are not making it to logcat.

Community
  • 1
  • 1
S B
  • 8,134
  • 10
  • 54
  • 108
  • I am having the same problem, starting from 2 days ago. There should be a way to stop an app from producing messages, I think. But logcat doesn't say which app is producing the messages.. – fersarr Nov 07 '14 at 15:18

1 Answers1

1

You can do the following to counteract this:

1) Go to Eclipse-> DDMS-> Devices and click your device list.

OR

2) Assuming you have adb installed, go to your command prompt and type

adb logcat > logs.txt

This will dump the logcat messages into the logs.txt file, and then you can open it and parse through the logs for your debug messages to get what you want.

SoulRayder
  • 5,072
  • 6
  • 47
  • 93
  • Can you elaborate on #1? Click on devices and then what? As regards #2, adb logcat shows only the spam messages. My debug messages don't make it to the log. Your suggestion works only for a few minutes after rebooting the phone, but not afterwards. Any clue? – S B May 22 '14 at 11:15
  • In your device list, you would see the device u have connected. Click on that and then check logcat. please elaborate what problems u r facing with #2 – SoulRayder May 22 '14 at 11:31
  • The log file (retrieved using #1 or #2) does not contain messages from my app. The problem lies in generation, not retrieval IMO. Somehow, the logcat queue gets full and refuses to let in messages from my app. Pl refer to my update to the question. – S B May 22 '14 at 13:03
  • I would give you the obvious suggestion of rebooting your system and eclipse, but I guess you might have already done that :) . Maybe reinstalling your eclipse might help? – SoulRayder May 23 '14 at 03:28