wxYield called recursively Topic is solved

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
FireMail
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Jun 10, 2005 8:34 am
Location: Austria
Contact:

wxYield called recursively

Post 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
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CS/CM/IT !d++ s+:-- a-- C++++$ UBL*++++$ P--- L++++$ !E-- !W+++$? !N-- !o K--? w++()$ !O M$ !V !PS? !PE? !Y? !PGP !t !5 !X R+++ tv++ !b? DI D++ G e+++ h++ r++ y+
------END GEEK CODE BLOCK------
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Might sound obvious, but... do you use wxYield() in your application?
FireMail
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Jun 10, 2005 8:34 am
Location: Austria
Contact:

Post 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
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CS/CM/IT !d++ s+:-- a-- C++++$ UBL*++++$ P--- L++++$ !E-- !W+++$? !N-- !o K--? w++()$ !O M$ !V !PS? !PE? !Y? !PGP !t !5 !X R+++ tv++ !b? DI D++ G e+++ h++ r++ y+
------END GEEK CODE BLOCK------
mc2r
wxWorld Domination!
wxWorld Domination!
Posts: 1195
Joined: Thu Feb 22, 2007 4:47 pm
Location: Denver, Co
Contact:

Post 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
FireMail
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Jun 10, 2005 8:34 am
Location: Austria
Contact:

Post 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
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CS/CM/IT !d++ s+:-- a-- C++++$ UBL*++++$ P--- L++++$ !E-- !W+++$? !N-- !o K--? w++()$ !O M$ !V !PS? !PE? !Y? !PGP !t !5 !X R+++ tv++ !b? DI D++ G e+++ h++ r++ y+
------END GEEK CODE BLOCK------
FireMail
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Jun 10, 2005 8:34 am
Location: Austria
Contact:

Post 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 :)
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CS/CM/IT !d++ s+:-- a-- C++++$ UBL*++++$ P--- L++++$ !E-- !W+++$? !N-- !o K--? w++()$ !O M$ !V !PS? !PE? !Y? !PGP !t !5 !X R+++ tv++ !b? DI D++ G e+++ h++ r++ y+
------END GEEK CODE BLOCK------
00061205
Knows some wx things
Knows some wx things
Posts: 41
Joined: Mon Jun 16, 2008 3:43 am
Location: Beijing, China

Post 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=
Regards,

00061205
Post Reply