-
Notifications
You must be signed in to change notification settings - Fork 52
[222_28] 修复 Art Frame 崩溃 #2735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[222_28] 修复 Art Frame 崩溃 #2735
Conversation
da808f9 to
1428216
Compare
1428216 to
f9a75ea
Compare
6fff9fe to
f515df8
Compare
jetjinser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
ISSUE #2732 |
da-liii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
继续改进错误处理的细节
da-liii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
MoonL79
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
如何测试
插入 -> 外观块 -> Art Frame -> Carved Wood。2026/02/02
What
复现场景中,点击
插入 -> 外观块 -> Art Frame -> Carved Wood会直接崩溃。根因是
src/Plugins/MuPDF/mupdf_picture.cpp中像素读写实现对底层缓冲区做了固定 4 字节像素的假设:samples强转为color*访问;n(通道数)和stride(行步长);修复内容:
internal_get_pixel/internal_set_pixel增加坐标边界保护。n/stride/alpha进行读写,不再使用color*强转访问。Why
resolve #2732
Art Frame会走图片 effect 链(含透明和裁剪),该链路对像素访问非常密集。底层像素布局假设错误会在该场景被稳定放大,导致崩溃。
修复后,像素访问与 MuPDF pixmap 内存布局一致,避免越界和非法读取。