Merged
修复异常场景抛异常而非空串问题 #5911
修复异常场景抛异常而非空串问题 #5911
Merged
xiatianAdd on 24 days ago
xiatian
xiatian
24 days ago

一、内容说明(相关的Issue)

https://gitcode.com/openharmony/multimedia_image_framework/issues/4918

二、建议测试周期和提测地址

建议测试完成时间:xxxx.xx.xx
投产上线时间:xxxx.xx.xx
提测地址:CI环境/压测环境
测试账号:

三、变更内容

  • 3.1 关联PR列表

  • 3.2 数据库和部署说明

    1. 常规更新
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:bundle exec xxx RAILS_ENV = production;没有写 "无"
  • 3.4 其他技术优化内容(做了什么,变更了什么)

    • 修复异常场景下不反回空串,而是抛异常问题
  • 3.5 废弃通知(什么字段、方法弃用?)
    不涉及

  • 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
    不涉及

四、研发自测点(自测哪些?冒烟用例全部自测?)

自测测试结论:

五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)

检查点:

需求名称 是否影响xx公共模块 是否需要xx功能 需求升级是否依赖其他子产品
xxx 否 需要 不需要

接口测试:

性能测试:

并发测试:

其他:

likedislike
Pull Request has been successfully merged by openharmony_ci.
(Thank you for xiatian's contribution.)
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: waiting_on_author
openharmony_ci
openharmony_ciCollaborators
24 days ago Comments:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接。


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: dco检查成功
xiatianxiatian
24 days ago Modify description of pull request
xiatian
xiatian
24 days ago Comments:

start build

likedislike
openharmony_ci
openharmony_ciCollaborators
24 days ago Comments:

首次触发
门禁构建开始,包含静态检查、代码编译和测试【ohos-sdk编译, dayu600_7885编译, new_part_compile编译, ohos-host_mini_tdd编译, dayu200_tdd编译, mac-sdk编译, x86_64_virt_tdd编译, dayu200编译, x86_64_virt编译, dayu600_7885测试, part_compile编译, dayu200测试, master_inner_build编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6aced59864650f998bedfc38/runlist

likedislike
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: 编译成功
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: 静态检查成功
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: 冒烟测试成功
openharmony_ciopenharmony_ciCollaborators
24 days ago Test passed
openharmony_ci
openharmony_ciCollaborators
24 days ago Comments:

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

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 ohos-sdk success NA >>>
2 dayu200 success success >>>
3 dayu200_tdd success NA >>>
4 master_inner_build success(IGNORE) NA >>>
5 ohos-host_mini_tdd success NA >>>
6 dayu600_7885 success success >>>
7 x86_64_virt success NA >>>
8 x86_64_virt_tdd success(IGNORE) NA >>>
9 part_compile failed(IGNORE)(compile failed) NA >>>
10 new_part_compile failed(IGNORE)(compile failed) NA >>>
11 mac-sdk success NA >>>

likedislike
openharmony_ciopenharmony_ciCollaborators
24 days ago Removed label: waiting_on_author
openharmony_ciopenharmony_ciCollaborators
24 days ago Added label: waiting_for_review
openharmony_ci
openharmony_ciCollaborators
24 days ago Comments:

您好,Committer @yaozhupeng @yangfan9527 @chen-yuheng5 ,请分配检视人员检视该PR,可以通过命令"assign [@someone_id]"分配检视人员,也可以直接评论"assign"分配给自己进行检视。


Hello, Committer @yaozhupeng @yangfan9527 @chen-yuheng5 . Please assign someone to review the PR. You can assign a reviewer by using the command "assign [@someone_id]", or you can comment "assign" to review the PR by yourself.

likedislike
yangfan9527yangfan9527Collaborators
23 days ago Approval passed
openharmony_ci
openharmony_ciCollaborators
23 days ago Comments:

验证结果已超过12小时,之前验证结果无效,自动重新触发构建,请关注最新验证结果

likedislike
openharmony_ci
openharmony_ciCollaborators
23 days ago Comments:

start build

likedislike
openharmony_ciopenharmony_ciCollaborators
23 days ago Removed label: 编译成功
openharmony_ciopenharmony_ciCollaborators
23 days ago Removed label: 静态检查成功
openharmony_ciopenharmony_ciCollaborators
23 days ago Removed label: 冒烟测试成功
openharmony_ci
openharmony_ciCollaborators
23 days ago Comments:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【ohos-sdk-codearts-new编译, ohos-host_mini_tdd编译, x86_64_virt编译, dayu600_7885编译, new_part_compile编译, dayu200编译, dayu200测试, mac-sdk编译, dayu200_tdd编译, x86_64_virt_tdd编译, master_inner_build编译, ohos-sdk编译, dayu600_7885测试, part_compile编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6ad0332364650f998b614ae6/runlist

likedislike
openharmony_ciopenharmony_ciCollaborators
23 days ago Added label: 编译成功
openharmony_ciopenharmony_ciCollaborators
23 days ago Added label: 静态检查成功
openharmony_ciopenharmony_ciCollaborators
23 days ago Added label: 冒烟测试成功
openharmony_ciopenharmony_ciCollaborators
23 days ago Test passed
openharmony_ci
openharmony_ciCollaborators
23 days ago Comments:

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

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 ohos-sdk success NA >>>
2 dayu200 success success >>>
3 dayu200_tdd success NA >>>
4 master_inner_build success(IGNORE) NA >>>
5 ohos-host_mini_tdd success NA >>>
6 dayu600_7885 success success >>>
7 x86_64_virt success NA >>>
8 x86_64_virt_tdd success(IGNORE) NA >>>
9 part_compile failed(IGNORE)(skip build) NA >>>
10 new_part_compile success(IGNORE) NA >>>
11 mac-sdk success NA >>>
12 ohos-sdk-codearts-new failed(IGNORE)(skip build) NA >>>

likedislike
openharmony_ci
openharmony_ciCollaborators
23 days ago Comments:

您好,Committer @yaozhupeng @yangfan9527 @chen-yuheng5 ,请分配检视人员检视该PR,可以通过命令"assign [@someone_id]"分配检视人员,也可以直接评论"assign"分配给自己进行检视。


Hello, Committer @yaozhupeng @yangfan9527 @chen-yuheng5 . Please assign someone to review the PR. You can assign a reviewer by using the command "assign [@someone_id]", or you can comment "assign" to review the PR by yourself.

likedislike
openharmony_ciopenharmony_ciCollaborators
23 days ago Closed associated issue
openharmony_ciopenharmony_ciCollaborators
23 days ago Merged pull request, merge node SHA: dc37f12372d580a092cd35254d6d79b3eef69123
openharmony_ciopenharmony_ciCollaborators
23 days ago Removed label: waiting_for_review
openharmony_ciopenharmony_ciCollaborators
23 days ago Added label: merged
姚星宇
姚星宇15 days agoStart code review1
frameworks/kits/cj/src/image_ffi.cpp
@@ -679,3 +679,3 @@
679679 for (size_t i = 0; i < valueStrArray.size(); i++) {
680680 value[i] = Utils::MallocCString(valueStrArray[i]);
681- if (value[i] == nullptr) {
681+ if (value[i] == nullptr && !valueStrArray[i].empty()) {
姚星宇
姚星宇15 days agoComments:

【AI告警检视】中 image_ffi.cpp:681\n\n当 valueStrArray[i] 为空串且 MallocCString 返回 nullptr 时,value[i] 保持 nullptr,函数返回 true(成功)。输出 char** 数组中存在 nullptr 条目,若 CJ FFI 层未对 nullptr 做空检查则可能导致空指针解引用崩溃。\n\n将条件从 if (value[i] == nullptr) 改为 if (value[i] == nullptr && !valueStrArray[i].empty())。空串场景下 MallocCString 返回 nullptr 不再触发错误返回。调用方 FfiImageImageSourceImplGetImageProperties 在 MallocCStringArray 返回 true 后直接返回 SUCCESS,不检查数组内是否有 nullptr。\n\n建议:\n- 建议对空串场景显式分配 1 字节空字符串 value[i] = strdup(""),确保所有条目非 nullptr;或与 CJ FFI 团队确认空指针处理方式。

likedislike