Closed Bug 1782947 Opened 2 years ago Closed 2 years ago

Crash in [@ nsLayoutUtils::GetTextRunFlagsForStyle]

Categories

(Core :: Graphics: Canvas2D, defect, P3)

defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- fixed
firefox103 --- wontfix
firefox104 --- fixed
firefox105 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/6269d6e7-33c2-4fbc-93c8-8151a0220803

Reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS

Top 10 frames of crashing thread:

0 XUL nsLayoutUtils::GetTextRunFlagsForStyle layout/base/nsLayoutUtils.cpp:6954
1 XUL mozilla::dom::CanvasRenderingContext2D::DrawOrMeasureText dom/canvas/CanvasRenderingContext2D.cpp:4067
2 XUL mozilla::dom::CanvasRenderingContext2D_Binding::fillText dom/bindings/CanvasRenderingContext2DBinding.cpp:6434
3 XUL bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions> dom/bindings/BindingUtils.cpp:3272
4 XUL js::Call js/src/vm/Interpreter.cpp:606
5 XUL js::fun_apply js/src/vm/JSFunction.cpp:1023
6 XUL Interpret js/src/vm/Interpreter.cpp:3325
7 XUL js::Call js/src/vm/Interpreter.cpp:606
8 XUL js::fun_apply js/src/vm/JSFunction.cpp:1023
9 XUL Interpret js/src/vm/Interpreter.cpp:3325

Looks like aPresContext is null. We check for it being null everywhere else, probably need to here as well:
https://searchfox.org/mozilla-central/rev/560bbebd595cf2f6a9861f3f67dd0739f4c4c559/layout/base/nsLayoutUtils.cpp#6949

Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fc0b5ff16379
Check for null pres context in nsLayoutUtils::GetTextRunFlagsForStyle. r=jfkthame
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch

The patch landed in nightly and beta is affected.
:aosmond, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox104 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(aosmond)

Comment on attachment 9288280 [details]
Bug 1782947 - Check for null pres context in nsLayoutUtils::GetTextRunFlagsForStyle.

Beta/Release Uplift Approval Request

  • User impact if declined: Experience low volume crash
  • Is this code covered by automated tests?: Yes
  • 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): Crash volume is too low to verify on nightly. Patch is trivial -- it just checks for a null pointer.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(aosmond)
Attachment #9288280 - Flags: approval-mozilla-beta?

Comment on attachment 9288280 [details]
Bug 1782947 - Check for null pres context in nsLayoutUtils::GetTextRunFlagsForStyle.

Approved for 104.0b6

Attachment #9288280 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Please nominate this for ESR102 approval when you get a chance.

Flags: needinfo?(aosmond)

Comment on attachment 9288280 [details]
Bug 1782947 - Check for null pres context in nsLayoutUtils::GetTextRunFlagsForStyle.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Low volume crash
  • User impact if declined: Low volume crash
  • Fix Landed on Version: 104, 105
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very low risk, just adds a null pointer check, verified as fixed in beta
Flags: needinfo?(aosmond)
Attachment #9288280 - Flags: approval-mozilla-esr102?

Comment on attachment 9288280 [details]
Bug 1782947 - Check for null pres context in nsLayoutUtils::GetTextRunFlagsForStyle.

Approved for 102.2esr.

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

Attachment

General

Created:
Updated:
Size: