Python[...] Bad cursor rect event, flags = 0

This is not a stable error or warning. It appears every now and then.

2020-06-16 17:08:28.472 Python[51138:732356] Bad cursor rect event, flags = 0

Update 1: On further check, I doubt about this line self.CenterOnScreen() in BrowserFrame(wx.Frame).__init__ since my commit before the commit of this line produces no error message on manually trial. But after this one, starting to produce randomly.

Update 2: Be the self.CenterOnScreen() in BrowserFrame(wx.Frame).__init__ or not, not relevant. What matters, I guess is still the self.CenterOnScreen() after more manual trials.

Update 3: verified a problem with self.CenterOnScreen(), because wx.GetClientDisplayRect() and wx.DisplaySize() would result in the same situation.

Update 4: self.Center() seems to be okay.

The code lines which are relevant are as following:

class BrowserFrame(wx.Frame):
  def __init__(self, parent, title, *args, **kwds): 
    self.browser = wx.html2.WebView.New(self.panel_main, wx.ID_ANY, style=0)


  def setPage(html):
    self.currentURL = self.browser.GetCurrentURL()
class App(wx.App):
  def __init__(self, *args, **kwds):
     browserFrame = BrowserFrame(None, 'The Frame')
     self.browserFrame = browserFrame
app = App()

def do_something():
    app.browserFrame.setPage('<div>The Page</div>')



The above code snippets show the logical structure of my program. However, I cannot make a demo which produces the error Bad cursor rect event, flags = 0.

In my complete program, the error information is also not stable, which means, sometimes it produces the above error information, sometimes not.

I tried to remove the browserFrame.Show() in the __init__ of App class and put it right above the app.MainLoop() as app.browserFrame.Show() but the problem still exists.

I am on macOS Catalina 10.15.5 . I noticed this issue after I upgraded my OS from 10.15.4(?) to 10.15.5. But I am not sure about the exact time point of having this error. I just noticed the error message after the upgrade of my OS.

And the most weird thing here is, the error message is not stable. But one thing is for sure, if there is this error message, this message appear only once at the beginning of launching. In other words, the error message shows 0 or 1 time(s) upon launching.

So weird…

Anyone can help? Thanks in advance!

Possibly, macOS issue because also seen at,

Yep, that would be my guess too. Or at least it’s something in the wx code that triggers a warning in the system libraries. There are lots of situations like this in the GTK builds, and a few on the other platforms. It doesn’t necessarily mean something is wrong or broken, usually just that something was unexpected.

Thanks for responding. This is a fair explanation.