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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:07:55+00:00 2026-05-27T04:07:55+00:00

Hello everyone I am beginner in Android Programming, and fresh developer too, In my

  • 0

Hello everyone I am beginner in Android Programming, and fresh developer too, In my android project I got one issue in the below scenario,
I have some list with huge items and this list has scroller, when start scrolling at particular point in the middle of list the program crashes and asks to force close.. The logcat says it s due to ArrayIndexOutOfBounds Exception, I’m not sure what modification should be done for this.. Any body please help me, if it is known issue..

my code..

@Override
public boolean areAllItemsEnabled() {
    return false;
}

@Override
public boolean isEnabled(int position) {
    return true;
}

public int getCount() {
    if (_UiRows != null)
        return _UiRows.size();
    return 0;
}

public Object getItem(int position) {
    return _UiRows.get(position);
}

// This function essentially disabled the flyweight caching by giving every row a unique type
// This works because we end up saving refreshes and thereby reducing GC 
public int getItemViewType(int position) {
    if (_UiRows == null)
        return 0;

    return position;
}

public int getViewTypeCount() {
    return 100; // Max edit rows
}

public long getItemId(int position) {
    return position;
}

public EditRowView getNewView(Context ctx) {
    return new EditRowView(ctx);
}

private EditViewProvider findCustomViewProvider(EditRowData row) {
    for (EditViewProvider p : _CustomViewProviders) {
        if (p.isCustomView(row))
            return p;
    }
    return null;
}

public View getView(int position, View convertView, ViewGroup parent) {
    EditRowView v = null;
    EditRowData row = (EditRowData) _UiRows.get(position);

    // NOTE: 
    // ListItemType starting at 0
    // Invisible -2 for hidden ones
    // Custom types starting at VIEWTYPE_CUSTOM_OFFSET, registered via RegisterCustomViewProvider

    // Create a view based on view type
    EditViewProvider viewProvider = findCustomViewProvider(row);
    if (row.IsVisible() == false) {
        return new View(parent.getContext());
    } else if (viewProvider != null) {
        return viewProvider.getView(row, convertView, parent);
    } else {
        // TODO: (Phase II) This area could use some refactoring to handle various types individually. 
        // Currently app types are handled by EditRowView, using more memory than necessary
        if (convertView != null && convertView instanceof EditRowView) {
            v = (EditRowView) convertView;
        } else {
            v = getNewView(parent.getContext());
            v.SetParent(this);
            v.SetBusinessLogic(_BL);
        }

        v.BindDataItem(row);
    }

    return v;
}

logcat snippet…

> 11-25 16:08:08.667: E/IR-ProcessUIRequest(859): Request:
> TruckStatusTable, Action:  11-25 16:08:08.797: D/AndroidRuntime(859):
> Shutting down VM 11-25 16:08:08.797: W/dalvikvm(859): threadid=1:
> thread exiting with uncaught exception (group=0x40015560) 11-25
> 16:08:08.918: E/AndroidRuntime(859): FATAL EXCEPTION: main 11-25
> 16:08:08.918: E/AndroidRuntime(859):
> java.lang.ArrayIndexOutOfBoundsException 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:4540)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.ListView.measureHeightOfChildren(ListView.java:1228)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.ListView.onMeasure(ListView.java:1127) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.View.measure(View.java:8313) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.View.measure(View.java:8313) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.View.measure(View.java:8313) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.View.measure(View.java:8313) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.View.measure(View.java:8313) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.view.ViewRoot.performTraversals(ViewRoot.java:839) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.os.Handler.dispatchMessage(Handler.java:99) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> android.os.Looper.loop(Looper.java:123) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> android.app.ActivityThread.main(ActivityThread.java:3683) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> java.lang.reflect.Method.invokeNative(Native Method) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> java.lang.reflect.Method.invoke(Method.java:507) 11-25 16:08:08.918:
> E/AndroidRuntime(859):    at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
> 11-25 16:08:08.918: E/AndroidRuntime(859):    at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-25
> 16:08:08.918: E/AndroidRuntime(859):  at
> dalvik.system.NativeStart.main(Native Method) 11-25 16:08:09.277:
> D/dalvikvm(859): GC_CONCURRENT freed 519K, 38% free 5281K/8455K,
> external 547K/1046K, paused 8ms+19ms 11-25 16:08:09.517:
> I/dalvikvm(859): Jit: resizing JitTable from 1024 to 2048
  • 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-27T04:07:55+00:00Added an answer on May 27, 2026 at 4:07 am

    The cause of your crash is pretty obvious.

    When you reach a certain point in the List you actually have no data to populate and show in your List.That’s why when you reach the point where your adapter has no data the list actually doesnt know what to show and crashes force closing your application.

    Check your adapter and be sure that you have enough data for the list.

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

Sidebar

Related Questions

hello everyone it is me again! i've got few problems too. i am deveoping
Hello everyone I am just learning my first programming language and have just corrected
Hello Everyone I am new being in ANDROID so I am getting one problem
Hello everyone I have converted a project in C# to F# that paints the
Hello everyone I'm currently having 2 issues with the code below: Upon return of
Hello everyone Masters Of Web Delevopment :) I have a piece of PHP script
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
Hello everyone and thanks for reading... I'm a Mono / Web developer and was
Hello everyone I'm currently implementing a simple programming language for learning experience but I'm
Introduction : Hello Everyone, I have been looking for days for a way to

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.