Hi All,
it’s been a while since I posted on this list . In our main application - which still uses wxPython 2.9.4 Classic, Python 2.7 64 bit on Windows 7, sometimes we see these cryptic messages coming up to our error handlers:
Traceback (most recent call last):
File C:\Python27\lib\site-packages\wx-2.9.4-msw\wx\lib\stattext.py, line 84, in DoGetBestSize
label = self.GetLabel()
File C:\Python27\lib\site-packages\wx-2.9.4-msw\wx_core.py, line 9232, in GetLabel
return core.Window_GetLabel(*args, **kwargs)
PyAssertionError: C++ assertion idx < m_size failed at C:\BUILD\wxPython-src-2.9.4.0\include\wx/vector.h(319) in wxVector::at():
It’s not always stattext.py - it can be AUI panes, a simple wx.TextCtrl or a wx.ListCtrl and so on. It seems kind of random where it happens, but it definitely happens when we remotely log on on our workstations from different machines multiple times via Citrix.
It might be an issue of different screen resolutions on those machines used to access the remote workstation, and anyway the error message is harmless as everything works all right in our application once we dismiss our custom error dialog that handles unexpected exceptions in our code.
In any case, it’s annoying for this message to appear in the first place, especially because it’s not due to our code but to something in the wxWidgets machinery…
I was thinking of trying to suppress these messages with something like:
wx.GetApp().SetAssertMode(wx.PYAPP_ASSERT_SUPPRESS)
But I have no clue whether this is going to work (it takes a veeeeery long time to reproduce that traceback above) and if it is going to hide other - more important - assertion errors due to our code.
Am I thinking in the right way? Any suggestion?
Thank you in advance.
Andrea.