reportJSException >>>> exception function:callAddElement, exception:arguments is empty, INSTANCE_RENDERING_ERROR will be set
17:56:26.805 reportJSException >>>> exception function:callAddElement, exception:arguments is empty, INSTANCE_RENDERING_ERROR will be set
17:56:26.827 reportJSException >>>> exception function:callAddElement, exception:arguments is empty, INSTANCE_RENDERING_ERROR will be set
17:56:26.845 reportJSException >>>> exception function:callLayout, exception:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.taobao.weex.ui.component.WXComponent.getComponentType()' on a null object reference
17:56:26.866 at com.taobao.weex.bridge.WXBridgeManager.setExceedGPULimitComponentsInfo(WXBridgeManager.java:3087)
17:56:26.886 at com.taobao.weex.bridge.WXBridgeManager.callLayout(WXBridgeManager.java:3302)
17:56:26.907 at com.taobao.weex.bridge.WXBridge.callLayout(WXBridge.java:705)
17:56:26.927 at com.taobao.weex.base.SystemMessageHandler.nativeRunWork(Native Method)
17:56:26.947 at com.taobao.weex.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:104)
17:56:26.968 at android.os.Handler.dispatchMessage(Handler.java:110)
17:56:26.988 at android.os.Looper.loop(Looper.java:219)
17:56:27.008 at android.os.HandlerThread.run(HandlerThread.java:67)
17:56:27.029 reportJSException >>>> exception function:callLayout, exception:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.taobao.weex.ui.component.WXComponent.getComponentType()' on a null object reference
17:56:27.051 at com.taobao.weex.bridge.WXBridgeManager.setExceedGPULimitComponentsInfo(WXBridgeManager.java:3087)
17:56:27.071 at com.taobao.weex.bridge.WXBridgeManager.callLayout(WXBridgeManager.java:3302)
17:56:27.092 at com.taobao.weex.bridge.WXBridge.callLayout(WXBridge.java:705)
17:56:27.113 at com.taobao.weex.base.SystemMessageHandler.nativeRunWork(Native Method)
17:56:27.134 at com.taobao.weex.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:104)
17:56:27.155 at android.os.Handler.dispatchMessage(Handler.java:110)
17:56:27.176 at android.os.Looper.loop(Looper.java:219)
17:56:27.196 at android.os.HandlerThread.run(HandlerThread.java:67)
- 发布:2021-10-25 18:43
- 更新:2021-11-15 11:45
- 阅读:853
【报Bug】因业务需求,cell标签里面有2层for循环,当list数据大于11必现渲染错误,当数据设置为99时直接抛出java错误,ios正常,安卓必现,系统为鸿蒙系统
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10企业版
HBuilderX类型: 正式
HBuilderX版本号: 3.2.9
手机系统: Android
手机系统版本号: Android 12
手机厂商: 华为
手机机型: mate40E
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
渲染错误
渲染错误
预期结果:
渲染正常
渲染正常
实际结果:
渲染错误
渲染错误
periH (作者)
demo已补上,demo种注释代码恢复则不会出现exception function:callLayout, exception:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.taobao.weex.ui.component.WXComponent.getComponentType()' on a null object reference而是报错渲染问题exception function:callAddElement, exception:arguments is empty, INSTANCE_RENDERING_ERROR will be set
periH (作者)
<template>
<view>
<view>
<text class="title">这是一个标题</text>
</view>
<scroller scroll-direction="horizontal"
:bounce="false"
class="data-container"
:show-scrollbar="false"
:style="{height: height - 25 +'px'}"
>
<list :show-scrollbar="false" :bounce="false" :style="{width: `${dateList.length*132}rpx`, height: height+'px'}">
<header>
<view class="row">
<view v-for="(item,index) in dateList" class="text-box-column" :key="'date'+index">
<text>{{item.dayOfWeek}}</text>
<view class="date-mile">
<text class="font-size-12">{{item.remainRooms === 0 ? '满房' : `空${item.remainRooms}`}}</text>
</view>
</view>
</view>
</header>
<cell v-for="(item, i) in roomTypelist" :key="index">
<view>{{item.name}}</view>
<view v-for="($item, $index) in item.rooms" :key="$item+'room'" class="row">
<view v-for="(child,index) in roomStatelist[i][$index]" :key="child.selfId" class="text-box" :style="{
width: child.actualDurationDay?(child.actualDurationDay*132)+'rpx':child.durationDay ? (child.durationDay*132)+'rpx' : '132rpx',
backgroundColor: '#FFFFFF'
}">
<view
:style="{width: child.actualDurationDay ? (child.actualDurationDay*132-4)+'rpx' : child.durationDay ? (child.durationDay*132-4)+'rpx' : '128rpx', top: '1rpx'}"
class="room-detail-info">
<!-- 房段房态详情 -->
<!-- <view style="position: absolute;">
<view class="room-detail-info-item"
:style="{
width: child.actualDurationDay ? (child.actualDurationDay*132-4)+'rpx' : child.durationDay ? (child.durationDay*132-4)+'rpx' : '128rpx',
justifyContent: 'flex-end'}">
<view style="flex: 1;" v-if="child.status !== 8 && !child.actualDurationDay">
<text class="room-detail-item-nomal">{{child.status}}</text>
</view>
<view v-if="child.durationDay > 1" style="margin-right: 10rpx;height: 40rpx;">
<text class="room-detail-item-night">{{`${child.durationDay}间夜`}}</text>
</view>
</view>
<view v-if="!child.actualDurationDay" class="room-detail-info-item">
<text class="room-detail-item-big"
:style="{width: child.actualDurationDay ? (child.actualDurationDay*132-4)+'rpx' : child.durationDay ? (child.durationDay*132-4)+'rpx' : '128rpx'}">{{child.name}}</text>
</view>
<view v-if="!child.actualDurationDay" class="room-detail-info-item">
<text class="room-detail-item-nomal">{{child.otaName}}</text>
</view>
</view> -->
</view>
</view>
</view>
</cell>
</list>
</scroller>
</view>
</template>
<script>
import data from './data.js'
export default {
data() {
return {
dateList: data.dateList,
roomTypelist: data.roomList,
roomStatelist: [],
height: 0
}
},
onShow() {
this.height = uni.getSystemInfoSync().windowHeight
this.roomTypelist.forEach((v, i) => {
if (v.rooms && v.rooms.length) {
this.roomStatelist[i] = []
v.rooms.forEach((val, index) => {
const temp = JSON.parse(JSON.stringify(this.dateList))
temp.forEach(k => {
k = Object.assign(k, {
$$checked: false,
selfId: `${k.dayOfMonth}_${val.id}`,
otaName: undefined,
name: undefined,
durationDay: undefined
})
})
this.roomStatelist[i][index] = temp
})
}
})
},
methods: {
}
}
</script>
<style>
.row{
flex-direction: row;
}
.data-container{
width: 750rpx;
/* left: 0;
top: 0;
position: fixed;
bottom: 0; */
background-color: #FFFFFF;
}
.text-box-column{
height: 128rpx;
justify-content: center;
flex-direction: column;
align-items: center;
border-right-width: 1rpx;
border-bottom-width: 1rpx;
border-top-width: 1rpx;
border-color: #EEEEEE;
width: 132rpx;
color: #FFFFFF;
background-color: #FFFFFF;
}
.text-box {
height: 128rpx;
justify-content: center;
flex-direction: row;
align-items: center;
border-right-width: 1rpx;
border-top-width: 1rpx;
border-color: #EEEEEE;
background-color: #FFFFFF;
}
.room-detail-info{
/* justify-content: center;
align-items: center; */
height: 120rpx;
}
.room-detail-info-item{
align-items: flex-start;
flex: 1;
/* padding-top: 5rpx; */
padding-left: 10rpx;
flex-direction: row;
height: 40rpx;
}
.room-detail-item-night{
font-size: 24rpx;
color: #2CC47F;
height: 40rpx;
line-height: 40rpx;
}
.room-detail-item-nomal{
font-size: 24rpx;
line-height: 40rpx;
}
.room-detail-item-big{
font-size: 28rpx;
text-overflow: ellipsis;
lines: 1;
line-height: 40rpx;
}
</style>
cpu支持类型勾选arm64-v8a ,然后重新云打包。可以解决该问题
-
periH (作者)
回复 DCloud_Android_ST: 打了自定义基座,勾选了arm64-v8a后,看到的结果是没有报错了,但是最大渲染数是12,剩下的都是空白了,每一层cell表现的都是12个剩下的为空白,目前bug已确认,请问下个版本会修复吗
2021-10-29 17:41
-
回复 7***@qq.com: view太多了 可以尝试使用recycle-list https://uniapp.dcloud.io/component/recycle-list
2021-10-29 18:34
periH (作者)
非常感谢回复,demo已补在下面了
2021-10-26 17:19