Re: Assertion failed: (false), function pluginThreadEntry

"George L. Yermulnik" <[email protected]> Wed, 21 Dec 2011 13:33:54 +0200
Newsgroups gmane.network.licq.general
Organization Earth, Europe, Ukraine, Kiev
Message-ID <[email protected]>
Hello!

On Tue, 20 Dec 2011 at 19:46:51 (+0100), Erik Johansson wrote:

> On Tue, Dec 20, 2011 at 12:45, George L. Yermulnik <[email protected]> wrote:
> > state=2
> > state=3
> > state=2
> > state=3
> > state=2
> > state=3
> > state=1
> > Assertion failed: (false), function pluginThreadEntry, file /usr/ports/WORK/usr/ports/net-im/licq/work/licq-1.5.1/src/plugins/pluginthread.cpp, line 85.

> After googling a bit I realize that my assumption that
> pthread_cond_wait() only returns due to a call to
> pthread_cond_signal() or pthread_cond_broadcast() is wrong. According
> to http://lists.freebsd.org/pipermail/freebsd-hackers/2011-February/034573.html
> pthread_cond_wait() can return for no apparent reason.

> Please try the patch below and see if it fixes the problem for you:

Yep! This helps!
Thanx a lot for your help!!! =)

If it's not too bad-mannered, I'd like to ask you to take a look at
another issue I have here on my sendbox. It's not a fault or something
like that, but is very annoying: after upgrading from 1.3.x to 1.5.x
each time I open the main contact list window from a systray it goes up
vertically for exactly half a centimeter. Maybe it's not because of any
Licq components. So I'm just asking for your opinion =)

And a feature request =) Is it possible to add possibility to toggle
main contact list window state (open/close) via licq_fifo?

ps: thank you one more time for your work! =)

> diff --git a/licq/src/plugins/pluginthread.cpp
> b/licq/src/plugins/pluginthread.cpp
> index 0a4f249..90d8a7c 100644
> --- a/licq/src/plugins/pluginthread.cpp
> +++ b/licq/src/plugins/pluginthread.cpp
> @@ -73,7 +73,10 @@ static void* pluginThreadEntry(void* arg)

>    while (data.myState == PluginThread::Data::STATE_WAITING)
>    {
> -    data.myCondition.wait(data.myMutex);
> +    do
> +    {
> +      data.myCondition.wait(data.myMutex);
> +    } while (data.myState == PluginThread::Data::STATE_WAITING);

>      switch (data.myState)
>      {

> // Erik

-- 
George L. Yermulnik
[YZ-RIPE]