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

  • Home
  • SEARCH
  • 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 977361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:53:26+00:00 2026-05-16T03:53:26+00:00

I have a layout that creates a ListActivity. Before displaying the ListActivity, I perform

  • 0

I have a layout that creates a ListActivity. Before displaying the ListActivity, I perform a database query, and then hook that data up to the List using a SimpleCursorAdapter.

All of this works fine on 1.6 and higher. On 1.5, the my function that performs the query successfully executes, but then a few seconds later a StackOverflowError takes place. Does anyone know why this error would occur in 1.5 but not in 1.6?

UPDATE: I have determined that the crash occurs when I move from an Activity with a TabView to an Activity with the ListView. If I go to the ListView from an Activity that does not contain a Tab View, then the crash does not occur. The activity with the ListView is returning a Cursor to a query where the database has about 10 columns. Of those 10 columns, I display 3 columns on the screen.

Here is the flow of execution for my code:

TabView Activity sends Intent to start List View Activity

onCreate() //of ListActivity
{
    showList();
}

showList()
{
    //open DataBase
    //perform query
    //create SimpleCursorAdapter
    //setListAdapter
}

So for example, this runs completely fine on a Droid with 2.1 installed and on an emulator targeting 1.6. But the above fails on the HTC Hero with 1.5 and on an emulator targeting 1.5.

The crash happens if I let setListAdapter execute. If that line is out, everything works, but obviously my data does not get shown. It doesn’t crash on the line that calls setListAdapter, but it’ll eventually crash if setListAdapter is ever executed.

Stack Trace:

Thread [<3> main] (Suspended (exception StackOverflowError))

ViewRoot.draw(boolean) line: 1235   
ViewRoot.performTraversals() line: 1030 
ViewRoot.handleMessage(Message) line: 1482  
ViewRoot(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 3948    
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 782  
ZygoteInit.main(String[]) line: 540 
NativeStart.main(String[]) line: not available [native method]  
  • 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-16T03:53:26+00:00Added an answer on May 16, 2026 at 3:53 am

    Maybe this error is not caused by database.

    Actually this error often occurs when you have too deep Layout hierarchy.

    For 1.5 it could be 13 levels deep. Maybe try to check it with Hierarchy Viewer.

    Also publishing stack trace might help.

    UPDATE:
    Stacktrace is pointing clearly that problem lies in your rows layout. When you comment out setting adapter your rows aren’t drawn thus error does not occur.

    Maybe you are nesting too many LinearLayout‘s in your rows? Try to make simple rows – if problem will vanish, you will know what to repair.

    Also consider moving from LinearLayout to RelativeLayout. It flattens your view hierarchy. Although take into account that RelativeLayout has some bugs eg. RelativeLayout differences between 1.5 and 2.1.

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

Sidebar

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.