android phonegap app is crashing while scrolling dropdown on htc( android 4.1.1) mobile-Collection of common programming errors
I have two drop downs one contains state and other cities.If i scroll the city drop drop of around 50 values,the app throws logcat error like below.This happens only in HTC mobile.Can any one suggest me a solution to overcome this problem.
10-24 02:25:18.611: E/dalvikvm-heap(7401): Out of memory on a 137616-byte allocation.
10-24 02:25:18.611: I/dalvikvm(7401): "main" prio=5 tid=1 RUNNABLE
10-24 02:25:18.611: I/dalvikvm(7401): | group="main" sCount=0 dsCount=0 obj=0x40aa6c70 self=0x97fd20
10-24 02:25:18.611: I/dalvikvm(7401): | sysTid=7401 nice=0 sched=0/0 cgrp=default handle=1074324872
10-24 02:25:18.611: I/dalvikvm(7401): | schedstat=( 0 0 0 ) utm=2308 stm=382 core=0
10-24 02:25:18.611: I/dalvikvm(7401): at android.graphics.Bitmap.nativeCreate(Native Method)
10-24 02:25:18.611: I/dalvikvm(7401): at android.graphics.Bitmap.createBitmap(Bitmap.java:922)
10-24 02:25:18.611: I/dalvikvm(7401): at android.graphics.Bitmap.createBitmap(Bitmap.java:897)
10-24 02:25:18.611: I/dalvikvm(7401): at android.view.View.buildDrawingCache(View.java:10653)
10-24 02:25:18.611: I/dalvikvm(7401): at android.view.View.getDrawingCache(View.java:10503)
10-24 02:25:18.611: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3060)
10-24 02:25:18.611: I/dalvikvm(7401): at android.widget.ListView.drawChild(ListView.java:3499)
10-24 02:25:18.611: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.AbsListView.dispatchDraw(AbsListView.java:2149)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.ListView.dispatchDraw(ListView.java:3489)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.View.draw(View.java:11017)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.AbsListView.draw(AbsListView.java:3514)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.ListView.draw(ListView.java:4202)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3204)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3202)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.View.draw(View.java:11017)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.FrameLayout.draw(FrameLayout.java:450)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3204)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3202)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3202)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.drawChild(ViewGroup.java:3202)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.View.draw(View.java:11017)
10-24 02:25:18.621: I/dalvikvm(7401): at android.widget.FrameLayout.draw(FrameLayout.java:450)
10-24 02:25:18.621: I/dalvikvm(7401): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2214)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2239)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1810)
10-24 02:25:18.621: I/dalvikvm(7401): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2700)
10-24 02:25:18.621: I/dalvikvm(7401): at android.os.Handler.dispatchMessage(Handler.java:99)
10-24 02:25:18.621: I/dalvikvm(7401): at android.os.Looper.loop(Looper.java:156)
10-24 02:25:18.621: I/dalvikvm(7401): at android.app.ActivityThread.main(ActivityThread.java:5045)
10-24 02:25:18.621: I/dalvikvm(7401): at java.lang.reflect.Method.invokeNative(Native Method)
10-24 02:25:18.631: I/dalvikvm(7401): at java.lang.reflect.Method.invoke(Method.java:511)
10-24 02:25:18.631: I/dalvikvm(7401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-24 02:25:18.631: I/dalvikvm(7401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-24 02:25:18.631: I/dalvikvm(7401): at dalvik.system.NativeStart.main(Native Method)