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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:14:15+00:00 2026-05-26T02:14:15+00:00

On my Main activity: button = (Button) findViewById(R.id.mainAddWatchButton); button.setOnClickListener(new Button.OnClickListener() { public void onClick(View

  • 0

On my Main activity:

button = (Button) findViewById(R.id.mainAddWatchButton);
button.setOnClickListener(new Button.OnClickListener() {
  public void onClick(View v) {
    startActivity(new Intent(audiovideo, CountyBrowser.class));
  }
});

CountyBrowser activity starts fine (and behaves fine, just as it should), but things like these spews out in LogCat:

10-11 19:10:41.182: INFO/ActivityManager(58): Starting activity: Intent { cmp=se.ribit.bb/.CountyBrowser }
10-11 19:10:41.782: DEBUG/dalvikvm(368): GC freed 6313 objects / 354184 bytes in 114ms
10-11 19:10:41.812: INFO/dalvikvm(368): Uncaught exception thrown by finalizer (will be discarded):
10-11 19:10:41.812: INFO/dalvikvm(368): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43d3ec38 on null that has not been deactivated or closed
10-11 19:10:41.823: INFO/dalvikvm(368):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
10-11 19:10:41.823: INFO/dalvikvm(368):     at dalvik.system.NativeStart.run(Native Method)
10-11 19:10:41.852: INFO/dalvikvm(368): Uncaught exception thrown by finalizer (will be discarded):
10-11 19:10:41.862: INFO/dalvikvm(368): Ljava/lang/IllegalStateException;: **Finalizing cursor android.database.sqlite.SQLiteCursor@43d3dc80 on null that has not been deactivated or closed**
10-11 19:10:41.862: INFO/dalvikvm(368):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
10-11 19:10:41.873: INFO/dalvikvm(368):     at dalvik.system.NativeStart.run(Native Method)
10-11 19:10:42.452: INFO/ActivityManager(58): Displayed activity se.ribit.bb/.CountyBrowser: 1198 ms (total 1198 ms)
10-11 19:10:47.702: DEBUG/dalvikvm(206): GC freed 124 objects / 5424 bytes in 154ms
10-11 19:10:52.692: DEBUG/dalvikvm(105): GC freed 2292 objects / 133288 bytes in 107ms

I am using database and cursors, but the messages above contains zero information whether I’m doing something wrong or not. The activity works fine, except for these logs. If I run everything in debug-mode, the emulator throws me back to Eclipse all the time.

Am I missing something here? Anyone care for a guess of what I’m doing wrong?

  • 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-26T02:14:16+00:00Added an answer on May 26, 2026 at 2:14 am

    I think you have to close the cursors before the Activity pauses. In your onPause method for the Activity that opens the new Activity, try closing the cursors.

    void onPause(){
      myCursor1.close();
      myCursor2.close();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to start new activity by button click. Main Activity code: public class
package com.ebonybutler.cexample3; import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener;
package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.view.View; import android.view.View.OnClickListener; //Create an
intentTest.java: package intentTest.xyz.com; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public
VitaminTable.java: package vitaminTable.xyz.com; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import
package com.parseador.prueba; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class main extends
This is how I start the Tab Activity Intent i = new Intent(walk.me.TAB); startActivityForResult(i,
package com.aviyehuda.test.multithreading; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.widget.Button; import android.widget.TextView;
findViewById returns null for EditText Java Code: public class MainActivity extends Activity { private
I've got a custom BaseAdapter and an add button in the main activity. 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.