GNOME Bugzilla – Bug 647024
Last.fm fingerprint service fails intermittently
Last modified: 2011-04-26 19:25:02 UTC
When trying to get information from the last.fm fingerprint, it will sometimes fail with the following message. [Warn 08:12:51.092] Caught an exception - System.ArgumentNullException: Argument cannot be null. Parameter name: stream (in `mscorlib') at System.IO.StreamReader.Initialize (System.IO.Stream stream, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0 at System.IO.StreamReader..ctor (System.IO.Stream stream, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0 at System.IO.StreamReader..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (System.IO.Stream) at Hyena.Json.Tokenizer.SetInput (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at Hyena.Json.Deserializer.SetInput (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at Hyena.Json.Deserializer..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at Lastfm.LastfmRequest.GetResponseObject () [0x00000] in <filename unknown>:0 at Banshee.LastfmFingerprint.LastfmFingerprintService.GetMoreInfo (Banshee.Collection.TrackInfo track) [0x00000] in <filename unknown>:0 at Banshee.LastfmFingerprint.LastfmFingerprintService.FetchMetadata (Banshee.Collection.TrackInfo track, Int32 fpid) [0x00000] in <filename unknown>:0 at Banshee.LastfmFingerprint.LastfmFingerprintService+<OnGetTagFromFingerprint>c__AnonStorey0.<>m__0 (System.Object ) [0x00000] in <filename unknown>:0 There is no indication that anything has gone wrong in the UI, the progress bar just goes away. Ubuntu 10.10 32-bit
ohh crap ... Now that response Stream can be null to fix previous bug, it is not handle in GetResponseObject easy fix: I will try to send patch tonight. public JsonObject GetResponseObject () { Deserializer deserializer = new Deserializer (response_stream); object obj = deserializer.Deserialize (); JsonObject json_obj = obj as Hyena.Json.JsonObject; become: public JsonObject GetResponseObject () { + if (response_stream == null) + return null; Deserializer deserializer = new Deserializer (response_stream); object obj = deserializer.Deserialize (); JsonObject json_obj = obj as Hyena.Json.JsonObject;
I have been experiencing this too, it seems to work for about seven songs a day before crashing. Here is the latest debug log: http://pastebin.com/DzvFzpuE Like I said, it seems to reset after about a day, but only works for about seven songs before crashing and asking for login credentials again. I am using a free Last.fm account for what it is worth.
Created attachment 186248 [details] [review] fix the bug here is the patch. please review.
This is a patch for b-c-e, right? Then I don't think maintainer-review is needed AFAIK. Is there an active maintainer for this extension? If yes, you could CC him so he/she reviews. If not, I would recommend you to commit away...
And by maintainer-review I meant banshee-maintainer review.
The patch is against the Last.fm implementation in core, so sadly it does need some review.
Ah right. Let's hope Bertrand is watching, as he usually reviews LastFM stuff.
Comment on attachment 186248 [details] [review] fix the bug Committed to master and stable-2.0 branches, thanks Olivier.