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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:22:46+00:00 2026-06-17T00:22:46+00:00

After months of developing I realize that my app (only using android 2.1) crashes

  • 0

After months of developing I realize that my app (only using android 2.1) crashes when I rotate screen. I don’t know how investigate about this error. What should be the cause? Thanks for advices. Can this “warning” cause error? Unexpected resume of com.example.app while already resumed in com.example.app

SharedPreferences prefs3 = PreferenceManager.getDefaultSharedPreferences(this);
      listener = new SharedPreferences.OnSharedPreferenceChangeListener() {
          public void onSharedPreferenceChanged(SharedPreferences prefs, String listpref) {       
                preferenze();





E/AndroidRuntime( 1269): java.lang.StackOverflowError
E/AndroidRuntime( 1269):    at java.util.HashMap.doubleCapacity(HashMap.java:561)
E/AndroidRuntime( 1269):    at java.util.HashMap.put(HashMap.java:391)
E/AndroidRuntime( 1269):    at java.util.HashSet.add(HashSet.java:95)
E/AndroidRuntime( 1269):    at java.nio.charset.Charset.<init>(Charset.java:189)
E/AndroidRuntime( 1269):    at com.ibm.icu4jni.charset.CharsetICU.<init>(CharsetICU.java:33)
E/AndroidRuntime( 1269):    at com.ibm.icu4jni.charset.CharsetProviderICU.getCharset(CharsetProviderICU.java:62)
E/AndroidRuntime( 1269):    at com.ibm.icu4jni.charset.CharsetProviderICU.charsetForName(CharsetProviderICU.java:57)
E/AndroidRuntime( 1269):    at java.nio.charset.Charset.forNameInternal(Charset.java:500)
E/AndroidRuntime( 1269):    at java.nio.charset.Charset.forName(Charset.java:570)
E/AndroidRuntime( 1269):    at com.android.internal.util.FastXmlSerializer.setOutput(FastXmlSerializer.java:292)
E/AndroidRuntime( 1269):    at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:180)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl.writeFileLocked(ApplicationContext.java:2757)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl.access$800(ApplicationContext.java:2510)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2695)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3656)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.access$0(MainActivity.java:3632)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity$1.onSharedPreferenceChanged(MainActivity.java:2421)
E/AndroidRuntime( 1269):    at android.app.ApplicationContext$SharedPreferencesImpl$EditorImpl.commit(ApplicationContext.java:2703)
E/AndroidRuntime( 1269):    at com.example.app.MainActivity.preferenze(MainActivity.java:3732)
E/AndroidRuntime( 1269):    a
  • 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-17T00:22:48+00:00Added an answer on June 17, 2026 at 12:22 am

    The problem is in your preferenze routine in your MainActivity.java.

    Would need to see some more code to be sure, but it appears you have an infinite recursion caused by modifying your Preferences inside a onSharedPreferenceChanged callback. If you edit your preferences in the callback, the callback gets invoked again, then you edit again, the callback gets invoked again, etc, etc.

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

Sidebar

Related Questions

After a few months developing in GAE using google's standalone server (dev_appserver) and Aptana
After a couple of months of using our application (which internally uses Jackrabbit 1.6.4
I have been developing Android application since 3 to 4 months. I am naive,
After some time of developing AJAXy application I found out, that my log files
We are developing an app for a company that wants to distribute this app
I am developing an iPad app that uses a swipe gesture to move between
I started developing an app using the Cloud SQL database because I found it
Currently, I am developing a product that does fairly intensive calculations using MS SQL
After having worked in MVC for a few months, I'm back in a previously
I have some records after SQL generating: YEARS MONTHS SUMMONTH SUMQUARTER QTR ----- ------

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.