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

crash in QCoreApplication::arguments()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P1: Critical P1: Critical
    • None
    • 5.8.0
    • Core: Other
    • None
    • Kubuntu 16.10

      I have compiled a debug version of Qt 5.8.0 from sources and I am now trying to run a working program that I ported from Windows.

      On startup of the program, QCoreApplication::arguments() crashes because self->d_func()->argc returns the value of 32767, so that an invalid pointer is used in this line when the array av is overrun :
      list << QString::fromLocal8Bit(av[a]);

      The array av itself does correctly contain my specified parameters. Only self->d_func()->argc is incorrect.

      Screenshot of my debug session in gdb is attached.

      This is happening when specifying parameters. If I run the program without any parameter, it correctly calls QMessageBox::critical to announce missing parameters.

      Is there a simple workaround ?

        1. bug.tar.gz
          5.71 MB
          user-b3af0
        2. screen023.jpg
          104 kB
          user-b3af0
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            jirauser39726 user-b3af0 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes