Date: Wed, 29 Apr 2026 20:44:23 +0000 From: Christoph Moench-Tegeder <cmt@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: fe60c877c868 - main - cad/kicad: fix crash on opening Pre-Defined Sizes dialog Message-ID: <69f26da7.427ed.74b705f5@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=fe60c877c868c9ce915d6aac09a88b891c1bce39 commit fe60c877c868c9ce915d6aac09a88b891c1bce39 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org> AuthorDate: 2026-04-29 20:41:57 +0000 Commit: Christoph Moench-Tegeder <cmt@FreeBSD.org> CommitDate: 2026-04-29 20:44:14 +0000 cad/kicad: fix crash on opening Pre-Defined Sizes dialog Patch from upstream https://gitlab.com/kicad/code/kicad/-/commit/e466dffadc797958fbebb18e553fdec0f51e2b28 Reported by: Tomek CEDRO --- cad/kicad/Makefile | 1 + .../files/patch-pcbnew_edit__track__width.cpp | 50 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile index 4e38ee2f251d..929c9f0106c3 100644 --- a/cad/kicad/Makefile +++ b/cad/kicad/Makefile @@ -1,5 +1,6 @@ PORTNAME= kicad DISTVERSION= 10.0.1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= cad diff --git a/cad/kicad/files/patch-pcbnew_edit__track__width.cpp b/cad/kicad/files/patch-pcbnew_edit__track__width.cpp new file mode 100644 index 000000000000..2c0e30dab98a --- /dev/null +++ b/cad/kicad/files/patch-pcbnew_edit__track__width.cpp @@ -0,0 +1,50 @@ +commit e466dffadc797958fbebb18e553fdec0f51e2b28 +Author: Seth Hillbrand <seth@kipro-pcb.com> +Date: Sun Apr 26 15:42:16 2026 -0700 + + Try to fix crash opening Pre-defined Sizes + + Potential cause is that Gtk events are still on the stack after we + destroy the wxChoice + + Wrap the two ShowBoardSetupDialog calls in CallAfter so the dropdown + event finishes unwinding before the toolbar is rebuilt. + + Fixes https://gitlab.com/kicad/code/kicad/-/issues/23708 + +diff --git pcbnew/edit_track_width.cpp pcbnew/edit_track_width.cpp +index 0f123e8771..07dd200232 100644 +--- pcbnew/edit_track_width.cpp ++++ pcbnew/edit_track_width.cpp +@@ -162,7 +162,16 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) + else if( ii == int( m_SelTrackWidthBox->GetCount() - 1 ) ) + { + m_SelTrackWidthBox->SetSelection( GetDesignSettings().GetTrackWidthIndex() ); +- ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ ++ // Best-guess fix for issue #23708 (crash on dialog OK reported on ++ // Flatpak/FreeBSD, not reproduced locally). Suspected cause is that ++ // ReCreateAuxiliaryToolbar(), run on dialog OK, destroys this very ++ // wxChoice while its EVT_CHOICE handler is still on the GTK signal ++ // stack. Defer the dialog so the handler unwinds first. ++ CallAfter( [this]() ++ { ++ ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ } ); + } + else + { +@@ -186,7 +195,12 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) + else if( ii == int( m_SelViaSizeBox->GetCount() - 1 ) ) + { + m_SelViaSizeBox->SetSelection( GetDesignSettings().GetViaSizeIndex() ); +- ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ ++ // See the matching comment in the track-width case above. ++ CallAfter( [this]() ++ { ++ ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ } ); + } + else + {home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f26da7.427ed.74b705f5>
