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.