morris254 / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

Stories with no audio in playlist cause a crash #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Find a program where the story rundown has been released, but not the audio 
for some or all stories. Fresh Air between 10a-12p central and All Things 
Considered before 6p central generally demonstrate this problem.
2. Select "Add all to playlist". This adds all stories to the playlist, 
including those without audio.
3. Start the playlist by pressing the Play button. Playback will proceed 
normally, until it encounters a story with no audio.

What is the expected output? What do you see instead?
The app should fail gracefully, either skipping these stories as they are 
encountered or not adding them to the playlist in the first place. Instead, 
PlaybackService.prepareThenPlay will throw a NullPointerException on the url 
argument, which crashes the app.

What version of the product are you using? On what operating system?
I've tested this against the current Market version and revision 140; the 
behavior is the same in each. I am using Android 2.3.5 on an HTC Incredible.

Please provide any additional information below.

Original issue reported on code.google.com by raines.t...@gmail.com on 28 Oct 2011 at 3:42

GoogleCodeExporter commented 9 years ago
I've created a quick fix for review that doesn't add stories without audio to 
the playlist and raises a notification dialog when this happens. It also throws 
a more descriptive exception from PlaybackService. Alternatively, it could not 
display the warning, and handle the exception from PlaybackService silently.

http://codereview.appspot.com/5321062/

Original comment by raines.t...@gmail.com on 28 Oct 2011 at 4:16

GoogleCodeExporter commented 9 years ago
Still waiting for developer review on the patch.

Original comment by jpenn...@gmail.com on 16 Nov 2011 at 5:13

GoogleCodeExporter commented 9 years ago

Original comment by justinfr...@gmail.com on 7 Dec 2011 at 5:55

GoogleCodeExporter commented 9 years ago
The earlier code incorrectly checked for audio in the stories, which caused the 
error.  The fix supplied was very acceptable, although NPR decided to go with a 
silent exception as suggested by raines.travis.  I've implemented the change.  
Thanks, raines.travis!

Original comment by justinfr...@gmail.com on 21 Dec 2011 at 4:12