From 3c0338f462f17e74266633444bf61e4ef0d3d2fe Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Mon, 13 Jul 2026 22:22:25 -0500 Subject: [PATCH] fix: wipe tower height crash triggered by H2C/A2L support (#14758) The new "Prime-tower visits..." test from #14685 (H2C/A2L support) throws "Coordinate outside allowed range" at random on CI, on both Windows arm64 and Linux x86_64. It's an uninitialized read of WipeTowerData::height. #10780 (H2D/H2S) added a second wipe tower path, generate_new(), that fills in depth, bbx, brim_width and rib_offset but not height. The older generate() sets height, and clear() never did, so on the generate_new path it stays garbage. first_layer_wipe_tower_corners() passes height to get_wipe_tower_cone_base() as R = tan(cone_angle/2) * height. The stray bytes are usually zero, so R is zero and the slice is fine, which is why it passes most runs on every platform. When they aren't zero the cone radius runs past ClipperLib's limit and the slice throws. Nothing selects for it, so it just flakes around. #14685's test is the first to exercise this path, so that's when it started showing up. Initializing height in clear() fixes it, same as the m_origin fix in #13712. The BBL generate_new path has no stabilization cone, so height = 0 is right. --- src/libslic3r/Print.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index bd5c25f478..b39143aaf9 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -774,6 +774,7 @@ struct WipeTowerData number_of_toolchanges = -1; depth = 0.f; brim_width = 0.f; + height = 0.f; rib_offset = Vec2f::Zero(); wipe_tower_mesh_data = std::nullopt; }