HarmonyOS WaterFlow滚动到中间重构Sections导致组件异常重复渲染
WaterFlow滚动到中间重构Sections导致组件异常重复渲染。操作步骤如下:
1、将waterFlow滑动到双列流位置。
2、刷新商品触发waterFlow的Sections被重建。
3、屏幕外的FlowItem疯狂刷新。
4、最后导致主线程卡死,内存溢出crash日志如下:
Error message: OutOfMemory when trying to allocate 10223616 bytes function name: OldSpace::Merge
Stacktrace:
at ObservedPropertyAbstract (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:2771:1)
at ObservedPropertyAbstractPU (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:4590:1)
at SynchedPropertyTwoWayPU (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:5748:1)
at factory (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6624:1)
at createSync (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:2886:1)
at initializeConsume (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6629:1)
at DetailDXComponent (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/DXComponent.ets:32:24)
at anonymous (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/component-builder/DinamicXBuilder.ets:34:19)
at updateFunc (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6722:1)
at observeComponentCreation2 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6763:1)
at buildDinamicXWithLinkObj (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/component-builder/DinamicXBuilder.ets:34:19)
at anonymous (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/waterFlow/WaterFlowItem.ets:52:11)
at ifElseBranchUpdateFunction (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:4285:1)
at anonymous (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/waterFlow/WaterFlowItem.ets:51:16)
at updateFunc (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6722:1)
at observeComponentCreation2 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6763:1)
at anonymous (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/waterFlow/WaterFlowItem.ets:48:72)
at ifElseBranchUpdateFunction (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:4285:1)
at anonymous (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/waterFlow/WaterFlowItem.ets:48:72)
at updateFunc (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6722:1)
at observeComponentCreation2 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6763:1)
at initialRender (oh_modules/.ohpm/@xxx-ohos+detail_platform@1.0.120-SNAPSHOT/oh_modules/@xxx-ohos/detail_platform/src/main/ets/components/waterFlow/WaterFlowItem.ets:73:30)
at initialRenderView (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6419:1)
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS WaterFlow组件使用sections进行布局,删除某一项之后布局计算异常
242浏览 • 1回复 待解决
list组件无法滚动到底部
1671浏览 • 1回复 待解决
HarmonyOS 如何实现list组件item滑动到中间高亮显示
349浏览 • 1回复 待解决
HarmonyOS List组件默认滚动到最底部
377浏览 • 1回复 待解决
HarmonyOS waterFlow用sections模式,delete某个元素后列表就不能动
247浏览 • 1回复 待解决
Web组件怎么知道滚动到顶部了
1041浏览 • 1回复 待解决
HarmonyOS WaterFlow里中间子组件如何做滚到顶部吸顶
421浏览 • 1回复 待解决
HarmonyOS waterFlow嵌套在list导致重用失效
337浏览 • 1回复 待解决
HarmonyOS 如何检测Scroll在滚动时,是否滚动到某个子组件的位置
211浏览 • 1回复 待解决
HarmonyOS List组件用ListItemgroup如何滚动到指定的item?
563浏览 • 2回复 待解决
HarmonyOS Scroll组件是否可以滚动到指定的子组件的位置
232浏览 • 1回复 待解决
在嵌套滚动容器的场景下,通过parallelGesture监听子列表手势。会导致滚动异常
1896浏览 • 1回复 待解决
Marquee组件在文本末尾滚动到控件末尾时,能停止滚动并触发回调事件(目前是滚动到控件的开头)
515浏览 • 1回复 待解决
Foreach循环渲染,数据源改变时的重复渲染
1499浏览 • 1回复 待解决
List组件如何滚动到ListItemGroup的某一子项
2607浏览 • 1回复 待解决
HarmonyOS List列表滚动到指定位置
412浏览 • 1回复 待解决
HarmonyOS swiper如何滚动到任意页面?
760浏览 • 1回复 待解决
怎么判断webview滚动到最下方?
635浏览 • 2回复 待解决
HarmonyOS 的ListContainer怎么滚动到指定位置
9128浏览 • 1回复 已解决
HarmonyOS list如何动态滚动到指定位置
303浏览 • 1回复 待解决
HarmonyOS flutter engine特定字符渲染异常
303浏览 • 1回复 待解决
HarmonyOS Web组件实际渲染webview尺⼨在pad上表现异常
156浏览 • 1回复 待解决
如何通过代码触发滚动条滚动到某个位置
2875浏览 • 1回复 待解决
HarmonyOS List组件和WaterFlow组件增强
1145浏览 • 1回复 待解决
如何滚动到指定的ListItemGroup下的listitem?
762浏览 • 1回复 待解决
需要保证LazyForEach下每一个FlowItem的key唯一性,不能重复。如果reload了所有FlowItem的数据,希望新旧数据的key可以重复,组件不重建只刷新UI,可以使用ObjectLink只更新组件中的数据。