[Qt-interest] spurious output messages in QProcess - SunOS

Sarvesh Saran Sarvesh.Saran at synopsys.com
Fri Dec 11 08:16:57 CET 2009


Hi,

I have an application that uses QProcess to start a binary and reads its standard output stream into a QString and displays this string onto  a QTextEdit.

The problem is that I see spurious output messages when I run my application in SunOS 5.10  (sun4v sparc SUNW,Sun-Fire-T200).

My Qt version is qt4.3.3 commercial.

The spurious output message strings I see is something like:

change count = 1
change count = 1
change count = 1
change count = 1
change count = 1
change count = 1

I don't see these output strings when I launch the binary from the command line (no GUI/QProcess). Weird thing is we only see this on SunOS and not on other platforms.

The QProcess code is very simple and looks something like this:

masterprocess = new QProcess(this);

masterprocess->start("myscript.sh",args);

connect(masterprocess,SIGNAL(readyReadStandardOutput()),this,SLOT(readmasteroutput()));   connect(masterprocess,SIGNAL(readyReadStandardError()),this,SLOT(readmastererr()));

and..

void MyClass::readmasteroutput()
{
    if(masterprocess != NULL && masterprocess->state()==QProcess::Running)
    {
        QByteArray bt = masterprocess->readAllStandardOutput();
        QString str(bt);
        qDebug()<<"read all out"<<str;  //this is where the spurious strings can be seen.
       }
}

I would like to know how I can go about debugging this issue....or what could be a possible reason for this anomaly. Any help is welcome.


Thanks,
Sarvesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091211/301ba392/attachment.html 


More information about the Qt-interest-old mailing list