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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:11:44+00:00 2026-06-17T14:11:44+00:00

my name is John, I am developing this application where I have 2 types

  • 0

my name is John, I am developing this application where I have 2 types of user, each type has 2 menu style view.

What happens It`s that sometimes the application crashes. The LogCat displays “Out of memory on a 11612176-byte allocation”.

Here is a portion of the code where I switch between activities:

    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
    getApplicationContext(), R.array.array_teste,
    android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);
    spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
        public void onItemSelected(AdapterView<?> parent, View view,
                int pos, long id) {


            if (parent.getItemAtPosition(pos).toString().equals("Formador")) {
                Intent i = new Intent(getApplicationContext(),
                        FormadorActivity.class);
                finish();
                startActivity(i);
            }
            //
        }

        public void onNothingSelected(AdapterView<?> parent) {
        }
    });

I am almost sure I`m doing something wrong with the images I am using.
I hope some of you guys can give me a little help I am trying to fix this all the week long.

Thank you for you attention!

UPDATED—-

The device I am testing is a Galaxy SII GT-I9100

Here is the LogCat :

01-10 16:03:36.243: W/ResourceType(5624): Failure getting entry for 0x010802c0 (t=7 e=704) in package 0 (error -75)
01-10 16:03:37.098: D/dalvikvm(5624): GC_FOR_ALLOC freed 5069K, 45% free 21876K/39175K, paused 32ms, total 32ms
01-10 16:03:37.098: D/AbsListView(5624): [unregisterDoubleTapMotionListener]
01-10 16:03:37.103: I/dalvikvm-heap(5624): Grow heap (frag case) to 26.900MB for 5160976-byte allocation
01-10 16:03:37.153: D/dalvikvm(5624): GC_FOR_ALLOC freed 2K, 32% free 26914K/39175K, paused 48ms, total 48ms
01-10 16:03:37.168: I/MotionRecognitionManager(5624):   .unregisterListener : / listener count = 0->0, ubvf 9budiwrd5ordgfl5BakTrklMrfo$,@,*8b-:)(
01-10 16:03:37.213: D/dalvikvm(5624): GC_CONCURRENT freed 67K, 32% free 26848K/39175K, paused 12ms+4ms, total 60ms
01-10 16:03:37.498: D/dalvikvm(5624): GC_FOR_ALLOC freed 112K, 32% free 26735K/39175K, paused 22ms, total 22ms
01-10 16:03:37.498: I/dalvikvm-heap(5624): Forcing collection of SoftReferences for 11612176-byte allocation
01-10 16:03:37.538: D/dalvikvm(5624): GC_BEFORE_OOM freed 0K, 32% free 26735K/39175K, paused 38ms, total 38ms
01-10 16:03:37.538: E/dalvikvm-heap(5624): Out of memory on a 11612176-byte allocation.
01-10 16:03:37.538: I/dalvikvm(5624): "main" prio=5 tid=1 RUNNABLE
01-10 16:03:37.538: I/dalvikvm(5624):   | group="main" sCount=0 dsCount=0 obj=0x40d4d508 self=0x40d3c5a8
01-10 16:03:37.538: I/dalvikvm(5624):   | sysTid=5624 nice=0 sched=0/0 cgrp=apps handle=1075482416
01-10 16:03:37.538: I/dalvikvm(5624):   | schedstat=( 9495706032 3145201445 10530 ) utm=821 stm=128 core=1
01-10 16:03:37.538: I/dalvikvm(5624):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
01-10 16:03:37.548: I/dalvikvm(5624):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:625)
01-10 16:03:37.548: I/dalvikvm(5624):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:478)
01-10 16:03:37.548: I/dalvikvm(5624):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
01-10 16:03:37.548: I/dalvikvm(5624):   at android.content.res.Resources.loadDrawable(Resources.java:1963)
01-10 16:03:37.548: I/dalvikvm(5624):   at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
01-10 16:03:37.558: I/dalvikvm(5624):   at android.widget.ImageView.<init>(ImageView.java:120)
01-10 16:03:37.558: I/dalvikvm(5624):   at android.widget.ImageView.<init>(ImageView.java:110)
01-10 16:03:37.558: I/dalvikvm(5624):   at java.lang.reflect.Constructor.constructNative(Native Method)
01-10 16:03:37.558: I/dalvikvm(5624):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.createView(LayoutInflater.java:587)
01-10 16:03:37.563: I/dalvikvm(5624):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-10 16:03:37.563: I/dalvikvm(5624):   at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-10 16:03:37.568: I/dalvikvm(5624):   at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-10 16:03:37.568: I/dalvikvm(5624):   at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:313)
01-10 16:03:37.568: I/dalvikvm(5624):   at android.app.Activity.setContentView(Activity.java:1924)
01-10 16:03:37.573: I/dalvikvm(5624):   at com.anfengde.ui.call.FormadorActivity.onCreate(FormadorActivity.java:62)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.Activity.performCreate(Activity.java:5206)
01-10 16:03:37.573: I/dalvikvm(5624):   at  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.ActivityThread.access$700(ActivityThread.java:140)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.os.Handler.dispatchMessage(Handler.java:99)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.os.Looper.loop(Looper.java:137)
01-10 16:03:37.573: I/dalvikvm(5624):   at android.app.ActivityThread.main(ActivityThread.java:4921)
01-10 16:03:37.573: I/dalvikvm(5624):   at java.lang.reflect.Method.invokeNative(Native Method)
01-10 16:03:37.573: I/dalvikvm(5624):   at java.lang.reflect.Method.invoke(Method.java:511)
01-10 16:03:37.573: I/dalvikvm(5624):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
01-10 16:03:37.573: I/dalvikvm(5624):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
01-10 16:03:37.573: I/dalvikvm(5624):   at dalvik.system.NativeStart.main(Native Method)
01-10 16:03:37.578: A/libc(5624): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 5624 (nfengde.ui.call)"

