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. How to contact comment author at the AM?

Hi,
I've got a critical bug comment without sufficient details... ("Lost
all of my pics..", Walkie Vault application at AM)
We are working hard with bug reproducing for a few days without
success. But, even if the bug would be reproduced I can't say
confidently that it is the same bug. Means, I can't check if the
critical bug was really fixed. We can't contact comment author and
this is a blind alley:(.
Does anybody found any way to contact comment author?

hm, look a this site:
http://www.androlib.com/android.application.by-insoft-android-walkievault-qqBn.aspx
If you click comment author name the site will show you a list of
comments of this author.
You can find two authors with the same name for instance:
http://www.androlib.com/android.comment.author.robert-jwxnz.aspx
http://www.androlib.com/android.comment.author.robert-jDDt.aspx
But this site distinguish authors. Where is the secret? Can it help me
to find author?

Thank you, Dmitriy Minchenko

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

2. Build Android Problem(Labrador)

Hi all, i try to build android but i have trouble like that

r...@froodo:~/mydroid# TARGET_CPU_ABI=none TARGET_PRODUCT=ldp1 make -j2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=ldp1
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================
build/core/copy_headers.mk:15: warning: overriding commands for target
`out/target/product/ldp1/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/ldp1/obj/include/libpv/getactualaacconfig.h'
build/core/Makefile:17: warning: overriding commands for target
`out/target/product/ldp1/system/etc/apns-conf.xml'
build/core/Makefile:17: warning: ignoring old commands for target
`out/target/product/ldp1/system/etc/apns-conf.xml'
build/core/Makefile:17: warning: overriding commands for target
`out/target/product/ldp1/system/etc/vold.conf'
build/core/Makefile:17: warning: ignoring old commands for target
`out/target/product/ldp1/system/etc/vold.conf'
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
true
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host Executable: aapt
(out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
host SharedLib: libESR_Shared (out/host/linux-x86/obj/lib/libESR_Shared.so)
host Executable: apriori
(out/host/linux-x86/obj/EXECUTABLES/apriori_intermediates/apriori)
true
host Executable: bsdiff
(out/host/linux-x86/obj/EXECUTABLES/bsdiff_intermediates/bsdiff)
true
host Executable: bspatch
(out/host/linux-x86/obj/EXECUTABLES/bspatch_intermediates/bspatch)
true
host Executable: dexdump
(out/host/linux-x86/obj/EXECUTABLES/dexdump_intermediates/dexdump)
true
host Executable: dexlist
(out/host/linux-x86/obj/EXECUTABLES/dexlist_intermediates/dexlist)
true
host SharedLib: libhelium (out/host/linux-x86/obj/lib/libhelium.so)
true
host Executable: imgdiff
(out/host/linux-x86/obj/EXECUTABLES/imgdiff_intermediates/imgdiff)
true
target thumb C++: libandroid_runtime <=
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp
target thumb C: libssl <= external/openssl/ssl/s2_enc.c
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:39:
error: expected initializer before '*' token
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:45:
error: 'AGpsStatus' does not name a type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:52:
error: 'AGpsStatus' does not name a type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:99:
error: variable or field 'agps_status_callback' declared void
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:99:
error: 'AGpsStatus' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:99:
error: 'agps_status' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:129:
error: 'AGpsCallbacks' does not name a type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'jboolean
android::android_location_GpsLocationProvider_init(JNIEnv*,
_jobject*)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:154:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:155:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:155:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:155:
error: expected primary-expression before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:155:
error: expected `)' before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:156:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:157:
error: 'sAGpsCallbacks' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_wait_for_event(JNIEnv*,
_jobject*)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:209:
error: 'sAGpsStatusCopy' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:209:
error: 'sAGpsStatus' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_inject_location(JNIEnv*,
_jobject*, jdouble, jdouble, jfloat)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:276:
error: 'const struct GpsInterface' has no member named
'inject_location'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_agps_data_conn_open(JNIEnv*,
_jobject*, _jstring*)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:304:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:305:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:305:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:305:
error: expected primary-expression before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:305:
error: expected `)' before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:307:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_agps_data_conn_closed(JNIEnv*,
_jobject*)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:320:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:321:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:321:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:321:
error: expected primary-expression before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:321:
error: expected `)' before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:323:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_agps_data_conn_failed(JNIEnv*,
_jobject*)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:330:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:331:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:331:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:331:
error: expected primary-expression before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:331:
error: expected `)' before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:333:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp: In
function 'void 
android::android_location_GpsLocationProvider_set_agps_server(JNIEnv*,
_jobject*, jint, _jstring*, jint)':
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:341:
error: 'sAGpsInterface' was not declared in this scope
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:342:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:342:
error: ISO C++ forbids declaration of 'type name' with no type
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:342:
error: expected primary-expression before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:342:
error: expected `)' before 'const'
frameworks/base/core/jni/android_location_GpsLocationProvider.cpp:344:
error: 'sAGpsInterface' was not declared in this scope
make: *** 
[out/target/product/ldp1/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_location_GpsLocationProvider.o]
Error 1
make: ***  Waiting for unfinished jobs....

any idea?

best regards,
Aldyth M

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. ignoring locked SD Card image (when starting emulator)

4. What am i missing here?

5. Unable to compile C application in Emulator

6. About ro.sf.lcd_density

7. How to find out whether the time format is 24-hour format ?