Wednesday, April 23, 2014

java.lang.OutOfMemoryError: (Heap Size = 47843KB, Allocated = 39431KB)


This error occurs when java.lang.OutOfMemoryError I accept the data from the interface into the listview: (Heap Size = 47843KB, Allocated = 39431KB)
Guiqiu how to solve. . .
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
lz This is how much data is loaded ah?
Reply:
cited a floor hjywyj reply:
lz This is how much data is loaded ah?

Should not be a big ah? There is no solution ah?
Reply:
There are no other log
Reply:
reference to the third floor leehu1987 reply:
there are other logs did not


04-18 15:13:10.302: E / dalvikvm (19830): Out of memory: Heap Size = 47843KB, Allocated = 39431KB, Limit = 49152KB
04-18 15:13:10.302: E / dalvikvm (19830): Extra info: Footprint = 41315KB, Allowed Footprint = 47843KB, Trimmed = 1404KB
04-18 15:13:10.302: D / skia (19830): --- decoder-> decode returned false
04-18 15:13:10.302: W / dalvikvm (19830): threadid = 1: thread exiting with uncaught exception (group = 0x40ad4228)
04-18 15:13:10.312: E / AndroidRuntime (19830): FATAL EXCEPTION: main
04-18 15:13:10.312: E / AndroidRuntime (19830): java.lang.OutOfMemoryError: (Heap Size = 47843KB, Allocated = 39431KB)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.graphics.BitmapFactory.nativeDecodeFile (Native Method)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.graphics.BitmapFactory.decodeFile (BitmapFactory.java: 373)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.graphics.BitmapFactory.decodeFile (BitmapFactory.java: 443)
04-18 15:13:10.312: E / AndroidRuntime (19830): at com.ipi.carkeeper.cache.ImageFileCache.getImage (ImageFileCache.java: 35)
04-18 15:13:10.312: E / AndroidRuntime (19830): at com.ipi.carkeeper.cache.Snippet.getBitmap (Snippet.java: 24)
04-18 15:13:10.312: E / AndroidRuntime (19830): at com.ipi.carkeeper.huodong.HuodongAdapter.getView (HuodongAdapter.java: 112)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.HeaderViewListAdapter.getView (HeaderViewListAdapter.java: 220)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.AbsListView.obtainView (AbsListView.java: 2069)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.ListView.makeAndAddView (ListView.java: 2013)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.ListView.fillDown (ListView.java: 865)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.ListView.fillFromTop (ListView.java: 925)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.ListView.layoutChildren (ListView.java: 1852)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.AbsListView.onLayout (AbsListView.java: 1914)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.RelativeLayout.onLayout (RelativeLayout.java: 925)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.RelativeLayout.onLayout (RelativeLayout.java: 925)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.FrameLayout.onLayout (FrameLayout.java: 431)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.LinearLayout.setChildFrame (LinearLayout.java: 1628)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.LinearLayout.layoutVertical (LinearLayout.java: 1486)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.LinearLayout.onLayout (LinearLayout.java: 1399)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.widget.FrameLayout.onLayout (FrameLayout.java: 431)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.View.layout (View.java: 11359)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewGroup.layout (ViewGroup.java: 4571)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java: 1673)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.view.ViewRootImpl.handleMessage (ViewRootImpl.java: 2711)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.os.Handler.dispatchMessage (Handler.java: 99)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.os.Looper.loop (Looper.java: 156)
04-18 15:13:10.312: E / AndroidRuntime (19830): at android.app.ActivityThread.main (ActivityThread.java: 5109)
04-18 15:13:10.312: E / AndroidRuntime (19830): at java.lang.reflect.Method.invokeNative (Native Method)
04-18 15:13:10.312: E / AndroidRuntime (19830): at java.lang.reflect.Method.invoke (Method.java: 511)
04-18 15:13:10.312: E / AndroidRuntime (19830): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 991)
04-18 15:13:10.312: E / AndroidRuntime (19830): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 758)
04-18 15:13:10.312: E / AndroidRuntime (19830): at dalvik.system.NativeStart.main (Native Method)

Reply:
lz try to image scaling it.
Reply:
references, 5th Floor hjywyj reply:
lz try to image scaling it.

Where shrink shrink ah how great God, I just graduated from what is not. . .
Reply:
http://blog.csdn.net/lincyang/article/details/6651582
Reply:
avd which increase the value of VM heap of
Reply:
Picture is too big, you can request a background picture processing, the picture get a small point, or to regulate, such as what percentage, so you can zoom up. Also you can use a framework called the universal image loader, the picture cache, and do not crash.
Reply:
Of course you can also write their own framework for a picture cache.
Reply:
Picture is too big, you can request a background picture processing, the picture get a small point, or to regulate, such as what percentage, so you can zoom up. Also you can use a framework called the universal image loader, the picture cache, and do not crash. However, the interface can also be a problem area.

No comments:

Post a Comment