From 3fecf916c1e2f29aa3cd1dacb9ccafa8819b0bd8 Mon Sep 17 00:00:00 2001 From: "Christopher R. Palmer" Date: Tue, 6 Jan 2026 11:34:59 -0500 Subject: [PATCH 1/4] Fix hangs when trying to edit printer (#11714) On linux, some users report that attempting to edit the printer caused OrcaSlicer to hang. Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com> --- src/slic3r/GUI/Plater.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 5b40d2feeb..edb1a23941 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1714,10 +1714,13 @@ Sidebar::Sidebar(Plater *parent) p->editing_filament = -1; if (p->combo_printer->switch_to_tab()) p->editing_filament = 0; - // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings - p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); - p->btn_edit_printer->Hide(); - p->panel_printer_preset->Layout(); + + wxGetApp().CallAfter([this, panel_color]() { + // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings + p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); + p->btn_edit_printer->Hide(); + p->panel_printer_preset->Layout(); + }); }); ScalableBitmap bitmap_printer(p->panel_printer_preset, "printer_placeholder", PRINTER_THUMBNAIL_SIZE.GetHeight()); From c7d157514d14c274467aa9843bf52ac16b47f0e0 Mon Sep 17 00:00:00 2001 From: Ian Bassi Date: Mon, 26 Jan 2026 18:29:44 -0300 Subject: [PATCH 2/4] Update src/slic3r/GUI/Plater.cpp --- src/slic3r/GUI/Plater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index edb1a23941..e4ab6056c3 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1714,7 +1714,7 @@ Sidebar::Sidebar(Plater *parent) p->editing_filament = -1; if (p->combo_printer->switch_to_tab()) p->editing_filament = 0; - +// ORCA: FIX crash on wxGTK, directly modifying UI (self->Hide() / parent->Layout()) inside a button event can crash because callbacks are not re-entrant, leaving widgets in an inconsistent state wxGetApp().CallAfter([this, panel_color]() { // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); From a5f36564634ade6d20bf08fec5e4efb4acfa1b6e Mon Sep 17 00:00:00 2001 From: Ian Bassi Date: Mon, 26 Jan 2026 18:30:46 -0300 Subject: [PATCH 3/4] Update src/slic3r/GUI/Plater.cpp --- src/slic3r/GUI/Plater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index e4ab6056c3..e6603bd612 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1714,7 +1714,7 @@ Sidebar::Sidebar(Plater *parent) p->editing_filament = -1; if (p->combo_printer->switch_to_tab()) p->editing_filament = 0; -// ORCA: FIX crash on wxGTK, directly modifying UI (self->Hide() / parent->Layout()) inside a button event can crash because callbacks are not re-entrant, leaving widgets in an inconsistent state + // ORCA: FIX crash on wxGTK, directly modifying UI (self->Hide() / parent->Layout()) inside a button event can crash because callbacks are not re-entrant, leaving widgets in an inconsistent state wxGetApp().CallAfter([this, panel_color]() { // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); From 0bf531ace8ab6ca421a592dac881a5d1a6bbe45e Mon Sep 17 00:00:00 2001 From: yw4z Date: Wed, 28 Jan 2026 03:13:51 +0300 Subject: [PATCH 4/4] add safe guard --- src/slic3r/GUI/Plater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index e6603bd612..0ccb93bb57 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1717,7 +1717,9 @@ Sidebar::Sidebar(Plater *parent) // ORCA: FIX crash on wxGTK, directly modifying UI (self->Hide() / parent->Layout()) inside a button event can crash because callbacks are not re-entrant, leaving widgets in an inconsistent state wxGetApp().CallAfter([this, panel_color]() { // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings - p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); + if (!p || !p->panel_printer_preset || !p->btn_edit_printer) + return; + p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); p->btn_edit_printer->Hide(); p->panel_printer_preset->Layout(); });