wxSocketBase assertion

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Thu Dec 20, 2012 4:25 pm

wxSocketBase assertion

Post by wxwxwx »

Hello,
i have a dll which causes an assertion when unloading

Code: Select all

wxSocketBase::IsInitialized(): unsafe to call from other threads 
I understand the meaning of this but do not understand why this assertion occurs.

I do not use any wxSocketBase code, like

Code: Select all

wxSocketBase::Initalize()
My DLL establishs a tcp connection, calls WSAStartup and WSACleanup both wihout error.
When unloading the DLL, all threads with a socket connection are closed.

The assertion occurs on stack of wxEntryCleanup (where my DLL instance in fact is already NULL). Inside this function many "modules" (of any kind) are released.
One module obviously calls

Code: Select all

wxSocketBase::IsInitialized
This causes the assertion.

I have no explanation why such a module at all is in the cleanup list.
It seems, i can't do anything to avoid it, because it is called outside DLL thread an within wxEntryCleanup.

Has anyone an idea about the cause of this assertion ?
Thank you
Post Reply