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

qFatal() always abort application

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.11.0 Alpha
    • 5.9.4
    • Documentation
    • None
    • abc891ee7cf12ae3b359811883d674c61793cc1d

      It's good but not wanted behaviour. qInstallMessageHandler documentation contains such snippet.

            case QtFatalMsg:
                fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
                abort();
      

      Here is abort() used. But abort will be always called. It happens in qlogging.cpp qt_message_fatal function.

      So qInstallMessageHandler documentation should be improved. Need to remove abort() and add QtFatalMsg explanation.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            taurus Ivan Romanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes