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

Unprotected access to the devMode-member of QWin32PrintEngine may cause crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.4.2
    • 3.x
    • GUI: Printing
    • None
    • 4ca43c71eb4f1b2cb969a219e3f1d3b12af02309

      Under some conditions some printer driver returns a null-pointer when retrieving the devMode-pointer. In these cases the app crashes while printing in QWin32PrintEngine::begin(...) when num_copies-value should be set into the devMode.

      Additional feed back on this issue:
      The problem of nul-DEVMODE's is that Qt retrieve the DEVMODE only from the PRINTER_INFO_2 struct which is not filled correctly especially by some none-microsoft printer drivers. It is suggested to retrieve a valid devmode in an alternative way as decribed in http://www.codeguru.com/forum/showthread.php?t=93941 if
      PRINTER_INFO_2's pDevMode points to null.

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

            superfun Mike Kuta
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes