• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Music hiccups when there is ANY change in network coverage.

Jakko

Lurker
Feb 21, 2010
7
0
the hiccups in the audio are from the Dalvik virtual machine doing it's garbage collection. it's just how linux works, no way around it. yes it's annoying but it is what it is. download a program that shows you logcat in real time and you'll see what i mean.

everytime you hear a hiccup you'll see it say "dalvikvm: GC freed xxxx objects / xxxx bytes in xxx ms".
 
Upvote 0
Does this mean it also worked like this on all android devices before droid/milestone? I do not remember such a thing with my g1.

android is linux and this is just a side effect of linux. because it is always multitasking it is also doing very frequent garbage cleanups to free memory back up.

i am not saying that it doesn't also hiccup when changing from 1x to 3g or whatever like you are saying. that may be true, but most of the hiccups you are hearing are probably from the virtual machine doing very slight pauses when clearing old data. the virtual machine has to very quickly pause every other process that is going on when it does it's garbage cleanup. usually it's a fraction of a second, could be as quick as 50ms (maybe even quicker) and could also be upwards of 250ms. a 250ms pause is only 1/4 of a second, but you'll definitely notice that.

after i realized what was causing this and that it's never going to go away i just got used to it. i barely even notice it anymore.
 
Upvote 0
Just to be clear, I do not notice any hickups whatsoever when flightmode is turned on, regardless of what I do in android. (open applications)
And every single time a connection drops or is re-established there is a hickup.
Does this mean garbage collection only occurs when connection-related changes happen?
 
Upvote 0
Just to be clear, I do not notice any hickups whatsoever when flightmode is turned on, regardless of what I do in android. (open applications)
And every single time a connection drops or is re-established there is a hickup.
Does this mean garbage collection only occurs when connection-related changes happen?

no.

most of the garbage collection cycles are to small to notice. some of the larger ones take more time and cause noticeable hiccups in the audio. the larger ones are pretty rare though.
 
Upvote 0
the hiccups in the audio are from the Dalvik virtual machine doing it's garbage collection. it's just how linux works, no way around it. yes it's annoying but it is what it is. download a program that shows you logcat in real time and you'll see what i mean.

everytime you hear a hiccup you'll see it say "dalvikvm: GC freed xxxx objects / xxxx bytes in xxx ms".

Dalvik is pretty aggressive in gc it seems. But that seems like a dalvik issue not Linux, no?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones