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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:54:46+00:00 2026-06-13T11:54:46+00:00

At the beginnig all worked ok, but after i have deleted the database by

  • 0

At the beginnig all worked ok, but after i have deleted the database by command:

this.deleteDatabase("databasename");

and then my command:

databasehelper.getWritableDatabase();

started to throw exeptions

10-28 23:39:29.190: D/AndroidRuntime(15363): Shutting down VM
10-28 23:39:29.190: W/dalvikvm(15363): threadid=1: thread exiting with uncaught exception (group=0x40b5b300)
10-28 23:39:29.190: E/AndroidRuntime(15363): FATAL EXCEPTION: main
10-28 23:39:29.190: E/AndroidRuntime(15363): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.package/com.package.MainActivity}: java.lang.ArrayIndexOutOfBoundsException: length=50; index=50
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.os.Handler.dispatchMessage(Handler.java:99)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.os.Looper.loop(Looper.java:137)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread.main(ActivityThread.java:4745)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at java.lang.reflect.Method.invokeNative(Native Method)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at java.lang.reflect.Method.invoke(Method.java:511)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at dalvik.system.NativeStart.main(Native Method)
10-28 23:39:29.190: E/AndroidRuntime(15363): Caused by: java.lang.ArrayIndexOutOfBoundsException: length=50; index=50
10-28 23:39:29.190: E/AndroidRuntime(15363):    at com.package.DBHelper.onCreate(DBHelper.java:41)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at com.package.MainActivity.onCreate(MainActivity.java:28)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.Activity.performCreate(Activity.java:5008)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
10-28 23:39:29.190: E/AndroidRuntime(15363):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
10-28 23:39:29.190: E/AndroidRuntime(15363):    ... 11 more

What should i do now?

  • 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-13T11:54:47+00:00Added an answer on June 13, 2026 at 11:54 am

    You should learn how to read stack traces, because they are an unvaluable feature of modern languages. Your Activity can’t be started because you try to access the element at index 50 in an array which has 50 elements, and thus allows indices between 0 and 49:

    java.lang.ArrayIndexOutOfBoundsException: length=50; index=50
    

    this is located in the onCreate() method of com.package.DBHelper, at line 41

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

Sidebar

Related Questions

At the beginning this worked fine: $ rake cucumber:all But then $ script/plugin install
Maybe it's a similar beginning, but it's true. first of all sorry if this
Sorry if this is obvious or covered elsewhere, but i've been googling all day
I have problem with setTimeout. In all major browsers it works fine but not
I have an array of strings: @array I want to concatenate all strings beginning
I am beginning on ASP.net MVC. All the articles I have read so far
i release an image with [myimageview.image release]; but after the app was in background
So I have this relatively simple query to pull a random row based on
I have the same project, that at the beginning, it worked also on ipad,
I have a VB6 app that formerly worked perfectly on a Vista machine as

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.