Problem with the heap size

by mystic-d » Sat, 17 May 2008 08:48:18 GMT


Sponsored Links
 Hi
I have developed an application and while running its giving heap size
problem , my application was just crashed (and not getting any
exception) ,  i saw in the DDMS that the heap size for my application
(that its my thought) is 1.316MB and i have free 336.176KB before i
start the new action, and when i start the action its crashing.

Can anyone help me to solve it... Is there any way to increase the
heap size ?
how it can be that an application will have only 1.3MB ?
Thanks !

--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 08:51:03 GMT


 Applications can use a 16 MB heap. It might be you are trying to
allocate too much memory at once, which would be 15 MB (approx.) in
this case.






-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Problem with the heap size

by mystic-d » Sat, 17 May 2008 09:00:43 GMT


 it cant be that im trying to allocate 15MB at once or generally ( i
dont have so much data )... there is any way to check it ?
what is what im watching in the DDMS  that says that the HEAP size is
1.3MB and i free 336KB ?
Thanks !




--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 09:07:21 GMT


 Where do you see this? In the logs? If so, are you sure it's for your
process and not another one?

If you look at the VM information in DDMS, look at the logs to see why
your application is crashing.







-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by mystic-d » Sat, 17 May 2008 09:35:51 GMT


 I saw this at the DDMS , there is a small icon that im pressing on to
ENABLED the "update HEAP" and than in the right side there is a tab
with the heap information (this is what you called the VM information
in the DDMS ? )
where can i find a logs file inside the emulator ?  because in the
logCat i cant see nothing when its crashing..
thanks
--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 09:41:52 GMT


 In logcat you should see messages about the heap growing if you really
get out of heap space.






-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by mystic-d » Sat, 17 May 2008 10:01:02 GMT


 something is very strange because when i run it regularly (not in
debug mode) its work fine, but when im in debug mode , the application
is crashed (i think because im not getting to the next line in the
code..) and i cant see nothing in the logCat.

there is a log files inside the emulator ?

--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 10:02:19 GMT


 Seems like a bug in the VM actually.






-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by mystic-d » Sat, 17 May 2008 10:03:48 GMT


 when i say "i cant see nothing in the logCat" i mean that the logCat
was stop to work (i didnt see any message..  even when i restart the
application)
--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Amos » Sat, 17 May 2008 16:58:03 GMT


 This (logCat messages not appearing all of a sudden) happens
frequently to me. I never managed to isolate the cause, so it's just a
bit of annoying behavior I've come to live with :-). Restarting the
emulator or eclipse usually helps, not always.



--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by trickybit » Mon, 19 May 2008 21:46:48 GMT


 Kill the emulator and eclipse, and then kill adb.exe (on windows at
least, and you use Task Manager/Processes to do it)... Restart works
reliably after that.





--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Gene Vayngrib » Tue, 20 May 2008 20:38:34 GMT


 I see the same all the time. Very time consuming to kill all and start
again. So, I discovered that even when logCat view stops working in
Eclipse - you can still run 'adb logcat' from the command line and it
works like a charm.
Another observation - with logcat view opened - our application
(bhoost.com) slows down a lot. Did not track it down to anything more
specific yet, but trying not to open logCat view in Debug perspective
anymore.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Mandriva aapt: /lib/libz.so.1 using latest SDK update

I was on Mandriva 2010 Spring 32 bits. Tried to install more packages.
No results.
I've tried Ubuntu 32 and 63 bits: both don't install on my laptop.

I'm now on Mandriva 64 bits + JDK 64 bits + Eclipse 64 bits. The
Android emulator starts OK... but I still have this error msg when
compiling. Even after installing libc libz etc ...

Any idea to solve it ?

Hopefully, I am doing Android app for 'fun' and little money.
It would be a HUGE issue if it was for a real company/work...

-- 

2. org.xmlpull.v1.XmlPullParserException: Map value without name attribute: boolean

I am getting a really strange error all of a sudden when getting the
shared preferences in my app.
I have completely removed the app and all data and it just recurs
after install - nothing saves in shared preferences after the app is
killed, the preferences save in memory but everything is reset each
time the app starts. Hence none of the setting for the app are ever
saved permanently, which is obviously a problem.

it looks as though something might be corrupt in the shared data area
but the problem happens across multiple devices, so it seems to be a
software bug. but its a fairly basic thing and it just seem to stop
working.

has anyone seen this problem before? googling the error doesn't seem
to turn up much.

The exception stack trace below occurs the first time i call
getSharedPreferences in the app ...

line 160:
 settings = this.getSharedPreferences(Globals.PREFS_NAME, 0);

W/ApplicationContext( 2955): getSharedPreferences
W/ApplicationContext( 2955): org.xmlpull.v1.XmlPullParserException:
Map value without name attribute: boolean
W/ApplicationContext( 2955):    at
com.android.internal.util.XmlUtils.readThisMapXml(XmlUtils.java:521)
W/ApplicationContext( 2955):    at
com.android.internal.util.XmlUtils.readThisValueXml(XmlUtils.java:733)
W/ApplicationContext( 2955):    at
com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:667)
W/ApplicationContext( 2955):    at
com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:470)
W/ApplicationContext( 2955):    at
android.app.ContextImpl.getSharedPreferences(ContextImpl.java:376)
W/ApplicationContext( 2955):    at
android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:
146)
W/ApplicationContext( 2955):    at
net.robmunro.mypod.WelcomeActivity.onEWCreate(WelcomeActivity.java:
160)
W/ApplicationContext( 2955):    at
net.robmunro.mypod.AbstractEWActivity.onCreate(AbstractEWActivity.java:
25)
W/ApplicationContext( 2955):    at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
W/ApplicationContext( 2955):    at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1611)
W/ApplicationContext( 2955):    at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1663)
W/ApplicationContext( 2955):    at android.app.ActivityThread.access
$1500(ActivityThread.java:117)
W/ApplicationContext( 2955):    at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:931)
W/ApplicationContext( 2955):    at
android.os.Handler.dispatchMessage(Handler.java:99)
W/ApplicationContext( 2955):    at android.os.Looper.loop(Looper.java:
123)
W/ApplicationContext( 2955):    at
android.app.ActivityThread.main(ActivityThread.java:3683)
W/ApplicationContext( 2955):    at
java.lang.reflect.Method.invokeNative(Native Method)
W/ApplicationContext( 2955):    at
java.lang.reflect.Method.invoke(Method.java:507)
W/ApplicationContext( 2955):    at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/ApplicationContext( 2955):    at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/ApplicationContext( 2955):    at dalvik.system.NativeStart.main(Native
Method)

hoping someone has seen it before as i am a bit stumped ....

-- 

3. [Help] Spica Mati

4. bluez version on k.org vs. android

5. Can ContentProvider securely identify a calling application?

6. [WTA] DHD-LeeDroid v2.2.2 bootloop setelah sukses install

7. framebusting out of WebViews