Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27693

QFile::readLine() cause segfault if QFile was not previously opened

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 4.6.2, 5.0.1
    • Core: I/O
    • None
    • CentOS 6.3 (Final) Linux kernel 2.6.32

    Description

      The following code leads to segmentation fault:

      #include <QFile>
      
      #include <QtDebug>
      
      int main(int argc, char* argv[])
      {
          QString file_name;
      
          QFile iut(file_name, new QObject());
      
          for (int i = 0; i < 10; ++i)
              qDebug() << iut.readLine();
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-27693
        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            slava_phirsov phirsov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes