Passing an invalid index such
as wx.NOT_FOUND to
wx.Choice results in the following error on MAC when using the latest build from the buildbot at http://buildbot.wxpython.org/
C++ assertion ""IsValid(n)"" failed at /Users/robind/projects/bb2/dist-osx-py38/build/ext/wxWidgets/src/osx/choice_osx.cpp(210) in GetString(): wxChoice::GetString(): invalid index.
But according to the documentation at https://docs.wxwidgets.org/trunk/group__group__funcmacro__debug.html#ga4822a2ea9fdd0bc98caa3ff42587743e it should return the empty string without any warnings.
The offending line is
wxCHECK_MSG( IsValid(n), wxEmptyString, wxT("wxChoice::GetString(): invalid index") ); and according to the documentation of the macro at https://docs.wxwidgets.org/trunk/group__group__funcmacro__debug.html#ga4822a2ea9fdd0bc98caa3ff42587743e
the macro would provide the expected behavior if wxWidgets is compiled in release mode, but not if it is compiled in debug mode.
So my question, is the buildbot compling wxWidgets in debug mode on purpose? If so, that is fine, I just wanted to make sure. I am also not sure that using the macro is the recommend way of implementing the intended behavior so I am also referencing the issue at https://trac.wxwidgets.org/ticket/18852