Closed Bug 1667768 Opened 5 years ago Closed 5 years ago

Don't issue a DIAGNOSTIC_ASSERT (i.e. crash, for dev-channel users) if OpenPrinter fails

Categories

(Core :: Printing: Setup, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox82 --- fixed
firefox83 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

We probably should weaken the DIAGNOSTIC_ASSERT that we issue in a couple of places if OpenPrinterW() fails, so that we don't inflict crashes on developer-mode users who run into this.

An example of how to reliably trigger this at present is to remove a printer from the Windows list of devices while the Print UI is open, and then try to use that printer (which will already be present in the Destination list, possibly even already selected there).

If we just bail out instead of issuing the assertion, the print operation will fail with a "Printer not found" error, which is much friendlier and perfectly adequate to the situation.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/85a37b51bf2e Don't DIAGNOSTIC_ASSERT if unable to open a Windows printer, just warn (debug only) and bail out. r=bobowen
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Presumably we should uplift this to Beta?

Flags: needinfo?(jfkthame)

MOZ_DIAGNOSTIC_ASSERT doesn't fire on beta/release channels, does it?

Flags: needinfo?(jfkthame)

It fires on early beta.

Comment on attachment 9178199 [details]
Bug 1667768 - Don't DIAGNOSTIC_ASSERT if unable to open a Windows printer, just warn (debug only) and bail out. r=bobowen

Beta/Release Uplift Approval Request

  • User impact if declined: Possible DIAGNOSTIC_ASSERT crash for Windows users when a printer driver fails.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: No known STR to hit this, but a few occurrences have been seen in the wild.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just removes DIAGNOSTIC_ASSERT that isn't giving any actionable information.
  • String changes made/needed:
Attachment #9178199 - Flags: approval-mozilla-beta?

(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)

It fires on early beta.

For MOZ_DEV_EDITION more specifically. Other than that MOZ_DEV_EDITION is set by browser/branding/aurora/configure.sh, I couldn't easily tell when MOZ_DEV_EDITION is set though.

Diagnostic asserts fire on nightly and developer edition builds (which are beta-based, but with a different branding and some build differences, including that MOZ_DEV_EDITION define).

Comment on attachment 9178199 [details]
Bug 1667768 - Don't DIAGNOSTIC_ASSERT if unable to open a Windows printer, just warn (debug only) and bail out. r=bobowen

stop crashes on devedition, approved for 82.0b6

Attachment #9178199 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: