2009-07-25 10:31:26     Qt app crashes when using QProcess

Document created by Aaronwu Employee on Aug 16, 2013
Version 1Show Document
  • View in full screen mode

2009-07-25 10:31:26     Qt app crashes when using QProcess

Stefan Pledl (GERMANY)

Message: 78035   




i'm using Qt (uclinux-dist 2009R1-RC2) on a bf548-ezkit based board. Qt woks ok for me, but when i use QProcess the

application crashes with a hardware trace (see attached file).


I can reproduce the error when i create an Qt app which executes the following code when pressing a button.


int main_dialog::on_btnProcess_clicked(void)


    QString procStr = "date";


    QProcess *myProcess = new QProcess(this);



    return 0;




I think there is a problem using the fork/vfork system call when executing myProcess.




Can anybody help me to solve this problem?




Best regards








2009-07-25 22:36:36     Re: Qt app crashes when using QProcess

Mike Frysinger (UNITED STATES)

Message: 78040   


looks like the startProcess() function needs some work to be friendly to nommu systems




2010-03-24 11:23:52     Re: Qt app crashes when using QProcess

Markus Rankl (GERMANY)

Message: 87666   




I am a collegue of Stefan and meanwhile we solved the issue with the use of QProcess.


The Problem is in 'src/corelib/io/qprocess_unix.cpp'. Here the function qt_fork() should use fork() on MMU-Systems and vfork() on NOMMU-Systems. This seems to fail on Blackfin.


So I simply replaced fork() with vfork() on NOMMU-Systems via define-instruction. See the attached patch which replaces the original qt-4.5.0-nommu-fork.patch from 2009r1.


Best Regards