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
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
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
wx.DisplaySize() would result in the same situation.
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.browser.SetPage(html,'') self.currentURL = self.browser.GetCurrentURL()
class App(wx.App): def __init__(self, *args, **kwds): browserFrame = BrowserFrame(None, 'The Frame') browserFrame.Show() self.browserFrame = browserFrame
app = App() def do_something(): app.browserFrame.setPage('<div>The Page</div>') do_something() app.MainLoop()
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.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.
Anyone can help? Thanks in advance!