Closed Bug 1667952 Opened 5 years ago Closed 5 years ago

Crash in [@ nsPrinterWin::CopyDefaultDevmodeW]

Categories

(Core :: Printing: Setup, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- fixed
firefox83 --- fixed

People

(Reporter: aryx, Assigned: bobowen)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/d6fe106a-a59b-4cdd-ab66-66dd20200925

Top 10 frames of crashing thread:

0 xul.dll nsPrinterWin::CopyDefaultDevmodeW const widget/windows/nsPrinterWin.cpp:51
1 xul.dll nsPrinterWin::DefaultSettings const widget/windows/nsPrinterWin.cpp:81
2 xul.dll static std::_C__Invoker_functor::_Call<`lambda at /builds/worker/checkouts/gecko/widget/PrintBackgroundTask.h:54:17'> 
3 xul.dll mozilla::SpawnPrintBackgroundTask<nsPrinterBase, mozilla::PrintSettingsInitializer>::<unnamed-tag>::operator const widget/PrintBackgroundTask.h:53
4 xul.dll mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/widget/PrintBackgroundTask.h:48:11'>::Run xpcom/threads/nsThreadUtils.h:577
5 xul.dll nsThreadPool::Run xpcom/threads/nsThreadPool.cpp:299
6 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1234
7 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:302
8 xul.dll MessageLoop::RunHandler ipc/chromium/src/base/message_loop.cc:327
9 xul.dll MessageLoop::Run ipc/chromium/src/base/message_loop.cc:309

MOZ_CRASH Reason (Raw) MOZ_DIAGNOSTIC_ASSERT(bytesNeeded >= LONG(sizeof(DEVMODEW))) (DocumentPropertiesW failed to get valid size) -

bp-69f718c7-68ad-4f6e-b385-895540200929 has MOZ_CRASH Reason (Raw) MOZ_DIAGNOSTIC_ASSERT(status) (OpenPrinterW failed) -
bp-7361bd9b-874c-4fe7-8e67-434be0200928 has MOZ_CRASH Reason (Raw) MOZ_DIAGNOSTIC_ASSERT(ret == 1) (DocumentPropertiesW failed) -

Flags: needinfo?(bobowencode)

Having looked at a few of these dumps and others like them, where I can get any idea of the issue, most seem to be the printer no longer being there or some other issue possibly to do with installation or connectivity.

We discussed on matrix trying to filter out these cases and not crashing for those, but I'm not convinced that it is worth the effort.
I think we'd probably just end up adding more and more exclusions, until we were no longer seeing the crashes.

So, I think I'm just going to change all these to debug asserts, so we might pick up any actually coding errors in the future in tests.

Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Flags: needinfo?(bobowencode)
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5b8fc8bef228 Only crash in DEBUG builds for system API failures in nsPrinterWin. r=jfkthame
Severity: -- → S2
Blocks: 1667405
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Presumably we should uplift this to Beta?

Flags: needinfo?(bobowencode)

Comment on attachment 9178466 [details]
Bug 1667952: Only crash in DEBUG builds for system API failures in nsPrinterWin. r=jfkthame!

Beta/Release Uplift Approval Request

  • User impact if declined: Crash when certain system print APIs fail.
    Probably linked to things like printers being removed, misconfigured or unavailable.
  • 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:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just changing diagnostic asserts to debug ones.
    Probably best to apply this after the uplift for bug 1667768 to avoid chance of conflict.
  • String changes made/needed: None
Flags: needinfo?(bobowencode)
Attachment #9178466 - Flags: approval-mozilla-beta?

Comment on attachment 9178466 [details]
Bug 1667952: Only crash in DEBUG builds for system API failures in nsPrinterWin. r=jfkthame!

stop crashes on devedition, approved for 82.0b6

Attachment #9178466 - 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: