Closed Bug 1502817 Opened 6 years ago Closed 5 years ago

Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java)

Categories

(Firefox for Android Graveyard :: General, defect, P2)

Unspecified
Android
defect

Tracking

(firefox64 wontfix, firefox65 wontfix, firefox66 fixed, firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- fixed
firefox67 --- fixed

People

(Reporter: gsvelto, Assigned: andrei.a.lazar)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is
report bp-e0039197-ffc0-4934-b4e2-b83e70181028.
=============================================================

Java stack trace:

java.lang.NullPointerException
	at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java:201)
	at org.mozilla.gecko.MediaPlayerManager$1.saveAndNotifyOfPlayer(MediaPlayerManager.java:239)
	at org.mozilla.gecko.MediaPlayerManager$1.onRouteAdded(MediaPlayerManager.java:213)
	at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2835)
	at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2800)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6944)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Adding affected branches. #24 crash overall in 64.0.2 release. Visible in 65 betas but in fairly low volume. No useful comments.

Assignee: nobody → andrei.a.lazar

Since there are no steps to reproduce or any useful comments, I am going to make a speculative fix for this.

After further investigations, I found out that the cause of this crash is due to a method deprecation. As per [https://developers.google.com/android/reference/com/google/android/gms/cast/CastDevice.html#getIpAddress()] the current method returns the IPv4 address of the device, but if device is on an IPv6-only network, this method will return null.

Unfortunately the new method was introduced in play-services-cast 16.0.0 and we are currently running on 15.0.0 so I am going to make a follow-up bug for updating the play-services-cast to the required version.

The good side is we don't need to update the whole google-play-services since this module has sub-dependencies of play-services-basement 15.0.0 and play-services-base 15.0.0 [https://mvnrepository.com/artifact/com.google.android.gms/play-services-cast].

Depends on: 1524529

Replaced deprecated method which returns null if device is on an IPv6-only network with a newer one that can return IPv6 address.

Depends on D18324

Keywords: checkin-needed

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ca94c72623e
Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java) r=sdaswani

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Can you request uplift to beta? Thanks!

Flags: needinfo?(andrei.a.lazar)

Crash rate is high enough and the fix simple enough that this looks like a decent ride-along candidate for 65.0.1 too.

Comment on attachment 9040662 [details]
Bug 1502817 Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java) r=sdaswani

Beta/Release Uplift Approval Request

Feature/Bug causing the regression

Bug 1502817

User impact if declined

The users won't be able to use ChromeCast in IPv6 networks.

Is this code covered by automated tests?

Unknown

Has the fix been verified in Nightly?

No

Needs manual test from QE?

No

If yes, steps to reproduce

List of other uplifts needed

Bug 1524529

Risk to taking this patch

Low

Why is the change risky/not risky? (and alternatives if risky)

The fix is simple and it's also a code improvement since we replaced a deprecated method with a newer one.

String changes made/needed

Flags: needinfo?(andrei.a.lazar)
Attachment #9040662 - Flags: approval-mozilla-beta?
Attachment #9040662 - Flags: approval-mozilla-release?

Comment on attachment 9040662 [details]
Bug 1502817 Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java) r=sdaswani

Fix for Chromecast crash, let's uplift for beta 6.

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

Comment on attachment 9040662 [details]
Bug 1502817 Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java) r=sdaswani

[Triage Comment]
Fixes a Fennec crash, approved for 65.0.1.

Attachment #9040662 - Flags: approval-mozilla-release? → approval-mozilla-release+

qe-verify+ but that might amount to just verifying via crash-stats that it's gone after 65.0.1 ships.

Flags: qe-verify+

Comment on attachment 9040662 [details]
Bug 1502817 Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java) r=sdaswani

Sorry, but after some further discussion, we decided not to take this patch after all for the 65.0.1 release. The fix will still be included in next month's Fx66 release. I apologize for the inconvenience.

Attachment #9040662 - Flags: approval-mozilla-release+ → approval-mozilla-release-
Whiteboard: [qa-triaged]
QA Whiteboard: [qa-triaged]
Whiteboard: [qa-triaged]

Based on Comment 9, I will remove the qe-verify+ flag.

Flags: qe-verify+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.