UPDATED————————-

Here is the code I think that could be the cause of the error:

I do this on Both activities on onCreate() and on the onRestart()

settings = getSharedPreferences("MyPreferenceFile", 0);
if (settings.getString("estantePadrao", "teste").equals("Claro")) {
    id = getResources().getIdentifier("estante_cursista_v01",
        "drawable", getPackageName());
    imagemPrateleira.setImageResource(id);
} else {
    if (settings.getString("estantePadrao", "teste").equals("Escuro")) {
        id = getResources().getIdentifier("estante_cursista_v02",
            "drawable", getPackageName());
        imagemPrateleira.setImageResource(id);
    } else {
        id = getResources().getIdentifier("estante_cursista_v03",
            "drawable", getPackageName());
        imagemPrateleira.setImageResource(id);
    }
}
  • 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-17T14:11:45+00:00Added an answer on June 17, 2026 at 2:11 pm

    I discovered that the ROM I have installed in my Phone has a memory leak wich was causing the application to crash.

    I have tested on other devices and it is working normally.

    Thanks for all the help and support!

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

Sidebar

Related Questions

I have JSON documents of this type: { name : 'John', age : 30,
I have user document collection like this: User { id:001 name:John, age:30, friends:[userId1,userId2,userId3....] }
I have map like this: data = {user.name: John, user.surname: Doe, city: NY} I
i have an json array like this //data.json { one: [ {name:john},{name:joe},{name:vicky} ], two:
Imagine you have a map like this: (def person { :name { :first-name John
I have this JSON data: var people = [ { name : John, age
I have some JSON data that looks like this: { data: [{ name:John Smith,
I have a JSON structure like this: { id:100 contactInfo: { name: John Doe
I have this json code: { data: [ { name: John, id: 11 },
I have simple nested JSON: { user: { name: John, related: { name: Alice,

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.