已合并
fix: the infinite loop caused by the error 'Animated node with tag xxx does not exist'. #1698
xiedairong创建于 2025年10月20日
fix: the infinite loop caused by the error 'Animated node with tag xxx does not exist'. #1698
已合并
xiedairong创建于 2025年10月20日
xiedairong
2025年10月20日

Description

When a looping animation node is deleted, the next animation does not play. The main reason is that getMinAcceptableFrameRate calls getNodeByTag but does not catch errors, causing the system to enter an infinite loop of continuously throwing errors, which in turn prevents the next animation from playing.

Changes

  • fixed the infinite loop caused by the error "Animated node with tag xxx does not exist".

Test Plan

  1. Open the Tester.
  2. Check AnimatedTest::after the loading animation ends.

Checklist

likedislike
Pull Request已成功合入, 合并人@huangyouhua
(感谢 xiedairong 的贡献)
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ci成员
2025年10月20日 添加了label:dco检查成功
Xxiedairong
2025年10月20日 关联了issue:fix: the infinite loop caused by the error "Animated node with tag xxx does not exist".
xiedairong
2025年10月20日 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

首次触发
门禁构建开始,包含静态检查、代码编译【ohos_react_native_master编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/68f5ed3064650f998b30a2dd/runlist

likedislike
xjerwu
xjerwu成员2025年10月20日进行代码检视4
tester/harmony/react_native_openharmony/src/main/cpp/RNOHCorePackage/TurboModules/Animated/AnimatedNodesManager.cpp
已过期
@@ -281,2 +277,4 @@
281277 if (driver->hasFinished()) {
282278 finishedAnimations.push_back(animationId);
279+ } else {
280+ driver->runAnimationStep(frameTimeNanos);
xjerwu
xjerwu2025年10月20日评论:

runAnimationStep会根据传入时间戳,判断当前动画是否结束,并设置结束标识,为啥不能在设置结束标识后添加到结束集合,而是要在下一帧才将该动画添加到结束的集合中呢?

likedislike
xiedairong
2025年10月20日 评论:
  1. 结束标识是在driver中设置的,而结束的集合finishedAnimations在AnimatedNodesManager中,因此无法直接设置;
  2. 添加到finishedAnimations并不代表着动画结束,真正的结束操作294-298行。
xjerwu
xjerwu成员
2025年10月20日 评论:

实际上这样修改,下一帧触发动画的结束,这样修改的作用是啥呢?如果没有影响,是不是可以不用修改这里?

System
系统消息系统
2025年10月20日 评论:

changed this line on 9c222228 view diff detail

openharmony_ciopenharmony_ci成员
2025年10月20日 添加了label:编译成功
openharmony_ciopenharmony_ci成员
2025年10月20日 添加了label:静态检查失败
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/68f5ed3064650f998b30a2dd/runlist

静态检查:

# check type result report
1 codeCheck noPass >>>

编译测试:
# Device build result package
1 ohos_react_native_master success >>>

likedislike
Xxiedairong
2025年10月20日 推送  1 个提交:b56de80e-codecheck.
openharmony_ciopenharmony_ci成员
2025年10月20日 删除了label:静态检查失败
openharmony_ciopenharmony_ci成员
2025年10月20日 删除了label:编译成功
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
Xxiedairong
2025年10月20日 推送  1 个提交:9c222228-revert
Xxiedairong
2025年10月20日 修改了pull request 的描述
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
xiedairong
2025年10月20日 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译【ohos_react_native_master编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/68f62d8464650f998b871d64/runlist

likedislike
openharmony_ciopenharmony_ci成员
2025年10月20日 添加了label:编译成功
openharmony_ciopenharmony_ci成员
2025年10月20日 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
2025年10月20日 通过测试
openharmony_ci
openharmony_ci成员
2025年10月20日 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/68f62d8464650f998b871d64/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 ohos_react_native_master success >>>

likedislike
xjerwuxjerwu成员
2025年10月21日 将wu_xujie1设为评审人
此处折叠了8条事件消息 查看更多
huangyouhuahuangyouhua
2025年10月22日 合入了pull request