Notices


Closed Thread
Thread Tools
Posts: 164 | Thanked: 64 times | Joined on May 2013
#4401
Originally Posted by Scorpius View Post
You've got to be kidding me...

You have to run Yappari 24/7 to receive messages all the time. You can close the main window but Yappari has to be running (you have to see the blue icon in the notification area) if you want to receive messages.

What did you EXPECT?!?!?!?
seems like he want to run yappari like whatsapp, always hided and working when message received )
 
Posts: 10 | Thanked: 0 times | Joined on Oct 2013 @ panchkula
#4402
Originally Posted by murik View Post
seems like he want to run yappari like whatsapp, always hided and working when message received )
yaa i want this only.....
 
Posts: 59 | Thanked: 47 times | Joined on Aug 2012
#4403
Originally Posted by shivam_dhiman View Post
yaa i want this only.....
Then don't quit the application. What's the deal with that?
 
Posts: 184 | Thanked: 75 times | Joined on Mar 2011 @ UK
#4404
@Scorpius

Hi there,

I remember you saying you will be working on bbm once its released. Are you still going to work on it?

thx
__________________
#1 Nokia N900 Feb- 2011 - June - 2013 (Dead motherboard)
#2 Nokia N900 July-2013 (CSSU Stable) - Present
#3 Nokia N900 April-2014 (CSSU Thumb) - Present
 
Scorpius's Avatar
Posts: 1,396 | Thanked: 2,796 times | Joined on Sep 2010 @ Caracas, Venezuela
#4405
Originally Posted by Ast007 View Post
@Scorpius

Hi there,

I remember you saying you will be working on bbm once its released. Are you still going to work on it?

thx
I'm not sure, I don't think I have that much free time in my hands lately.
__________________
Support Yappari (a Whatsapp client for the N900 only) - Donate
 
NerdKnight's Avatar
Posts: 113 | Thanked: 334 times | Joined on Oct 2010 @ Argentina
#4406
Hi Scorpius, I think I found the problem causing Yappari to consume too much CPU, the problem is located here:
Code:
void BinTreeNodeReader::fillArray(QByteArray& buffer, quint32 len)
{
Utilities::logData("Debug: BinTreeNodeReader::fillArray");
    char data[1025];

    buffer.clear();

    // bool ready = true;

    /*
    if (socket->bytesAvailable() < 1)
    {
        Utilities::logData("fillArray() waiting for bytes");
        ready = socket->waitForReadyRead(READ_TIMEOUT);
    }

    if (!ready)
    {
        Utilities::logData("fillArray() not ready / timed out");
        throw IOException(socket->error());
    }
    */

    int needToRead = len;
    while (needToRead > 0)
    {
        Utilities::logData("Debug: BinTreeNodeReader::fillArray--loop");
        int bytesRead = socket->read(data,(needToRead > 1024) ? 1024 : needToRead);

        if (bytesRead < 0)
            throw IOException(socket->error());
        if (bytesRead == 0)
            // socket->waitForReadyRead(READ_TIMEOUT);
            qApp->processEvents();
        else
        {
            needToRead -= bytesRead;
            buffer.append(data,bytesRead);
        }
    }
}
It looks like when there is some sort of connection problem, it nevers exists the while loop and there is no sleep function called, so Yappri eats the CPU. As you can see I added some log messages, when the problem arouse, in minutes the log file grew 26MB large, until I ran out of disk space. I'll patch the code and see if it happens again.
 
Scorpius's Avatar
Posts: 1,396 | Thanked: 2,796 times | Joined on Sep 2010 @ Caracas, Venezuela
#4407
Originally Posted by NerdKnight View Post
It looks like when there is some sort of connection problem, it nevers exists the while loop and there is no sleep function called, so Yappri eats the CPU. As you can see I added some log messages, when the problem arouse, in minutes the log file grew 26MB large, until I ran out of disk space. I'll patch the code and see if it happens again.
You can try to uncomment the waitForReadyRead but put it AFTER the processEvents.
__________________
Support Yappari (a Whatsapp client for the N900 only) - Donate
 
NerdKnight's Avatar
Posts: 113 | Thanked: 334 times | Joined on Oct 2010 @ Argentina
#4408
Originally Posted by Scorpius View Post
You can try to uncomment the waitForReadyRead but put it AFTER the processEvents.
Ok, I'll try it and let you know what happens.
 
Community Council | Posts: 680 | Thanked: 1,227 times | Joined on Sep 2010 @ Mbabane
#4409
Originally Posted by NerdKnight View Post
Hi Scorpius, I think I found the problem causing Yappari to consume too much CPU, the problem is located here:
Code:
void BinTreeNodeReader::fillArray(QByteArray& buffer, quint32 len)
{
Utilities::logData("Debug: BinTreeNodeReader::fillArray");
    char data[1025];

    buffer.clear();

    // bool ready = true;

    /*
    if (socket->bytesAvailable() < 1)
    {
        Utilities::logData("fillArray() waiting for bytes");
        ready = socket->waitForReadyRead(READ_TIMEOUT);
    }

    if (!ready)
    {
        Utilities::logData("fillArray() not ready / timed out");
        throw IOException(socket->error());
    }
    */

    int needToRead = len;
    while (needToRead > 0)
    {
        Utilities::logData("Debug: BinTreeNodeReader::fillArray--loop");
        int bytesRead = socket->read(data,(needToRead > 1024) ? 1024 : needToRead);

        if (bytesRead < 0)
            throw IOException(socket->error());
        if (bytesRead == 0)
            // socket->waitForReadyRead(READ_TIMEOUT);
            qApp->processEvents();
        else
        {
            needToRead -= bytesRead;
            buffer.append(data,bytesRead);
        }
    }
}
Maybe I missed something, where did you get this code?
 
Scorpius's Avatar
Posts: 1,396 | Thanked: 2,796 times | Joined on Sep 2010 @ Caracas, Venezuela
#4410
Originally Posted by NerdKnight View Post
Ok, I'll try it and let you know what happens.
The problem and the reason waitForReadyRead is commented out is because it is a blocking function and the whole GUI hangs until a byte is received, and that's a big problem.
__________________
Support Yappari (a Whatsapp client for the N900 only) - Donate
 
Closed Thread

Tags
alpha, awesomeness, best_client, let_it_die, mumbai_dumbai, read_first_post, whatsapp


 
Forum Jump


All times are GMT. The time now is 19:35.