Closed Bug 1493980 Opened 3 years ago Closed 3 years ago

Crash in InternalOrientationToType


(Core :: DOM: Core & HTML, defect, P2)

63 Branch



Tracking Status
firefox-esr60 --- unaffected
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed
firefox66 --- fixed


(Reporter: marcia, Assigned: mbrubeck)



(Keywords: crash, regression)

Crash Data


(1 file)

This bug was filed from the Socorro interface and is
report bp-833c5b4a-0f14-4f90-b23b-6f3e70180925.

Seen while looking at beta Android crashes: These crashes spiked a bit in 63b5. They are present in 62 as well, with ~49 crashes. Mix of devices ranging from API 28 down to API 19.

moz_crash_reason = MOZ_CRASH(Bad aOrientation value)

Top 10 frames of crashing thread:

0 InternalOrientationToType dom/base/ScreenOrientation.cpp:49
1 mozilla::dom::ScreenOrientation::ScreenOrientation dom/base/ScreenOrientation.cpp:80
3 nsScreen::nsScreen dom/base/nsScreen.cpp:40
4 nsScreen::Create dom/base/nsScreen.cpp:34
5 mbrtoc32 
7 nsGlobalWindowInner::GetScreen dom/base/nsGlobalWindowInner.cpp:2234
9 mozilla::dom::Window_Binding::get_screen dom/bindings/WindowBinding.cpp:3132

Although the spike in b5 is noticeable, it appears only 5 installations were causing that amount of crashes. The crash continues into other betas but in fairly low volume.
snorp, do you know if things have changed recently in the Java-side for handling/sending orientation values?
Flags: needinfo?(snorp)
We did change some stuff in bug 1476106 and followups. Jan, do you feel like taking a look at this?
Flags: needinfo?(snorp) → needinfo?(jh+bugzilla)
I can try taking a look.
I won't have the time to look at this in the near future, though, so if someone else wants to investigate feel free.
It's closer to 1000 crashes/600 installs per week on Fennec release. 
Fix-optional for 64 since we're getting close to the end of the cycle; we could still take a patch for 65.
Priority: -- → P2
This eliminates one potential source of crashes from passing bad orientation
values to onOrientationChange.

I can't reproduce this crash, so this patch is speculative, based on one possible place where a bad value might slip through.

Thanks for looking at this.

Flags: needinfo?(jh+bugzilla)
Pushed by
Don't pass indefinite screen orientations to Gecko. r=snorp
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

Might be worth fixing in 65 still?

Comment on attachment 9035665 [details]
Bug 1493980 - Don't pass indefinite screen orientations to Gecko. r?snorp

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1476106

User impact if declined: Crashes in Firefox for Android, at a rate of about 1000/week. This patch isn't known to eliminate these crashes, but it might.

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): Very low-risk patch. Small, Android-only, and it just adds some validation to prevent "should never happen" values from being passed to code that can't handle them.

String changes made/needed:

Attachment #9035665 - Flags: approval-mozilla-beta?
Assignee: nobody → mbrubeck

Comment on attachment 9035665 [details]
Bug 1493980 - Don't pass indefinite screen orientations to Gecko. r?snorp

[Triage Comment]
Low-risk speculative fix for a longstanding crash. Approved for 65.0b12.

Attachment #9035665 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Component: DOM → DOM: Core & HTML
See Also: → 1545429
You need to log in before you can comment on or make changes to this bug.