fix(base_task): 支持mumu模拟器安卓15:解决安卓15进入登陆界面偶现截图是竖屏的问题;解决大富翁不购买荣誉蓝票问题;解决部分皮肤无法完成御魂整理问题 - #1761
Merged
Conversation
支持mumu模拟器安卓15: APP启动登录阶段游戏尚未横屏, 截图为竖屏(宽<高), _burst检测I_G_ACCEPT时roiBack裁剪出空图导致matchTemplate断言失败进程崩溃。 判断宽<高时跳过检测, 横屏后自动恢复。
There was a problem hiding this comment.
嘿——我已经审阅了你的更改,看起来很棒!
Sourcery 评估
已批准。
请帮我变得更有用!请点击每条评论上的 👍 或 👎,我会利用这些反馈来改进你的审查结果。
Original comment in English
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Approved.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Findings
|
Change Summary
Reconstructed Intent点击此处展开- 这次改动最可能是为了兼容 MuMu Android 15 启动/登录阶段的竖屏截图,避免横屏坐标对应的 `roiBack` 裁剪为空并触发 OpenCV 的 `matchTemplate` 断言崩溃。 - 预期行为是暂时跳过突发检测,待截图恢复横屏后自动恢复好友邀请检测。Observed Constraints点击此处展开- `BaseTask.screenshot()` 每次设备截图后都会调用 `_burst()`,因此该判断位于所有继承任务共享的截图路径上。 - `I_G_ACCEPT` 使用固定横屏坐标(`roi_back` 约为 `(798, 369, 117, 110)`),竖屏时该区域可能越界/为空。 - 当前实现对所有竖屏截图统一跳过好友邀请检测,并依赖 `device.image` 是非空且至少二维、可通过 `shape[0:2]` 表示高宽的图像对象。Intent Alignment
Release Risk
Validation Gaps点击此处展开- 未看到自动化测试覆盖 `image is None`、竖屏、横屏恢复以及竖屏到横屏过渡。 - 应在 MuMu Android 15 上验证启动登录阶段不崩溃、旋转后好友邀请仍能及时处理;同时回归至少一种正常横屏设备。 - 建议确认 `Device.screenshot()` 的图像契约始终提供可安全访问 `shape[0]`/`shape[1]` 的 ndarray,避免防护条件本身引入异常。
|
竖屏截图防护已在根处module/atom/image.py的_safe_match_template统一处理, 所有matchTemplate调用均走该入口, _burst处的判断冗余, 撤销c9c13ee3的改动。
sourcery-ai
Bot
dismissed
their stale review
August 30, 2026 02:07
Sourcery withdrew this approval because the latest commits introduced blocking findings.
st_replace资源roiBack(78x63)小于模板图(100x100), 模板匹配数学上无法完成, appear永远False导致goto_souls循环空转。roiBack改为与roiFront一致(100x100)。
永生之海房间左下角是式神录+发言按钮, 没有普通房间的表情按钮, is_in_room识别不到导致exit_room直接跳过, 之后ui_get_current_page 在房间界面无法识别页面报GamePageUnknownError。新增发言按钮识别图 I_GI_SPEAK并加入is_in_room判断。
最后一局领取奖励后金币动画遮挡左下角导致is_in_room识别失败, exit_room被跳过后ui_get_current_page在房间/选层界面无法识别页面。 新增_wait_room_stable点掉残留奖励弹窗并等界面稳定; 新增_back_to_soul_zones点返回箭头回到御魂副本选择界面再回主界面。
Owner
# 截图竖屏(宽<高, 登录阶段游戏尚未横屏)或roiBack越界时, 裁剪图可能小于模板,
# 直接返回False防止matchTemplate断言崩溃, 横屏后自动恢复
if source.shape[0] < mat.shape[0] or source.shape[1] < mat.shape[1]:
return False这里修的太下游了,而且假设以后同样出现了 “截图竖屏 宽<高” 他就不会raise出来,甚至定位问题到哪儿都没懂 |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


支持mumu模拟器安卓15: APP启动登录阶段游戏尚未横屏, 截图为竖屏(宽<高),
_burst检测I_G_ACCEPT时roiBack裁剪出空图导致matchTemplate断言失败进程崩溃。 判断宽<高时跳过检测, 横屏后自动恢复。
Sourcery 总结
错误修复:
Original summary in English
Sourcery 总结
防止 Android 15 MuMu 模拟器的启动截图方向问题导致连拍检测崩溃。
Bug 修复:
Original summary in English
Sourcery 总结
错误修复:
Original summary in English
Sourcery 总结
增强对 Android 15 MuMu 竖屏启动截图的图像检测能力,并在商城数量中缺少 OCR 分隔符时保持兼容。
Bug 修复:
Original summary in English
Sourcery 总结
防止 Android 15 MuMu 上的启动图像检测崩溃,并改进商店购买处理。
错误修复:
增强功能:
Original summary in English
Sourcery 总结
增强 Android 15 MuMu 的启动图像检测,并改进相关的商城购买处理。
Bug 修复:
改进:
Original summary in English
Summary by Sourcery
Harden startup image detection for Android 15 MuMu and improve related mall purchase handling.
Bug Fixes:
Enhancements: