Appcelerator Studio - 应用程序因内存泄漏而崩溃

时间:2016-08-03 16:23:32

标签: appcelerator

我目前有一个窗口,它使用视图作为导航视图类型。在该导航视图中,我还添加了一系列视图。就在最近,我在Galaxy S4上遇到了内存不足错误。

[WARN] :   TiUIScrollView: (main) [1647,1647] Scroll direction could not be determined based on the provided view properties. Default VERTICAL scroll direction being used. Use the 'scrollType' property to explicitly set the scrolling direction.
[WARN] :   TiUIScrollView: (main) [173,1820] Scroll direction could not be determined based on the provided view properties. Default VERTICAL scroll direction being used. Use the 'scrollType' property to explicitly set the scrolling direction.
[WARN] :   TiUIScrollView: (main) [240,2060] Scroll direction could not be determined based on the provided view properties. Default VERTICAL scroll direction being used. Use the 'scrollType' property to explicitly set the scrolling direction.
[INFO] :   art: Clamp target GC heap from 135MB to 128MB
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: WaitForGcToComplete blocked for 27.099ms for cause Alloc
[INFO] :   art: Alloc sticky concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 793us total 8.819ms
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc partial concurrent mark sweep GC freed 12(528B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 793us total 25.634ms
[INFO] :   art: WaitForGcToComplete blocked for 32.867ms for cause Background
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc concurrent mark sweep GC freed 57(13KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 701us total 39.062ms
[INFO] :   art: Forcing collection of SoftReferences for 1101KB allocation
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc concurrent mark sweep GC freed 59(2504B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 549us total 33.752ms
[ERROR] :  art: Throwing OutOfMemoryError "Failed to allocate a 1128396 byte allocation with 278738 free bytes and 272KB until OOM"
[ERROR] :  TiUIHelper: (main) [525,2585] Unable to load bitmap. Not enough memory: Failed to allocate a 1128396 byte allocation with 278738 free bytes and 272KB until OOM
[INFO] :   art: Alloc sticky concurrent mark sweep GC freed 35(3KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 885us total 9.521ms
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc partial concurrent mark sweep GC freed 10(384B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 671us total 26.031ms
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc concurrent mark sweep GC freed 5(192B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 701us total 35.888ms
[INFO] :   art: Forcing collection of SoftReferences for 1101KB allocation
[INFO] :   art: Clamp target GC heap from 143MB to 128MB
[INFO] :   art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 732us total 38.513ms
[ERROR] :  art: Throwing OutOfMemoryError "Failed to allocate a 1128396 byte allocation with 278258 free bytes and 271KB until OOM"
[ERROR] :  TiUIHelper: (main) [121,2706] Unable to load bitmap. Not enough memory: Failed to allocate a 1128396 byte allocation with 278258 free bytes and 271KB until OOM
[INFO] :   art: Alloc sticky concurrent mark sweep GC freed 235(13KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 732us total 6.988ms

我可以看到它创建视图,但它崩溃了。我有大约40-50次观看。我试图找到解决这个问题的方法。任何人都有一些提示或指示?

1 个答案:

答案 0 :(得分:0)

没关系,修好了!缩小了我的一些图像!