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 6359275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:29:48+00:00 2026-05-24T23:29:48+00:00

I am getting error Application is not responding; process terminated when I am using

  • 0

I am getting error

Application is not responding; process terminated

when I am using a listfield.Dats is coming from server. Here is the code:

listnew = new ListField() {

        /*
         * protected void drawFocus(Graphics graphics, boolean on) { }
         */



        protected boolean trackwheelClick(int status, int time) {

            listFieldIndex = listnew.getSelectedIndex();
            listnew.setFocus();
            System.out.println(listFieldIndex);
            if (listFieldIndex < 0) {
                listFieldIndex = 0;

            }
            try {
                UiApplication.getUiApplication().invokeLater(
                        new Runnable() {
                            public void run() {
                                /*ODProgDetailScreen.shows.removeAllElements();
                                System.out.println("Value is-----"
                                        + listFieldIndex);
                                // System.out.println("ID IS EQUAL TO:-"+
                                // progurl);
                                ODProgDetailScreen.progDetailURL = ((Program) programList2
                                        .elementAt(listFieldIndex)).getId();
                                ODProgDetailScreen.progTitle = ((Program) programList2
                                        .elementAt(listFieldIndex))
                                        .getTitle();
                                // ProgramDetails.shows.removeAllElements();
                                UiApplication.getUiApplication()
                                        .pushScreen(new ODProgDetailScreen());
                                UiApplication.getUiApplication().popScreen(
                                        getScreen());*/
                            }
                        });
            } catch (Exception e) {
            }
            return true;
        }

    };

    listnew.setRowHeight(40);

    // setEmptyString("Hooray, no tasks here!", DrawStyle.HCENTER);

    listnew.setCallback(this);

    rows = new Vector();

    for (int x = 0; x < mDCtaegory.size(); x++) {
        Hashtable hs = (Hashtable)mDCtaegory.elementAt(x);
        row = new TableRowManager();

        // SET THE PRIORITY BITMAP FIELD
        // if high priority, display p1 bitmap

        /*artistImgField = new URLBitmapField(Bitmap
                .getBitmapResource("res/images/bg.jpg"));*/
        HTTPManager engine = new HTTPManager();
          BitmapField bitmap= new BitmapField(engine.readImageFromURL((String) hs.get("img"), 40, 40));
          row.add(bitmap);

BitmapField bitmap1=new BitmapField(engine.readImageFromURL((String) hs.get("ratingimage"), 40, 40));
BitmapField bitmap2=new BitmapField(Bitmap.getBitmapResource("arrow.png"));
        //row.add(bitmap1);


        LabelField task = new LabelField(hs.get("title"), LabelField.USE_ALL_WIDTH);



        row.add(task);
        row.add(bitmap1);
        row.add(bitmap2);

        rows.addElement(row);
    }
    listnew.setSize(rows.size());
    gridbackManager=new VerticalFieldManager(VerticalFieldManager.NO_HORIZONTAL_SCROLL|VerticalFieldManager.VERTICAL_SCROLL){
          protected void paintBackground(Graphics graphics)
          {  

                    int c = graphics.getColor();
                    //graphics.setColor(Color.WHITESMOKE);
                    graphics.drawBitmap(0, 0, backbitmap.getWidth(), backbitmap.getHeight(),backbitmap,0,0);

                    //graphics.setColor(c);

            super.paintBackground(graphics);
          }
          protected void sublayout( int maxWidth, int maxHeight )
          {
              int width = backbitmap.getWidth();
              int height = backbitmap.getHeight();
              super.sublayout( width, height);
              layoutChild(_vfm,width, height);
              setPositionChild(_vfm,0, 0);
              setExtent( width, height);
          }
        };
        mainlayout=new VerticalFieldManager(VerticalFieldManager.NO_HORIZONTAL_SCROLL|VerticalFieldManager.VERTICAL_SCROLL){
              protected void paintBackground(Graphics graphics)
              {  

                        int c = graphics.getColor();
                        //graphics.setColor(Color.WHITESMOKE);
                        graphics.drawBitmap(0, 0, backbitmap.getWidth(), backbitmap.getHeight(),backbitmap,0,0);

                        //graphics.setColor(c);

                super.paintBackground(graphics);

              }
              protected void sublayout( int maxWidth, int maxHeight )
              {
                  int width = backbitmap.getWidth();
                  int height = backbitmap.getHeight();
                  super.sublayout( width, height);
                  layoutChild(backbittopfield,maxWidth, maxHeight);
                  setPositionChild(backbittopfield,15, 20);
                  layoutChild(gridbackManager,maxWidth, maxHeight);
                  setPositionChild(gridbackManager,15, 43);
                  layoutChild(backbitbottomfield,maxWidth, maxHeight);
                  setPositionChild(backbitbottomfield,15, 194);
                  setExtent(Display.getWidth(), Display.getHeight());
              }
            };
    _vfm = new VerticalFieldManager(Manager.VERTICAL_SCROLL
            | Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH) {

        public void paint(Graphics g) {
            int[] X_PTS_MAIN = { 0, Display.getWidth(), Display.getWidth(),
                    0 };
            int[] Y_PTS_MAIN = { 0, 0, Display.getHeight(),
                    Display.getHeight() };
            int[] drawColors_MAIN = { Color.WHITESMOKE, Color.WHITESMOKE,
                    Color.WHITESMOKE, Color.WHITESMOKE };

            try {
                // Draw the gradients
                g.drawShadedFilledPath(X_PTS_MAIN, Y_PTS_MAIN, null,
                        drawColors_MAIN, null);

            } catch (IllegalArgumentException iae) {
                System.out.println("Bad arguments.");
            }

            g.setBackgroundColor(Color.WHITESMOKE);
            g.clear();
            // Call super to paint the graphics on the inherited window
            super.paint(g);

        }

        protected boolean navigationMovement(int dx, int dy, int status,
                int time) {
            this.invalidate();
            return super.navigationMovement(dx, dy, status, time);
        }

        protected void sublayout(int maxWidth, int maxHeight) {

            layoutChild(listnew, maxWidth, maxHeight);
            setPositionChild(listnew, 0, 0);

            setExtent( 292, 150);
        }

    };
    _vfm.add(listnew);
    mainlayout.setBackground(bg);
    mainlayout.add(backbittopfield);
    gridbackManager.add(_vfm);
    mainlayout.add(gridbackManager);
    mainlayout.add(backbitbottomfield);
    add(headerbitmapfield);
    add(mainlayout);
    // this.add(listnew);
    UiApplication.getUiApplication().invokeLater(new Runnable() {
        public void run() {
            listnew.invalidate();
        }
    }, 500, true);

Is it due to the list.invalidate() that I am using at the bottom?

  • 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-05-24T23:29:49+00:00Added an answer on May 24, 2026 at 11:29 pm

    The ANR is because you are trying to make an HTTP connection on the UI thread. This is a big no-no! You need to initialize the ListField as empty and start a separate, background thread to read the data. When the data has all arrived, call invokeLater with a Runnable that will populate the list.

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

Sidebar

Related Questions

I just installed an application on a win2003 server and I'm getting this error:
I am getting following error while running my application which is asp.net. Server Error
I am not getting any error in my application but when I run it
Currently I am getting error pages like this: Server Error in '/' Application. The
When I am running my application,I am getting this error.(Server Error in '/' Application
I'm getting an error when my application starts. It appears to be after it's
We are getting an error in a VB6 application that sends data back and
I've been getting an error recently while debugging an ASP.NET application in Visual Studio
I'm updating application for Mac OS X 10.6 and getting this error. I believe
I am getting the following error while running my MVC application, which uses the

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.