diff --git a/python-wxpython4.spec b/python-wxpython4.spec index 262520a..b8ca315 100644 --- a/python-wxpython4.spec +++ b/python-wxpython4.spec @@ -12,7 +12,7 @@ specific code. Name: python-wxpython4 Version: 4.0.7 -Release: 12%{?dist} +Release: 13%{?dist} Summary: %{sum} # wxPython is licensed under the wxWidgets license. The only exception is # the pubsub code in wx/lib/pubsub which is BSD licensed. Note: wxPython @@ -30,6 +30,7 @@ Source0: https://files.pythonhosted.org/packages/source/w/%{srcname}/%{sr Patch0: unbundle-sip.patch Patch1: fix-ftbfs-sip-4.19.23.patch Patch2: wxpymakebuffer-acquire-gil.patch +Patch3: restore-gil-pseudodc.patch BuildRequires: gcc-c++ BuildRequires: doxygen @@ -166,6 +167,9 @@ xvfb-run -a %{__python3} build.py test --pytest_timeout=60 --extra_pytest="-k $S %changelog +* Thu Nov 26 09:38:13 EST 2020 Scott Talbert - 4.0.7-13 +- Backport upstream fix for wxPseudoDC.FindObjects crash (#1901912) + * Thu Nov 5 19:46:11 EST 2020 Scott Talbert - 4.0.7-12 - Backport upstream fix for wxCustomDataObject.GetData crash diff --git a/restore-gil-pseudodc.patch b/restore-gil-pseudodc.patch new file mode 100644 index 0000000..7c57748 --- /dev/null +++ b/restore-gil-pseudodc.patch @@ -0,0 +1,49 @@ +From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001 +From: Robin Dunn +Date: Wed, 18 Nov 2020 10:52:53 -0800 +Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects* + +--- + src/pseudodc.cpp | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp +index 5890ed7e2..ed4bcd06a 100644 +--- a/src/pseudodc.cpp ++++ b/src/pseudodc.cpp +@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id) + // ---------------------------------------------------------------------------- + PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y) + { +- //wxPyBlock_t blocked = wxPyBeginBlockThreads(); ++ wxPyThreadBlocker blocker; + pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst(); + pdcObject *obj; + PyObject* pyList = NULL; +@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y) + } + pt = pt->GetNext(); + } +- //wxPyEndBlockThreads(blocked); + return pyList; + } + +@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y) + PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y, + wxCoord radius, const wxColor& bg) + { +- //wxPyBlock_t blocked = wxPyBeginBlockThreads(); ++ wxPyThreadBlocker blocker; + pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst(); + pdcObject *obj; + PyObject* pyList = NULL; +@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y, + maskdc.SelectObject(wxNullBitmap); + memdc.SelectObject(wxNullBitmap); + } +- //wxPyEndBlockThreads(blocked); +- return pyList; ++ return pyList; + } + + // ----------------------------------------------------------------------------