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

Windows/MinGW: "QPrinter printer;" crashs application (occurs only in "debug")

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.2
    • 5.2.1, 5.3.0
    • GUI: Printing
    • None
    • Windows 7 64bit, QT5.3.0/mingw4.8/x86
    • 3226a71a89f63fc590d1fa371c96bdd1dbe1e286 (5.3, 24.6.2014, 5.3.2)

    Description

      Run this (occurs only in "debug"):

      QPrinter printer; //This line crash app
      QPrintPreviewDialog preview(&printer);
      preview.setWindowFlags(Qt::Window);
      QObject::connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *)));
      preview.exec();
      
      qDebug() << "No crash";
      

      Crash app and returns:

      Invalid parameter passed to C runtime function.
      Invalid parameter passed to C runtime function.
      ASSERT: "hdc" in file kernel\qprintengine_win.cpp, line 912

      I tried:

      new QPrinter(QPrinter::HighResolution);//This line crash app
      qDebug() << "No crash";
      

      Attachments

        1. printer-test.zip
          3 kB
        2. qtbug39373.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            brcontainer Guilherme Nascimento
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes