d2d1: please pick Wine 4ae80e26e5 (memory leak in every Direct2D path geometry)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Start in dlls/d2d1/geometry.c and inspect d2d_figure_cleanup(), which the issue identifies as leaving figure->vertex_types allocated. Compare the referenced upstream Wine commit 4ae80e26e5bd6bc30e0e7e7fe3b1a60895f896de with the Proton 11 Wine branches. Done means the backport frees the array and the supplied 300,000-geometry reproducer retains no growth from these arrays.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Proton version: 11.0-2e. The fix is also missing from the current proton_11.0, experimental_11.0 and bleeding-edge branches of ValveSoftware/wine (checked 2026-10-22).
Game: Microsoft Flight Simulator 2024 (2537590) with the Fenix A320 add-on, but it affects any program that uses ID2D1PathGeometry.
Problem
d2d_figure_cleanup() in dlls/d2d1/geometry.c never frees figure->vertex_types, so every path geometry figure leaks that array (about 52 bytes per simple geometry). Programs that rebuild path geometries every frame grow without bound. In MSFS 2024, the Fenix A320's FenixDisplay.exe grows by about 90 MB/min, and its cockpit displays get slower and slower during a flight.
Upstream Wine fixed this on 2026-06-28 in 4ae80e26e5bd6bc30e0e7e7fe3b1a60895f896de ("d2d1: Free the vertex types array in d2d_figure_cleanup", https://bugs.winehq.org/show_bug.cgi?id=59916). The fix is a one-line change and is in Wine 11.12 and later, but not in Wine 11.0, which Proton 11 is based on.
Minimal reproducer
No render target needed:
for (i = 0; i < 300000; ++i) {
ID2D1Factory_CreatePathGeometry(factory, &g);
ID2D1PathGeometry_Open(g, &s);
ID2D1GeometrySink_BeginFigure(s, start, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_AddLines(s, pts, 4);
ID2D1GeometrySink_EndFigure(s, D2D1_FIGURE_END_CLOSED);
ID2D1GeometrySink_Close(s);
ID2D1GeometrySink_Release(s);
ID2D1PathGeometry_Release(g);
}
Working set after the loop: +15,360 kB with the current d2d1 (52.4 B per geometry), +0 kB with free(figure->vertex_types) added.
Request
Please pick 4ae80e26e5 into the Proton 11 Wine branches. The Fenix A320 Linux patch project already ships it as a backport (https://github.com/marselnenaj/fenix-a320-linux-patch/pull/10) and reports 0 retained bytes in a 300,000-geometry test on all four of its runners.
Note: I run MSFS through that project's Proton-based runner, not stock Proton, and measured with its d2d1.dll. d2d_figure_cleanup() in ValveSoftware/wine proton_11.0 is the same unfixed code (it frees original_bezier_controls, bezier_controls and vertices, but not vertex_types).
The analysis was done with the help of Claude (Anthropic's AI assistant). I reviewed the results and ran them on my own system.
- Ngôn ngữ chính
- C
- Star
- 2.1k
- Fork
- 521
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ValveSoftware/wine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ValveSoftware/wine#366 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ValveSoftware/wine#363 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
ValveSoftware/wine#353 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
ValveSoftware/wine#303 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
ValveSoftware/wine#358 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ValveSoftware/wine
Issue tương tự
-
severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
luainkernel/lunatik#2221 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
zephyrproject-rtos/zephyr#124160 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
davatorium/rofi#2347 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs area:stdlib found-by:duet-audit kind:docs-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
InauguralSystems/EigenScript#2251 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày