In one of the projects I’m involved in (NonVisual Desktop Access), numerous calls to wx.Yield function are made from various modules. After porting NVDA to wxPython 4 alpha, when wx.Yield is called from some modules, I get a traceback that ends with the following:
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\evtloopcmn.cpp(110) in wxEventLoopBase::Yield(): wxYield called recursively
Branch is “wxPy4”. I and other NVDA developers involved in porting NVDA to wxPython 4 consider this a showstopper, with a lead developer commenting that this might be due to reentrancy issue.
Yes. Basically some event(s) happens while within a wx.Yield call which then results in some other code being called that uses wx.Yield.
The best fix would be to find ways to avoid needing to use yield. Otherwise you could switch to wx.YieldIfNeeded() (which is just a convenience wrapper for wx.GetApp().Yield(True)...) That will just return when the recursion is detected instead of asserting about it. The wx.EventLoopBase.Yield documentation is applicable to this as all the incarnations of Yield eventually get to that method.
-- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout.