How to supress "wxWidgets Debug Alert"

Hi everybody,

We have a big (small) problem with the current wxPython 3.0.2.0: it raises a “wxWidgets Debug Alert” when closing a thread.

We cannot use this version because of the Debug Alert showing up all the time (for our customers). See attachment.

We depend in our current situation on version 3.0.2.0 of wxPython. We posted in wxPython-dev the question: Is there anybody who can compile 3.0.2.0 32-bits with one alteration to not show Debug Alerts (minor alteration)?

The question here is:

  • Does anybody have a good solution how to supress these Debug Alerts in 3.0.2.0.

  • We did quite some research but could not solve this issue.

digitale bijlage

De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is niet toegestaan, evenals openbaarmaking, vermenigvuldiging en/of verstrekking aan derden. Alexion Software is niet aansprakelijk voor de juiste en volledige overbrenging van de inhoud van verzonden e-mail berichten, noch voor een tijdige ontvangst daarvan. De aan u verzonden digitale informatie mag uitsluitend gebruikt worden voor het desbetreffende project. De aan u verzonden digitale informatie wordt zonder enige verantwoordelijkheid onzerzijds verstrekt. Aan de door u digitaal ontvangen informatie kunnen geen rechten worden ontleend ten opzichte van Alexion Software. Het is raadzaam om de ontvangen bestanden voor het gebruik te controleren op eventuele aanwezigheid van virussen. Verlies van gegevens door het niet maken van back-ups is niet voor verantwoordelijkheid van Alexion Software.

Op al onze offertes en facturen zijn van toepassing Algemene Voorwaarden zoals gedeponeerd bij de KvK Midden-Nederland onder nummer 30174840 van ICT~Office. Deze zullen wij u op uw eerste verzoek kosteloos toesturen. Een kopie van deze algemene voorwaarden vindt u op alexion.nl/algemene-voorwaarden

wxWidgets Debug Alert.png

You shouldn’t be trying to suppress the message, you should be
trying to fix the problem.
I don’t understand how you could be seeing this in a straight
wxPython app. That message is only issued from the wxSocketModule
destructor, but nothing in wxPython invokes wxSocketModule. In
fact, I don’t think any part of the wxSocket hierarchy is exposed in
wxPython at all.
Is this a large app?

···

AnToine van Maarle - Alexion Software
wrote:

        We have a big (small)

problem with the current wxPython 3.0.2.0: it raises a “** wxWidgets
Debug Alert**” when closing a thread.

        We cannot use this version

because of the Debug Alert showing up all the time (for our
customers). See attachment.

        We depend in our current

situation on version 3.0.2.0 of wxPython. We posted in wxPython-dev the question: Is
there anybody who can compile 3.0.2.0 32-bits with one
alteration to not show Debug Alerts (minor alteration)?

** The
question here is:**

        - Does

anybody have a good solution how to supress these Debug
Alerts in 3.0.2.0.

        - We did

quite some research but could not solve this issue.

-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com

Yes, there is no architectural reason why a wx.App cannot run in a
separate thread. I ran your code in a debugger, and sure enough the
message is being issued by wxSocketModule::OnExit. wxEntryCleanup
called wxModule::DoCleanUpModules which called
wxSocketModule::OnExit, which called wxSocketBase::IsInitialized,
which does the assert. The whole thing is running on the process’
actual main thread, which is not the thread that initialized the
wxApp.
I don’t know why you would be here in the first place, since you
aren’t using any sockets. The problem is, it’s not entirely clear
to me where the problem lies. wxEntryCleanup is being called from
wxPython, not from wxWidgets, and I lose the traceback thread at
that point. It appears that Python may be trying to clean up all
the existing objects from its main thread. The wxApp shutdown
process should have vectored to its main thread. If that’s the
case, then the wxWidgets guys aren’t at fault, and won’t be able to
offer any help.
It does seem odd that wxSocketBase::IsInitialized issues a warning
like that, and that may be worth filing a bug report with wxWidgets.

···

AnToine van Maarle - Alexion Software
wrote:

        We don’t

think we are doing something wrong. Creating and running a
wx.App in a separate
thread should work, right? The debug message is only a
warning.

-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com