Closed Bug 1116872 Opened 10 years ago Closed 10 years ago

java.lang.NullPointerException in MediaPlayerManager onRouteAdded (2014-12-31 Nightly)

Categories

(Firefox for Android Graveyard :: Screencasting, defect)

All
Android
defect
Not set
critical

Tracking

(firefox37 fixed, fennec37+)

VERIFIED FIXED
Firefox 37
Tracking Status
firefox37 --- fixed
fennec 37+ ---

People

(Reporter: kats, Assigned: rnewman)

References

Details

(Keywords: crash, regression, Whiteboard: startupcrash)

Crash Data

Attachments

(1 file)

The dec 31 nightly build is crashing on startup for me, 100% reproducible on the nexus 4. Logcat shows this: 12-31 17:19:51.567 D/AndroidRuntime( 6932): Shutting down VM 12-31 17:19:51.567 W/dalvikvm( 6932): threadid=1: thread exiting with uncaught exception (group=0x42070930) 12-31 17:19:51.567 D/dalvikvm(20606): GC_FOR_ALLOC freed 1355K, 13% free 13627K/15488K, paused 51ms, total 51ms 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main") 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): java.lang.NullPointerException 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at org.mozilla.gecko.MediaPlayerManager$1.onRouteAdded$64594288(MediaPlayerManager.java:161) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(Unknown Source) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at android.os.Handler.dispatchMessage(Handler.java:99) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at android.os.Looper.loop(Looper.java:137) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at android.app.ActivityThread.main(ActivityThread.java:5041) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at java.lang.reflect.Method.invokeNative(Native Method) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at java.lang.reflect.Method.invoke(Method.java:511) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 12-31 17:19:51.577 E/GeckoCrashHandler( 6932): at dalvik.system.NativeStart.main(Native Method) 12-31 17:19:51.627 D/dalvikvm(20606): GC_FOR_ALLOC freed 631K, 13% free 13590K/15488K, paused 48ms, total 48ms
Severity: normal → critical
Keywords: crash, regression
According to crash-stats, there are five crashes, which I guess are all yours. Do you have a Chromecast, Roku, Matchstick, or similar on your network? Are you on wifi during the crash? What happens if you turn wifi off?
Flags: needinfo?(bugmail.mozilla)
Component: General → Screencasting
Summary: Dec 31 nightly crashes on startup → java.lang.NullPointerException in MediaPlayerManager onRouteAdded (2014-12-31 Nightly)
Whiteboard: startupcrash
FWIW, I cannot reproduce on KitKat with both Roku and Chromecast on my home wifi, or with wifi off.
This is the culprit: ChromeCast.java: public JSONObject toJSON() { final JSONObject obj = new JSONObject(); try { final CastDevice device = CastDevice.getFromBundle(route.getExtras()); if (device == null) { return null; <<<<< } MediaPlayerManager.java: GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent( "MediaPlayer:Added", display.toJSON().toString())); ^^^^^^^^^^^^^^^^^ So I'm guessing you have a Chromecast on your network.
Only needs one reviewer, but very likely one or both is AFK.
Attachment #8543099 - Flags: review?(mark.finkle)
Attachment #8543099 - Flags: review?(blassey.bugs)
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
(In reply to Richard Newman [:rnewman] from comment #2) > According to crash-stats, there are five crashes, which I guess are all > yours. > > Do you have a Chromecast, Roku, Matchstick, or similar on your network? None of the above. > Are you on wifi during the crash? Yes. > What happens if you turn wifi off? Didn't try that. I rolled back to yesterday's build which worked fine. I can try again with today's build and Wi-Fi off.
Flags: needinfo?(bugmail.mozilla)
Doesn't crash with Wi-Fi off. But it's definitely something in today's nightly that's triggering it. I can bisect tomorrow if you think that would be useful.
tracking-fennec: --- → ?
Crash Signature: [@ java.lang.NullPointerException: Attempt to invoke virtual method ''java.lang.String org.json.JSONObject.toString()'' on a null object reference at org.mozilla.gecko.MediaPlayerManager$1.onRouteAdded$64594288(MediaPlayerManager.java)]
Comment on attachment 8543099 [details] [diff] [review] Don't crash on startup when CastDevice.getFromBundle returns null. v1 LGTM
Attachment #8543099 - Flags: review?(mark.finkle)
Attachment #8543099 - Flags: review?(blassey.bugs)
Attachment #8543099 - Flags: review+
Crash Signature: [@ java.lang.NullPointerException: Attempt to invoke virtual method ''java.lang.String org.json.JSONObject.toString()'' on a null object reference at org.mozilla.gecko.MediaPlayerManager$1.onRouteAdded$64594288(MediaPlayerManager.java)] → [@ java.lang.NullPointerException: Attempt to invoke virtual method ''java.lang.String org.json.JSONObject.toString()'' on a null object reference at org.mozilla.gecko.MediaPlayerManager$1.onRouteAdded$64594288(MediaPlayerManager.java)] java.lang.NullPoi…
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Fixes the crash for me, thanks.
Status: RESOLVED → VERIFIED
tracking-fennec: ? → 37+
Landed 10+ days ago, so this is status=fixed.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: