[Galaxy S I9000 Android Development] mammenj:
I am getting out of memory exception for media scanner...am i the only one getting this error. And as far as I know it is not a known issue.

Any ideas to fix this on build 14?

----- short logcat of the exception ------------------------------

2012-01-21 17:10:15.468 I 353/dalvikvm: "MediaScannerService" prio=5 tid=13 RUNNABLE

2012-01-21 17:10:15.468 I 353/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x413265d0 self=0x1731280

2012-01-21 17:10:15.468 I 353/dalvikvm: | sysTid=1246 nice=11 sched=0/0 cgrp=bg_non_interactive handle=24949024

2012-01-21 17:10:15.468 I 353/dalvikvm: | schedstat=( 0 0 0 ) utm=846 stm=588 core=0

2012-01-21 17:10:15.468 I 353/dalvikvm: at android.database.CursorWindow.nativeGetString(Native Method)

2012-01-21 17:10:15.480 I 353/dalvikvm: at android.database.CursorWindow.getString(CursorWindow.java:442)

2012-01-21 17:10:15.480 I 353/dalvikvm: at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)

2012-01-21 17:10:15.496 I 353/dalvikvm: at android.media.MediaScanner.prescan(MediaScanner.java:992)

2012-01-21 17:10:15.496 I 353/dalvikvm: at android.media.MediaScanner.scanDirectories(MediaScanner.java:1172)

2012-01-21 17:10:15.511 I 353/dalvikvm: at com.android.providers.media.MediaScannerService.scan(MediaScannerService.java:104)

2012-01-21 17:10:15.511 I 353/dalvikvm: at com.android.providers.media.MediaScannerService.access$300(MediaScannerService.java:49)

2012-01-21 17:10:15.511 I 353/dalvikvm: at com.android.providers.media.MediaScannerService$ServiceHandler.handleMessage(MediaScannerService.java:261)

2012-01-21 17:10:15.511 I 353/dalvikvm: at android.os.Handler.dispatchMessage(Handler.java:99)

2012-01-21 17:10:15.511 I 353/dalvikvm: at android.os.Looper.loop(Looper.java:137)

2012-01-21 17:10:15.511 I 353/dalvikvm: at com.android.providers.media.MediaScannerService.run(MediaScannerService.java:183)

2012-01-21 17:10:15.519 I 353/dalvikvm: at java.lang.Thread.run(Thread.java:856)

2012-01-21 17:10:15.519 I 353/dalvikvm:

2012-01-21 17:10:15.683 I 178/ActivityManager: START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] dat=content://ui.email.android.com/view/mailbox?ACCOUNT_UUID=a4d25d5c-8697-40da-aa20-ea3d55aaa9a5&MAILBOX_ID=7 flg=0x14000000 cmp=com.android.email/.activity.Welcome bnds=[0,556][120,706]} from pid 409

2012-01-21 17:10:15.964 D 856/ExchangeService: !!! EAS ExchangeService, onStartCommand, startingUp = false, running = true

2012-01-21 17:10:16.015 D 409/OpenGLRenderer: Flushing caches (mode 1)

2012-01-21 17:10:16.015 I 178/ActivityManager: START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x2000000 cmp=com.android.email/.activity.EmailActivity (has extras)} from pid 1359

2012-01-21 17:10:16.054 D 409/OpenGLRenderer: Flushing caches (mode 0)

2012-01-21 17:10:16.136 I 353/dalvikvm-heap: Clamp target GC heap from 49.949MB to 48.000MB

2012-01-21 17:10:16.136 D 353/dalvikvm: GC_CONCURRENT freed <1K, 1% free 49030K/49159K, paused 2ms+29ms

2012-01-21 17:10:16.207 2 1359/NFC: this device does not have NFC support

2012-01-21 17:10:16.214 W 353/dalvikvm: threadid=13: thread exiting with uncaught exception (group=0x40a4a1f8)

2012-01-21 17:10:16.406 D 1359/dalvikvm: GC_CONCURRENT freed 176K, 3% free 9527K/9799K, paused 14ms+3ms

2012-01-21 17:10:16.546 D 1359/libEGL: loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so

2012-01-21 17:10:16.585 D 1359/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so

2012-01-21 17:10:16.589 D 1359/libEGL: loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so

2012-01-21 17:10:16.679 D 1359/OpenGLRenderer: Enabling debug mode 0

2012-01-21 17:10:16.773 I 178/ActivityManager: Displayed com.android.email/.activity.EmailActivity: +729ms (total +896ms)

2012-01-21 17:10:16.785 I 353/dalvikvm-heap: Clamp target GC heap from 49.949MB to 48.000MB

2012-01-21 17:10:16.789 D 353/dalvikvm: GC_CONCURRENT freed <1K, 1% free 49030K/49159K, paused 2ms+37ms

2012-01-21 17:10:16.972 I 353/dalvikvm-heap: Clamp target GC heap from 49.948MB to 48.000MB

2012-01-21 17:10:16.976 D 353/dalvikvm: GC_FOR_ALLOC freed <1K, 1% free 49029K/49159K, paused 187ms

2012-01-21 17:10:17.339 D 353/dalvikvm: GC_CONCURRENT freed 39848K, 82% free 9181K/49159K, paused 2ms+6ms

2012-01-21 17:10:17.648 D 1359/dalvikvm: GC_EXPLICIT freed 232K, 4% free 9631K/9991K, paused 3ms+4ms

2012-01-21 17:10:17.750 E 353/AndroidRuntime: FATAL EXCEPTION: MediaScannerService

java.lang.OutOfMemoryError

at android.database.CursorWindow.nativeGetString(Native Method)

at android.database.CursorWindow.getString(CursorWindow.java:442)

at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)

at android.media.MediaScanner.prescan(MediaScanner.java:992)

at android.media.MediaScanner.scanDirectories(MediaScanner.java:1172)

at com.android.providers.media.MediaScannerService.scan(MediaScannerService.java:104)

at com.android.providers.media.MediaScannerService.access$300(MediaScannerService.java:49)

at com.android.providers.media.MediaScannerService$ServiceHandler.handleMessage(MediaScannerService.java:261)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at com.android.providers.media.MediaScannerService.run(MediaScannerService.java:183)

at java.lang.Thread.run(Thread.java:856)