dev:tests/unit/image_stream.cpp 与实现脱节,BGRA8 断言拒绝但实现接受,Debug 下确定性 SIGABRT
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cmake, cpp
- Domain
- computer-graphics, testing-qa
Research direction
Read tests/unit/image_stream.cpp:34 alongside core/render/image_stream.cpp, especially ImageFrame::valid() and submit(). Reproduce the failure with the supplied Debug CMake build, then confirm the intended BGRA8 behavior with a maintainer. Done means the image_stream test no longer aborts in Debug and covers the agreed BGRA8 result, including conversion content if support is retained.
Written by the indexing model from the issue text.
Description
问题
上游测试套件在 Debug 构建下,image_stream 单测确定性 SIGABRT(连跑 3 次,3/3 复现,exit 134):断言 BGRA8 帧提交必须被拒绝,但实现已显式支持 BGRA8。这是 dev HEAD 既有问题(与 #71–#78 的修复提交无关);仅 assert 生效的 Debug 构建暴露,Release 下被 NDEBUG 掩盖成"通过"。
环境
| 项 | 值 |
|---|---|
| 系统 | Ubuntu 24.04.5,GCC 13.3.0,CMake 3.28.3 |
| EUI-NEO | dev 4691fc0a5c1fde6f3e22f1ac454ed87c7a17f722 |
| 配置 | Debug + bundled(GLFW 补丁脚本哈希需先修正,与本问题无关) |
复现
cmake -S . -B build-tests -DEUI_BUILD_TEST_FIXTURES=ON -DEUI_DEPS_MODE=bundled \
-DGLFW_BUILD_WAYLAND=OFF -DCMAKE_BUILD_TYPE=Debug
cmake --build build-tests --target image_stream
./build-tests/image_stream # 连续 3 次运行均 SIGABRT / exit 134
image_stream: tests/unit/image_stream.cpp:34: int main():
Assertion `!stream->submit({pixels, 4, 2, 16, core::render::ImagePixelFormat::BGRA8, 6})' failed.
根因
- 测试
tests/unit/image_stream.cpp:34(源自a969ed5)断言!submit({... BGRA8 ...}),用例参数合法(4x2、stride 16 = width*4); - 实现
core/render/image_stream.cpp:ImageFrame::valid()(约 :104-105)有case ImagePixelFormat::BGRA8:显式接受(要求 stride ≥ width*4 且 4 字节对齐——本用例恰好满足),submit()(约 :181-191)仅做valid()校验后入队并返回 true; - 断言与实现同源自
a969ed5,语义从未对齐,后续提交也未修正。
期望(建议修复,二选一)
- BGRA8 既然已支持:把断言改为提交成功,并补一条 BGRA→RGBA 转换内容正确性的用例(BGRA 是相机/BMP 常见格式,覆盖有价值)——倾向此方案;
- 若设计上仍要拒绝 BGRA8:恢复实现侧校验。
- Dominant language
- C++
- Stars
- 2k
- Forks
- 177
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sudoevolve/EUI-NEO
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
sudoevolve/EUI-NEO#87 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
sudoevolve/EUI-NEO#81 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
sudoevolve/EUI-NEO#79 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudoevolve/EUI-NEO#45 · 5 comments ·
-
关于安卓demo的讨论Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudoevolve/EUI-NEO#44 · 1 comment ·
All issues in sudoevolve/EUI-NEO
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gavinlouuu-kpt/mib-studio-qt#517 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
EchoTools/nevr-runtime#116 ·
Maintainers usually reply within 1 day
-
code-quality libc++
Difficulty 1/5 Under an hour Newbie friendliness 82/100
llvm/llvm-project#229284 ·
Maintainers usually reply within 1 day
-
test-issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
llvm/offload-test-suite#1557 ·
Maintainers usually reply within 1 day