증상
samples/exam_science.hwp 페이지 4 (20번 문항) 글상자 안 실린더 이미지(bin_id=2, 99.7×26.9mm)가 SVG 출력에서 누락.
같은 페이지의 19번 문항(bin_id=1, 99.8×20.7mm)은 정상.
구조 차이
| 문항 |
표 nesting |
결과 |
| 19번 (pi=119) |
2x3 표 → 셀 → 그림 (1단) |
✅ 정상 |
| 20번 (pi=127) |
1x1 → 셀 → 2x3 → 셀 → 그림 (2단 nesting) |
❌ 누락 |
근본 원인
PageRenderTree.inline_shape_positions 의 키가 (section, para, control) 인데, para 가 두 가지 의미로 혼용됨:
- paragraph_layout 호출 시 → 섹션 단위 paragraph 인덱스
- layout_table → 셀 paragraph 호출 시 → 셀 내부 paragraph 인덱스 (
cp_idx)
서로 다른 셀 컨텍스트가 동일 키 (0, 0, 1) 등을 공유하여 stale value 가 already_rendered_inline=true 오판을 유발 → table_layout.rs:1900 분기에서 layout_table 재귀 호출이 스킵 → 내부 표 + 그 안의 그림 미렌더.
수정 방향
inline_shape_positions 키에 cell_path 추가:
- 섹션 단위:
(section, para, control, [])
- 셀 단위:
(section, cp_idx, ctrl, cell_path) where cell_path = Vec<(ctrl_idx, cell_idx, cell_para_idx)>
이로써 셀 컨텍스트 간 키 충돌 원천 차단.
검증
- exam_science page 4 — 4개 이미지 모두 렌더링
- exam_eng/math/kor/social — SVG byte-identical (회귀 0)
cargo test --release 1134+ 통과
증상
samples/exam_science.hwp페이지 4 (20번 문항) 글상자 안 실린더 이미지(bin_id=2, 99.7×26.9mm)가 SVG 출력에서 누락.같은 페이지의 19번 문항(
bin_id=1, 99.8×20.7mm)은 정상.구조 차이
근본 원인
PageRenderTree.inline_shape_positions의 키가(section, para, control)인데,para가 두 가지 의미로 혼용됨:cp_idx)서로 다른 셀 컨텍스트가 동일 키
(0, 0, 1)등을 공유하여 stale value 가already_rendered_inline=true오판을 유발 →table_layout.rs:1900분기에서layout_table재귀 호출이 스킵 → 내부 표 + 그 안의 그림 미렌더.수정 방향
inline_shape_positions키에cell_path추가:(section, para, control, [])(section, cp_idx, ctrl, cell_path)wherecell_path = Vec<(ctrl_idx, cell_idx, cell_para_idx)>이로써 셀 컨텍스트 간 키 충돌 원천 차단.
검증
cargo test --release1134+ 통과