Hi I am facing a problem when I need to export vcards overs bluetooth. Problem is vcards are large in number. Plus If the vcards have images in them then size is really high.
So when i try sending this I get OutOfMemory Exception , its Coming from VcardComposer.java. - At onEntryCreated() Can I make more memory allocation on the go? Is this possible. Dalvik basically cannot allocate memory to these data. Please advice. Thanks & Regards, Ajith PS: Log is below : -17 11:42:31.669 D/dalvikvm( 740): GC_CONCURRENT freed 1943K, 52% free 12605K/26183K, external 3450K/4213K, paused 2ms+4ms 03-17 11:42:31.970 D/dalvikvm( 740): GC_CONCURRENT freed 1954K, 52% free 12576K/26183K, external 3450K/4213K, paused 2ms+4ms 03-17 11:42:32.369 D/dalvikvm( 740): GC_CONCURRENT freed 1980K, 52% free 12642K/26183K, external 3450K/4213K, paused 2ms+3ms 03-17 11:42:32.556 D/dalvikvm( 740): GC_FOR_MALLOC freed 1412K, 53% free 12541K/26183K, external 3450K/4213K, paused 22ms 03-17 11:42:32.556 I/dalvikvm-heap( 740): Forcing collection of SoftReferences for 16760848-byte allocation 03-17 11:42:32.576 D/dalvikvm( 740): GC_FOR_MALLOC freed <1K, 53% free 12540K/26183K, external 3450K/4213K, paused 19ms 03-17 11:42:32.576 E/dalvikvm-heap( 740): Out of memory on a 16760848-byte allocation. 03-17 11:42:32.576 I/dalvikvm( 740): "Binder Thread #2" prio=5 tid=8 RUNNABLE 03-17 11:42:32.576 I/dalvikvm( 740): | group="main" sCount=0 dsCount=0 obj=0x40520920 self=0xea818 03-17 11:42:32.576 I/dalvikvm( 740): | sysTid=747 nice=10 sched=0/0 cgrp=bg_non_interactive handle=583480 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:~91) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.OutputStreamWriter.convert(OutputStreamWriter.java:236) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.OutputStreamWriter.write(OutputStreamWriter.java:225) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.BufferedWriter.write(BufferedWriter.java:301) 03-17 11:42:32.576 I/dalvikvm( 740): at java.io.Writer.write(Writer.java:152) 03-17 11:42:32.576 I/dalvikvm( 740): at android.pim.vcard.VCardComposer$HandlerForOutputStream.onEntryCreated(VCardComposer.java:212) 03-17 11:42:32.576 I/dalvikvm( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:512) 03-17 11:42:32.576 I/dalvikvm( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:466) 03-17 11:42:32.576 I/dalvikvm( 740): at com.android.providers.contacts.ContactsProvider2.outputRawContactsAsVCard(ContactsProvider2.java:5594) 03-17 11:42:32.580 I/dalvikvm( 740): at com.android.providers.contacts.ContactsProvider2.openAssetFile(ContactsProvider2.java:5524) 03-17 11:42:32.580 I/dalvikvm( 740): at android.content.ContentProvider$Transport.openAssetFile(ContentProvider.java:242) 03-17 11:42:32.580 I/dalvikvm( 740): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:234) 03-17 11:42:32.580 I/dalvikvm( 740): at android.os.Binder.execTransact(Binder.java:320) 03-17 11:42:32.580 I/dalvikvm( 740): at dalvik.system.NativeStart.run(Native Method) 03-17 11:42:32.580 I/dalvikvm( 740): 03-17 11:42:32.580 E/JavaBinder( 740): *** Uncaught remote exception! (Exceptions are not yet supported across processes.) 03-17 11:42:32.580 E/JavaBinder( 740): java.lang.OutOfMemoryError 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.OutputStreamWriter.convert(OutputStreamWriter.java:236) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.OutputStreamWriter.write(OutputStreamWriter.java:225) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.BufferedWriter.write(BufferedWriter.java:301) 03-17 11:42:32.580 E/JavaBinder( 740): at java.io.Writer.write(Writer.java:152) 03-17 11:42:32.580 E/JavaBinder( 740): at android.pim.vcard.VCardComposer$HandlerForOutputStream.onEntryCreated(VCardComposer.java:212) 03-17 11:42:32.580 E/JavaBinder( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:512) 03-17 11:42:32.580 E/JavaBinder( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:466) 03-17 11:42:32.580 E/JavaBinder( 740): at com.android.providers.contacts.ContactsProvider2.outputRawContactsAsVCard(ContactsProvider2.java:5594) 03-17 11:42:32.580 E/JavaBinder( 740): at com.android.providers.contacts.ContactsProvider2.openAssetFile(ContactsProvider2.java:5524) 03-17 11:42:32.580 E/JavaBinder( 740): at android.content.ContentProvider$Transport.openAssetFile(ContentProvider.java:242) 03-17 11:42:32.580 E/JavaBinder( 740): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:234) 03-17 11:42:32.580 E/JavaBinder( 740): at android.os.Binder.execTransact(Binder.java:320) 03-17 11:42:32.580 E/JavaBinder( 740): at dalvik.system.NativeStart.run(Native Method) 03-17 11:42:32.580 W/dalvikvm( 740): threadid=8: thread exiting with uncaught exception (group=0x40015560) 03-17 11:42:32.580 E/AndroidRuntime( 740): FATAL EXCEPTION: Binder Thread #2 03-17 11:42:32.580 E/AndroidRuntime( 740): java.lang.OutOfMemoryError 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.OutputStreamWriter.convert(OutputStreamWriter.java:236) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.OutputStreamWriter.write(OutputStreamWriter.java:225) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.BufferedWriter.write(BufferedWriter.java:301) 03-17 11:42:32.580 E/AndroidRuntime( 740): at java.io.Writer.write(Writer.java:152) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.pim.vcard.VCardComposer$HandlerForOutputStream.onEntryCreated(VCardComposer.java:212) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:512) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:466) 03-17 11:42:32.580 E/AndroidRuntime( 740): at com.android.providers.contacts.ContactsProvider2.outputRawContactsAsVCard(ContactsProvider2.java:5594) 03-17 11:42:32.580 E/AndroidRuntime( 740): at com.android.providers.contacts.ContactsProvider2.openAssetFile(ContactsProvider2.java:5524) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.content.ContentProvider$Transport.openAssetFile(ContentProvider.java:242) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:234) 03-17 11:42:32.580 E/AndroidRuntime( 740): at android.os.Binder.execTransact(Binder.java:320) 03-17 11:42:32.580 E/AndroidRuntime( 740): at dalvik.system.NativeStart.run(Native Method) 03-17 11:42:32.587 W/ActivityManager( 116): Force finishing activity com.android.contacts/.DialtactsActivity 03-17 11:42:32.634 V/RenderScript_jni( 724): surfaceCreated 03-17 11:42:32.634 V/RenderScript_jni( 724): surfaceChanged -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en