Page 1 of 1

wxYield called recursively

Posted: Tue Apr 22, 2008 10:53 am
by FireMail
Hi there,

I'm developing a client server application using wxSocketClient and wxSocketServer. About 25% of the time when we launch the client we get a debug alert after connecting to the server:
"assert wxAssertFailure failed in wxApp::Yield(); wxYield called recursively"

When looking at the call stack: after the socket event, the functions wxSocketBase::Read -> ::_Read ->::WaitForRead ->::_Wait -> wxYield were called.

Do you have any idea how to get rid of this error? I'm confused, because it doesn't happen all the time, neither we use threads in our application.

Thanks for you help,
juergen

Posted: Tue Apr 22, 2008 11:29 am
by Auria
Might sound obvious, but... do you use wxYield() in your application?

Posted: Tue Apr 22, 2008 11:38 am
by FireMail
no - not in a single line :)

as the debug stack trace shows, it looks like ::wait ::_wait ::read ::_read or smth like that uses it

Posted: Wed Apr 23, 2008 2:05 am
by mc2r
Could you be calling PROCESS_EVENTS()? it is a define for wxYield()

from: common/socket.cpp

Code: Select all

#define PROCESS_EVENTS() wxYield()
If that doesn't help and you have access to a grep like tool you can look at the rest of the sources for calls to wxYield(), there are several.

-Max

Posted: Wed Apr 23, 2008 6:20 am
by FireMail
hi there,

no this function isnt used too. i got the tip from the mailing list that this could result of some flags and i got a tip, where very good informtion can be gathered from the wxbook.

will have a look at this and report my infos later

Posted: Wed Apr 23, 2008 6:55 am
by FireMail
ok found the solution with wxBook :)

Will split up my application into several threads now.
If you need more information why this happened, write me a msg and i will tell ya :)

Posted: Fri Jul 25, 2008 2:52 am
by 00061205
FireMail wrote:ok found the solution with wxBook :)

Will split up my application into several threads now.
If you need more information why this happened, write me a msg and i will tell ya :)
I got the same problem when i use wxSocketClient. How did you solve this problem?
herehttp://forums.wxwidgets.org/viewtopic.p ... highlight=