From 79d51b31b5bba39af29b680c098e99a6a13a2bf7 Mon Sep 17 00:00:00 2001 From: Robert J Audas Date: Thu, 9 Jul 2026 08:48:17 -0600 Subject: [PATCH 1/4] Disable prime tower width for rib walls (#14625) * Disable prime tower width for rib walls Only enable the prime tower Width field when the selected wall type uses the standard tower shape. Rib towers use the rib-specific settings instead, so leaving Width editable suggests it changes rib geometry when it does not. Fixes #14537 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify prime tower width toggle Use the existing rib-wall helper when disabling the prime tower width control for rib wall towers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/slic3r/GUI/ConfigManipulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 00e2cebc44..edae8c6c79 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -946,7 +946,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in toggle_line("wipe_tower_extra_rib_length", have_rib_wall); toggle_line("wipe_tower_rib_width", have_rib_wall); toggle_line("wipe_tower_fillet_wall", have_rib_wall); - toggle_field("prime_tower_width", have_prime_tower && (supports_wipe_tower_2 || have_rib_wall)); + toggle_field("prime_tower_width", have_prime_tower && !have_rib_wall); toggle_line("single_extruder_multi_material_priming", !bSEMM && have_prime_tower && supports_wipe_tower_2); From e56cdd707f1a7129eb349cd923dc70102d832306 Mon Sep 17 00:00:00 2001 From: nvs1_cinci <61844331+nvs1-cinci@users.noreply.github.com> Date: Fri, 10 Jul 2026 03:23:30 -0400 Subject: [PATCH 2/4] fix: use bambu's network plugin (#14688) Fixes a regression where Timelapse and SD Card media failed to load on Bambu devices. During the dual-cloud-agent refactor, NetworkAgent was updated to require an explicit provider argument. The call site in MediaFilePanel::fetchUrl() was missing this argument, causing it to silently fall back to the default Orca stub instead of routing to the Bambu network plugin. This explicitly passes wxGetApp().get_printer_cloud_provider() to get_camera_url to correctly route the request and restore functionality. --- src/slic3r/GUI/MediaFilePanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MediaFilePanel.cpp b/src/slic3r/GUI/MediaFilePanel.cpp index 84ba61d9d4..6c1a261966 100644 --- a/src/slic3r/GUI/MediaFilePanel.cpp +++ b/src/slic3r/GUI/MediaFilePanel.cpp @@ -520,7 +520,7 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr wfs) fs->SetUrl(res); } }); - }); + }, wxGetApp().get_printer_cloud_provider()); } } From 4b7182b048a979a3aca40782d9d1685a99f632c4 Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Sat, 11 Jul 2026 04:41:22 -0500 Subject: [PATCH 3/4] fix: guard against stale instance ids in PartPlate instance scans (#14523) Deleting an object's instance leaves a stale (obj_id, instance_id) pair in PartPlate::obj_to_instance_set until it is pruned. object_list_changed() runs during the delete path and calls has_printable_instances(), which guarded only obj_id and then indexed object->instances[instance_id] on the now-shorter vector, dereferencing a garbage ModelInstance* and crashing with SIGSEGV. The reported fault address (0x12a) matches a member read on that bad pointer. Reuse the existing valid_instance() helper, which bounds-checks both obj_id and instance_id, at every obj_to_instance_set scan that was missing the instance-id check: has_printable_instances(), printable_instance_size(), is_all_instances_unprintable(), get_extruders_under_cli(), duplicate_all_instance() and set_pos_and_size() (the last had no bounds check at all). valid_instance() is made const so the const CLI scan can call it. Fixes #14159 --- src/slic3r/GUI/PartPlate.cpp | 20 ++++++++++++-------- src/slic3r/GUI/PartPlate.hpp | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 18d6e17b33..6a4e747d3a 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -385,7 +385,7 @@ void PartPlate::set_spiral_vase_mode(bool spiral_mode, bool as_global) } } -bool PartPlate::valid_instance(int obj_id, int instance_id) +bool PartPlate::valid_instance(int obj_id, int instance_id) const { if ((obj_id >= 0) && (obj_id < m_model->objects.size())) { @@ -1688,7 +1688,7 @@ std::vector PartPlate::get_extruders_under_cli(bool conside_custom_gcode, D int obj_id = it->first; int instance_id = it->second; - if ((obj_id >= 0) && (obj_id < m_model->objects.size())) + if (valid_instance(obj_id, instance_id)) { ModelObject* object = m_model->objects[obj_id]; ModelInstance* instance = object->instances[instance_id]; @@ -2359,6 +2359,9 @@ void PartPlate::set_pos_and_size(Vec3d& origin, int width, int depth, int height for (std::set>::iterator it = obj_to_instance_set.begin(); it != obj_to_instance_set.end(); ++it) { int obj_id = it->first; int instance_id = it->second; + if (!valid_instance(obj_id, instance_id)) + continue; + ModelObject* object = m_model->objects[obj_id]; ModelInstance* instance = object->instances[instance_id]; @@ -2833,7 +2836,7 @@ void PartPlate::duplicate_all_instance(unsigned int dup_count, bool need_skip, s int obj_id = it->first; int instance_id = it->second; - if ((obj_id >= 0) && (obj_id < m_model->objects.size())) + if (valid_instance(obj_id, instance_id)) { ModelObject* object = m_model->objects[obj_id]; ModelInstance* instance = object->instances[instance_id]; @@ -2866,7 +2869,7 @@ void PartPlate::duplicate_all_instance(unsigned int dup_count, bool need_skip, s int obj_id = it->first; int instance_id = it->second; - if ((obj_id >= 0) && (obj_id < m_model->objects.size())) + if (valid_instance(obj_id, instance_id)) { ModelObject* object = m_model->objects[obj_id]; ModelInstance* instance = object->instances[instance_id]; @@ -2983,8 +2986,8 @@ int PartPlate::printable_instance_size() int obj_id = it->first; int instance_id = it->second; - if (obj_id >= m_model->objects.size()) - continue; + if (!valid_instance(obj_id, instance_id)) + continue; ModelObject * object = m_model->objects[obj_id]; ModelInstance *instance = object->instances[instance_id]; @@ -3006,7 +3009,7 @@ bool PartPlate::has_printable_instances() int obj_id = it->first; int instance_id = it->second; - if (obj_id >= m_model->objects.size()) + if (!valid_instance(obj_id, instance_id)) continue; ModelObject* object = m_model->objects[obj_id]; @@ -3030,7 +3033,8 @@ bool PartPlate::is_all_instances_unprintable() int obj_id = it->first; int instance_id = it->second; - if (obj_id >= m_model->objects.size()) continue; + if (!valid_instance(obj_id, instance_id)) + continue; ModelObject * object = m_model->objects[obj_id]; ModelInstance *instance = object->instances[instance_id]; diff --git a/src/slic3r/GUI/PartPlate.hpp b/src/slic3r/GUI/PartPlate.hpp index d4c5399142..f841c001a5 100644 --- a/src/slic3r/GUI/PartPlate.hpp +++ b/src/slic3r/GUI/PartPlate.hpp @@ -167,7 +167,7 @@ private: wxCoord m_name_texture_height; void init(); - bool valid_instance(int obj_id, int instance_id); + bool valid_instance(int obj_id, int instance_id) const; void generate_print_polygon(ExPolygon &print_polygon); void generate_exclude_polygon(ExPolygon &exclude_polygon); void generate_logo_polygon(ExPolygon &logo_polygon); From 22e121f4e47542a41c6301ee2438b075f689942d Mon Sep 17 00:00:00 2001 From: pedrosland Date: Sat, 11 Jul 2026 15:19:12 +0100 Subject: [PATCH 4/4] Fix unreadable overlay elements in 3D view on XWayland/Intel (#11557) Fix unreadable overlay elements in 3D view on XWayland/Intel - closes #10287 --- src/slic3r/GUI/ImGuiWrapper.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index d4d08aa84f..c7609be5ef 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -2781,6 +2781,11 @@ void ImGuiWrapper::init_font(bool compress) builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted) io.Fonts->Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight; + // TexDesiredWidth will be increased adaptively below if the built height + // exceeds GL_MAX_TEXTURE_SIZE. Leave it at 0 so ImGui picks the minimum + // width for small glyph sets and we only widen when actually necessary. + io.Fonts->TexDesiredWidth = 0; + ImFontConfig cfg = ImFontConfig(); cfg.OversampleH = cfg.OversampleV = 1; //FIXME replace with io.Fonts->AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, m_font_size, nullptr, ranges.Data); @@ -2852,7 +2857,23 @@ void ImGuiWrapper::init_font(bool compress) io.Fonts->AddCustomRectFontGlyph(default_font, icon.first, icon_sz * 4, icon_sz * 4, 3.0 * font_scale + icon_sz * 4); } - // Build texture atlas + // Build texture atlas, widening it if the height would exceed GL_MAX_TEXTURE_SIZE. + // Increasing the width allows the packing algorithm to grow more horizontally which reduces the height. + io.Fonts->Build(); + GLint gl_max_tex_size = 0; + glsafe(::glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max_tex_size)); + constexpr int max_retries = 6; + for (int attempt = 0; attempt < max_retries && io.Fonts->TexHeight > gl_max_tex_size; ++attempt) { + io.Fonts->TexDesiredWidth = (io.Fonts->TexDesiredWidth > 0 ? io.Fonts->TexDesiredWidth : io.Fonts->TexWidth) * 2; + io.Fonts->Build(); + } + if (io.Fonts->TexHeight > gl_max_tex_size) { + // Shouldn't really happen + BOOST_LOG_TRIVIAL(error) << "Font atlas height " << io.Fonts->TexHeight + << " still exceeds GL_MAX_TEXTURE_SIZE (" << gl_max_tex_size << ")" + << " after " << max_retries << " attempts; rendering may be incomplete"; + } + unsigned char* pixels; int width, height; io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.