Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Dialing lag after screen on (with logcat/analysis)


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 gogothebee

gogothebee
  • Members
  • 3 posts

Posted 13 May 2012 - 08:47 AM

Hello,

I'm going to describe the dialer lag bug and a possible clue how to fix it. As far as I've researched it is present in other phones as well. I'm running the latest nighty (update-cm-9-20120511), but the same bug appears in all previous nighties (at least a month old) and in the latest official Samsung 4.0.3 ROM.

Full wipe (+sdcard if that matters), absolutely stock. Logged in Google account. Direct call shortcut on the main screen. WiFi should be turned off (very important). If the WiFi was turned on, restart the phone first for reliable reproduction. Leaving WiFi turned on for a longer period sometimes masks the bug.

1. Screen off
2. Wait 10 seconds, screen on, unlock
3. Tap on the direct dial shortcut

The phone hangs for ~ 10 seconds and then begins dialing. Exactly the same procedure with WiFi turned on results in no lag. The number is dialed immediately.

I suppose this bug is present in all ROMs, based on Samsung 4.0.3 XXLPQ+ (possibly previous ones as well).

I've attached logcat logs from point 1 (screen off) until the phone begins to dial and I hang up.

No WiFi (hangs): http://pastebin.com/GC01G2FR
WiFi (doesn't hang): http://pastebin.com/eJS9N6sz

Subtracting the noise, the last identical line between two versions is:

D/PhoneUtils( 2207): checkAndCopyPhoneProviderExtras: some or all extras are missing.

This is the line which appears when I start dialing the number. After that the difference are those lines, present only in No WiFi (hangs) version:

W/ActivityManager( 1985): Timeout of broadcast BroadcastRecord{410f0a90 android.intent.action.SCREEN_ON} - receiver=android.app.LoadedApk$ReceiverDispatcher$InnerReceiver@40f159d0, started 10000ms ago
W/ActivityManager( 1985): Receiver during timeout: BroadcastFilter{40f15bd8 ReceiverList{40f15b60 1985 system/1000 local:40f159d0}}

I'm a developer outside of the Android ecosystem, but as far as I understand an intent broadcast SCREEN_ON is issued and its intent receiver timeouts in 10000ms (those 10 seconds during which the dialer hangs). Supposedly Android is waiting for some intent receiver to handle its onReceive() and during this period nothing happens.

Please note that in the log there is another timeout before this one with the same consequences, but with timeout for intent SCREEN_OFF, issued seconds earlier when I turned the display off. That's why I skipped it.

Interestingly with WiFi on this doesn't happen.

I searched many forums and some people report (but can't describe) the problem. Other don't have it. I suppose there are other variables I can't isolate. Can you please try to reproduce it and point me to the right direction (tools, approach) how to debug it? This is a showstopper bug IMHO.

Edited by gogothebee, 13 May 2012 - 09:29 AM.


#2 bassmadrigal

bassmadrigal
  • Administrators
  • 7,835 posts

Posted 13 May 2012 - 03:52 PM

Likely, you won't get too many developers who will view this report on this forum. This forum is mostly used by end-users. You would probably get more involvement on the xda forums.

But one thing that I'd like to point out. If this problem exists in the stock Samsung ROM, then it is most likely a bug in Android itself, as CM doesn't use the Samsung code, but rather the AOSP (Android Open Source Project) code. Unfortunately, I can't test this, as I am waiting for Monday to get a replacement mini-sim for my phone.

#3 gogothebee

gogothebee
  • Members
  • 3 posts

Posted 14 May 2012 - 04:37 PM

Thanks, I posted the same information in XDA forums. I suspect that the issue in the official ROM is the same (I should test it soon), but I hope to get some clue how to proceed debugging this problem. I have no experience in Android development, but my generic development/debugging skills might apply here if somebody gives me a hint or two :)