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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:32:31+00:00 2026-05-17T00:32:31+00:00

I am a very green android developer and need some help with a strange

  • 0

I am a very green android developer and need some help with a strange program crash. Often the program will run just fine. There is an equal chance it will fail (see stack at the end). I can watch the program run through the getView function and everything seems in order (i.e. all the information is there as expected and passes through convertView seemingly fine). Either it will go through a few times and then program will be A-OK or it will fail as seen below and I have not been able to pick out what causes the crash. Even stranger is that if I hold the phone in landscape mode, it will never fail!! It only fails about 50% of the time in portrait orientation. Can someone please help me?

        @Override
    public View getView(int position, View convertView, ViewGroup parent){

        View v = convertView;
        if (v == null) {
            LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.row, null);
        }
        ADDPResults addpres = items.get(position);
        if (addpres != null) {
                //initialize display variables from inflated row.xml variables
                TextView iptext = (TextView) v.findViewById(R.id.IPtext);
                TextView mactext = (TextView) v.findViewById(R.id.MACtext);
                TextView nametext = (TextView) v.findViewById(R.id.Nametext);
                TextView devicetext = (TextView) v.findViewById(R.id.Devicetext);
                //TextView firmwaretext = (TextView) v.findViewById(R.id.Firmwaretext);
                //write the real data to the display
                iptext.setText("IP Address:     "+addpres.addp_deviceIP.toDecString()); 
                mactext.setText("MAC Address: "+addpres.addp_deviceMAC.toHexString() );
                nametext.setText("Name:             "+addpres.addp_devName);
                devicetext.setText("Device:           "+addpres.addp_devType);       
                //firmwaretext.setText("Firmware:       "+addpres.addp_FWVersion);
        }
        return v;
    }
}

———————–Failure———————————————-
Thread [<3> main] (Suspended (exception ArrayIndexOutOfBoundsException))
ListView.layoutChildren() line: 1686
ListView(AbsListView).onLayout(boolean, int, int, int, int) line: 1224
ListView(View).layout(int, int, int, int) line: 6886
LinearLayout.setChildFrame(View, int, int, int, int) line: 1119
LinearLayout.layoutVertical() line: 998
LinearLayout.onLayout(boolean, int, int, int, int) line: 918
LinearLayout(View).layout(int, int, int, int) line: 6886
FrameLayout.onLayout(boolean, int, int, int, int) line: 333
FrameLayout(View).layout(int, int, int, int) line: 6886
LinearLayout.setChildFrame(View, int, int, int, int) line: 1119
LinearLayout.layoutVertical() line: 998
LinearLayout.onLayout(boolean, int, int, int, int) line: 918
LinearLayout(View).layout(int, int, int, int) line: 6886
PhoneWindow$DecorView(FrameLayout).onLayout(boolean, int, int, int, int) line: 333
PhoneWindow$DecorView(View).layout(int, int, int, int) line: 6886
ViewRoot.performTraversals() line: 996
ViewRoot.handleMessage(Message) line: 1633
ViewRoot(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4363
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object…) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 862
ZygoteInit.main(String[]) line: 620
NativeStart.main(String[]) line: not available [native method]

  • 1 1 Answer
  • 1 View
  • 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-17T00:32:31+00:00Added an answer on May 17, 2026 at 12:32 am

    I would check what you get as ‘position’ and compare that to the size of your items array… since the exception says : ArrayIndexOutOfBoundsException

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

Sidebar

Related Questions

I've very green to this TDD business, so any help would be fantastic! So,
SISS 2008 - My package goes green very quickly, but does nothing. The connections
I have a very basic page with two elements, an outer green box, and
Data in this fashion: [Array1] = ['blue','green', 'yellow','red','very very red'] [Array2] = ['ColumnA','ColumnB','ColumnC','ColumnD','ColumnD'] This
very often I like to have my movieclip code inside the movieclip (on a
Very new to C++ and Cocos2d-x but I was just toying around with CCArray
This must be a really stupid question, but I'm still very green when it
I'm very new to Java and am having some issues looping through JCheckBoxes on
I am very green at Drupal and I would like to recreate a list
Platform: ASP.NET 3.5, ASP.NET Ajax intermixed I'm very green to jQuery, so have been

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.