Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Implementing 'connect" crashes the application
Forum Updated to NodeBB v4.3 + New Features

Implementing 'connect" crashes the application

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 225 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    The attached code compiles / runs and passes both waitForStarted() and waitForReadyRead().

    Then executes ( writes output) of readAllStandardOutput().

    Adding "connect" crashes the app .

    Is there another error I should be getting to help me to identify / specify why it crashes ?

       processTERMINAL->start(exec,params);
    
        if(processTERMINAL->waitForStarted())
        {
            qDebug() << " processTERMINAL->waitForStarted() OK";
            qDebug() << "readAllStandardError()" << processTERMINAL->readAllStandardError();
            qDebug() << "readAllStandardOutput()" << processTERMINAL->readAllStandardOutput();
    
       
        }
        if(processTERMINAL->waitForReadyRead())
        {
            qDebug() << " processTERMINAL->waitForReadyRead() OK";
            qDebug() << "readAllStandardError()" << processTERMINAL->readAllStandardError();
            qDebug() << "readAllStandardOutput()" << processTERMINAL->readAllStandardOutput();
    #ifdef BYPASS
            // connect could be done in constructor
            connect( processTERMINAL, SIGNAL(readyReadStandardOutput()),
                     this, SLOT(readFromStdout()) );
    #endif
    
        }
    
    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Code looks OK (apart from using old connect syntax). I think it would be best if you run the app with debugger attached, it will show you exactly where the crash occurs and also give you full application state at the time - allowing you to see if maybe there is some uninitialized object, dangling pointer etc. that is causing the crash.

      (Z(:^

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved