Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8217301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:24:52+00:00 2026-06-07T12:24:52+00:00

So I have a strange problem, and I’m not entirely sure what all information

  • 0

So I have a strange problem, and I’m not entirely sure what all information I should provide, but I’ll do my best — just let me know if I need to add more info. I’m having an issue that when I finish my Activity and return to the previous Activity (or launch it with a new Intent — the problem seems to be centered on finishing the Activity) the UI performance drops drastically for about six or seven seconds, then returns to normal.

From LogCat, this warning appears consistently:

07-11 22:09:42.594: W/ActivityManager(292): Launch timeout has expired, giving up wake lock!
07-11 22:09:42.601: W/ActivityManager(292): Activity idle timeout for ActivityRecord{42bf6e00 com.kcoppock.sudokubeta/com.kcoppock.sudoku.SudokuBoardActivity}

As soon as the activity times out, UI performance returns to normal. Until that point it is very sluggish. I have no code that I am aware of that could be blocking the main thread, and I’ve even gone so far as to comment out my entire onPause() method to see if it makes any difference, and it does not.

The Activity does not spawn any background threads, does not perform any network activity, the only disk access it has is some accessing of SharedPreferences. The previous questions I’ve been able to locate are about idle timeouts for HistoryRecord, not ActivityRecord.

Any ideas what would cause this? Or how I could go about determining what is blocking the UI thread, if that is what is happening?

EDIT : Okay, just tried commenting out everything except super.onCreate() and setContentView() — the problem still persists. It doesn’t occur with any other Activities but this one, but there’s NOTHING TO this one. :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:24:54+00:00Added an answer on June 7, 2026 at 12:24 pm

    Oh geez. One of those things that’s pretty hard to diagnose outside of trial and error, but I’ve figured it out. For reference, should anyone else have this problem, it came down to a custom view in my layout. I had added a ViewTreeObserver.OnGlobalLayoutListener() to do some layout modifications after the layout pass, but within that listener I modified the layout and thus caused another layout, essentially creating an infinite loop (but somehow not causing an ANR). My solution was like so:

    private class BoardLayoutListener implements OnGlobalLayoutListener {
        @Override
        public void onGlobalLayout() {
            //...do stuff here
    
            //REMOVE this listener so that you don't repeat this forever
            ViewTreeObserver obs = SudokuBoard.this.getViewTreeObserver();
            obs.removeGlobalOnLayoutListener(this);
        }
    }
    

    This solution is quite ironic, considering my second highest rated answer on StackOverflow specifically deals with this. 😛

    sigh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem where a XAML control is not visible in the
I have a strange problem with my UITableView. I want all the cells in
I have some strange problem with PIL not resizing the image. from PIL import
I have a strange problem and I wasn't sure how to word the title.
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have strange problem with receiving data from socket. On client im using air
I have a strange problem on ipv6 connection. I write down a simple client
I have a strange problem with IE. I have a sequence of forms on
I have a strange problem with in-app billing RESTORE_TRANSACTION command. Every request RESTORE_TRANSACTION request
I have a strange problem getting the color of the point that was touched.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.