-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
持续滑动会导致占用过多内存,然后崩溃 #1
Comments
@13652900200 你的 Fragment,是一直在创建吗? |
我是按照你的例子写 |
代码也是直接复制过去的,oncreat方发里面调用initview,initdatas,这样 |
这个是我的activity文件 public class YingQiangActivity extends BaseActivity {
这个是我的baseActivity
} |
@13652900200 我看看。 |
@13652900200 我这边看不出什么问题来,你可以换 TabLayout 试试。 |
@13652900200 你试试把
目前无法断定是否是我的 bug。看到的日志都是 FragmentManager 的 log。 |
我尝试了不做修改,直接用你的例子运行也是同样的问题,频繁滑动后就崩溃了 |
@13652900200 我发现了,晚上会处理一下。 |
@13652900200 简单修改了一下,已经不会 OOM 。 |
额,Rebuild了一下,还是一样的情况 |
@13652900200 我得重构一下代码,好久没看了,现在应该不会 OOM 。 |
06-07 15:36:20.870 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for SecondFragment{8d91d5d #0 id=0x7f0d012e android:switcher:2131558702:1} not updated inline; expected state 3 found 2
06-07 15:36:30.935 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for ThirdFragment{f9d87d0 #2 id=0x7f0d012e android:switcher:2131558702:2} not updated inline; expected state 3 found 2
06-07 15:36:31.816 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FourthFragment{1b1edef #3 id=0x7f0d012e android:switcher:2131558702:3} not updated inline; expected state 3 found 2
06-07 15:36:34.223 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for SecondFragment{8d91d5d #0 id=0x7f0d012e android:switcher:2131558702:1} not updated inline; expected state 3 found 2
06-07 15:36:34.490 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FirstFragment{9fb7188 #1 id=0x7f0d012e android:switcher:2131558702:0} not updated inline; expected state 3 found 2
06-07 15:36:35.619 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for ThirdFragment{f9d87d0 #2 id=0x7f0d012e android:switcher:2131558702:2} not updated inline; expected state 3 found 2
06-07 15:36:36.393 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FourthFragment{1b1edef #3 id=0x7f0d012e android:switcher:2131558702:3} not updated inline; expected state 3 found 2
06-07 15:36:37.204 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for SecondFragment{8d91d5d #0 id=0x7f0d012e android:switcher:2131558702:1} not updated inline; expected state 3 found 2
06-07 15:36:37.513 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FirstFragment{9fb7188 #1 id=0x7f0d012e android:switcher:2131558702:0} not updated inline; expected state 3 found 2
06-07 15:36:40.484 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for ThirdFragment{f9d87d0 #2 id=0x7f0d012e android:switcher:2131558702:2} not updated inline; expected state 3 found 2
06-07 15:36:40.914 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FourthFragment{1b1edef #3 id=0x7f0d012e android:switcher:2131558702:3} not updated inline; expected state 3 found 2
06-07 15:36:42.289 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for SecondFragment{8d91d5d #0 id=0x7f0d012e android:switcher:2131558702:1} not updated inline; expected state 3 found 2
06-07 15:36:42.787 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for FirstFragment{9fb7188 #1 id=0x7f0d012e android:switcher:2131558702:0} not updated inline; expected state 3 found 2
06-07 15:36:43.863 31470-31484/com.yingzhicheng.app.allchips I/art: Background sticky concurrent mark sweep GC freed 13697(7MB) AllocSpace objects, 2(40KB) LOS objects, 16% free, 39MB/47MB, paused 21.409ms total 144.588ms
06-07 15:36:43.887 31470-31482/com.yingzhicheng.app.allchips W/unknown:CloseableReference: Finalized without closing: c934d07 69a1e34 (type = CloseableStaticBitmap)
06-07 15:36:43.889 31470-31482/com.yingzhicheng.app.allchips W/unknown:CloseableReference: Finalized without closing: 50ae45d 425c1d2 (type = NativePooledByteBuffer)
06-07 15:36:44.865 31470-31470/com.yingzhicheng.app.allchips W/FragmentManager: moveToState: Fragment state for ThirdFragment{f9d87d0 #2 id=0x7f0d012e android:switcher:2131558702:2} not updated inline; expected state 3 found 2
06-07 15:36:45.081 31470-31480/com.yingzhicheng.app.allchips W/art: Suspending all threads took: 103.425ms
06-07 15:36:45.128 31470-31484/com.yingzhicheng.app.allchips I/art: Background sticky concurrent mark sweep GC freed 609(27KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 54MB/54MB, paused 37.584ms total 261.062ms
06-07 15:36:45.301 31470-31484/com.yingzhicheng.app.allchips I/art: Background partial concurrent mark sweep GC freed 27453(12MB) AllocSpace objects, 9(1252KB) LOS objects, 40% free, 40MB/67MB, paused 44.431ms total 173.269ms
06-07 15:36:45.311 31470-31482/com.yingzhicheng.app.allchips W/NativeMemoryChunk: finalize: Chunk 1f7998b still active. Underlying address = ffffffff9bac0000
06-07 15:36:46.068 31470-31470/com.yingzhicheng.app.allchips I/Choreographer: Skipped 71 frames! The application may be doing too much work on its main thread.
06-07 15:36:47.108 31470-31470/com.yingzhicheng.app.allchips D/AndroidRuntime: Shutting down VM
The text was updated successfully, but these errors were encountered: